Skip to content

About this page

On this page

Config generator ​

@deltabox/toolchain/config is a configuration engine.

A Zod, untyped or plain-value schema is the single source of truth.

  1. Attach metadata with .meta() (or use the untyped/plain input)
  2. Then generate the:
    • Env/config TypeScript types
    • JSON Schema
    • markdown reference
    • config metadata JSON
    • CLI commands/option definitions
    • CLI reference

All from that one schema.

Where to start ​

  • Describe a scope — write the Zod, untyped or plain schema and its .meta().
  • Create the engine — bind the schema, prefix, base group(s) and root.
  • Generate — the generator methods.
  • CLI commands — the config:* command descriptors.
  • CLI program — build schema commands into a runnable program with invoke, hooks and formatting.
  • Load the config — the runtime parsers and loadConfig* (which already parse the loaded file).
  • Generated outputs — types, markdown, env files, JSON Schema, CLI docs and formatting.
  • Client and server — split browser and server schemas/engines so bundled code never crosses contexts.
  • Real-world shape — how a consumer binds the engine end-to-end.
ts
import { createConfigEngine } from '@deltabox/toolchain/config';

API reference ​

Every export, option and code example can be found in the full API reference.