Config Generator
@deltabox/toolchain/config is a configuration engine. A Zod/untyped schema is the single source of truth: attach metadata to zod leaves with .meta(), then generate the env/config TypeScript types, a JSON Schema, a markdown reference, config metadata JSON, CLI option definitions and a CLI reference — all from that one schema.
Where to start
- Describe a scope — write the Zod schema and its
.meta(). - Create the engine — bind scopes, prefix, base group and root.
- Generate — the generator methods.
- CLI commands — the
config:*command descriptors. - Load the config — the runtime loader (
parseEnvTree,compileZodSchema, andapplyOverridesfrom shared). - Generated outputs — types, markdown, env files, JSON Schema, CLI docs and formatting.
- Real-world shape — how a consumer binds the engine end-to-end.
ts
import { createConfigEngine } from '@deltabox/toolchain/config';