Docs/Core Concepts

Core Concepts

Schema-based Validation

Unlike simple wrappers, this library uses a declarative schema to define requirements. This allows for both runtime casting (e.g., string to number) and strict type inference for your IDE.

Fail-Fast Philosophy

We believe an application should never start with an invalid configuration. By default, defineEnv will exit the process if any variable fails validation.

"Why not just use process.env?"

process.env provides no safety. It doesn't tell you if a key is missing, it doesn't cast "3000" to a real number, and it offers no IntelliSense. We bridge that gap.