Type-safe layered configuration. Merge files and environment variables, validate with any schema, and get a runtime-checked object with full TypeScript IntelliSense.
Features
Section titled “Features”- Define declarative, isolated, and per-environment configuration files (
.json, or other file extensions via parsers). - Validate your configuration with zod, or bring your preferred schema validation library.
- Use a type-safe and runtime-checked configuration object across your app.
How It Works
Section titled “How It Works”When using ConfigBuilder, configuration is loaded from two primary sources:
- File-based – Define your configuration files.
- Environment variables – Override configurations dynamically. This is useful for pre-built containers that require specific values at runtime.
Since the configuration follows a cascading approach, the final result depends on the order in which sources are added.