The problem
Untyped environment variables make configuration errors invisible until a specific code path runs. A missing or malformed value can look like an application bug.
Most validation libraries bring a framework, a runtime dependency, or a type-generation step that is heavier than the problem.
What I built
- A zero-dependency TypeScript API that validates process.env against JSON Schema.
- Safe coercion for numbers, booleans, and other primitive values before they reach application code.
- Typed output so consumers get autocomplete and compile-time confidence, not stringly typed lookups.
- A CLI that validates a schema against an environment file, with readable errors that point to the exact key.
System shape
Decisions and tradeoffs
Zero dependencies
Configuration validation runs at boot in every environment. It should not drag a dependency tree into the runtime.
Fail at the boundary
The best time to discover a bad env var is before the application starts, with a message that names the key and the expectation.
Types follow validation
The runtime check and the TypeScript type describe the same shape, so the compiler and the process agree.
Outcome
A small, focused developer tool with 1 GitHub star, built to make configuration failures obvious and typed at the earliest possible moment.
Configuration errors should be boring: one clear message at boot, not a stack trace after the first request.
