Ecosystem

ArkEnv

ArkEnv brings the power of ArkType to your environment variables.

Define an ArkType schema, pull values from your environment or config source, validate them, apply type conversions and transformations, and end up with a fully typesafe, ready-to-use env object.

Inspired by tools like T3 Env but tailored specifically for ArkType, ArkEnv also adds keywords like string.host and number.port for env-specific use cases.

import { createEnv } from "arkenv"

const  = createEnv({
	HOST: "string.host",
	PORT: "number.port",
	NODE_ENV: "'development' | 'production' | 'test' = 'development'"
})

// Automatically validate and parse process.env
// TypeScript knows the ✨exact✨ types!
console.log(.HOST) // (property) HOST: string
console.log(.PORT) // (property) PORT: number
console.log(.NODE_ENV) // (property) NODE_ENV: "development" | "production" | "test"

On this page