What problem does it solve?
Provides a single, reliable configuration pipeline to manage complex application settings, eliminating fragile ad-hoc config parsing and runtime misconfigurations by enforcing schema validation, environment substitution, and consistent merging.
Core Features & Use Cases
- JSON5 parsing: Accepts human-friendly configuration files with comments and trailing commas for easier authoring.
- Schema-driven validation: Uses Zod schemas to validate configuration shape and surface precise error locations.
- Environment variable substitution: Resolves ${VAR} placeholders securely to support 12-factor style deployments.
- Deep merging & defaults: Composes included files, applies runtime overrides, and injects default values.
- Hot-reload watcher: Observes config sources and reloads validated configuration at runtime for fast iteration.
- Use Case: Ideal for a TypeScript backend or service mesh where multiple teams contribute modular config fragments that must be validated and hot-reloaded without service restarts.
Quick Start
Load the main configuration file, apply environment variable substitution, merge includes and defaults, validate against the provided Zod schema, and return the resolved configuration object.