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 arkenv from "arkenv"

const  = arkenv({
	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"

DRZL

DRZL is zero-friction codegen for Drizzle ORM, tailored for ArkType developers. It analyzes your Drizzle schemas and generates ArkType validation schemas, services, and routers—eliminating boilerplate and ensuring seamless type safety between your database and application layers.

// drzl.config.ts
import { defineConfig } from "@drzl/cli/config"

export default defineConfig({
	schema: "src/db/schemas/index.ts",
	outDir: "src/api",
	generators: [
		// 1) ArkType validators
		{ kind: "arktype", path: "src/validators/arktype", schemaSuffix: "Schema" },

		// 2) Routers (oRPC adapter), reusing ArkType schemas
		{
			kind: "orpc",
			template: "@drzl/template-orpc-service",
			includeRelations: true,
			outputHeader: { enabled: true },
			validation: {
				useShared: true,
				library: "arktype",
				importPath: "src/validators/arktype",
				schemaSuffix: "Schema"
			}
		},
		// 3) Typed services (Drizzle-aware or stub)
		{
			kind: "service",
			path: "src/services",
			dataAccess: "drizzle", // or 'stub'
			dbImportPath: "src/db/connection",
			schemaImportPath: "src/db/schemas"
		}
	]
})

For more details, see the Getting Started guide.

On this page