tiny-typed-env
Tiny typed environment loader. No Zod required. Also works with Zod, Valibot, and ArkType via Standard Schema.
Works in Node, Bun, Deno, and Workers.
Why
- Built-in
shelpers — zero extra packages - Fail at boot with clear error messages (secrets redacted)
- Full TypeScript inference
- Nested groups for
env.server.*/env.public.* - CLI:
checkandexample - Optional Zod / Valibot / ArkType via Standard Schema
- Runtime-agnostic core (
loadEnv) plus Node helper (createEnv)
Quick example
import { createEnv, s } from "tiny-typed-env/node";
export const env = createEnv({
DATABASE_URL: s.url(),
PORT: s.port({ default: 3000 }),
DEBUG: s.boolean({ default: false }),
TIMEOUT: s.duration({ default: "30s" }),
});
env.PORT; // number
env.TIMEOUT; // 30000
Next steps
- Getting Started — install and first schema
- CLI —
checkand generate.env.example - Nested groups —
env.server.*/env.public.* - Schema helpers — full
s.*reference - API —
loadEnv,createEnv, options - Zod / Valibot / ArkType — optional schema libraries
- Examples — copy-paste app templates