Example configs, JSON Schema, and docs inevitably fall out of sync as projects grow. Being “careful” doesn’t scale.
So I built a small compiler-based tool that takes one explicit config definition and generates:
a human-readable example config
reference documentation
a JSON Schema (draft 2020-12)
No inference, no guessing, no branching logic. Everything is explicit — even commas — so the output is deterministic.
The package is called config-schema, built on top of a minimal templating compiler called arb. It’s intentionally boring and constrained, but that’s why it stays correct.
This repo also includes:
a CLI generator example (nested subcommands)
a docs-suite example (full project documentation)
config-schema is the smallest, clearest example of the approach.
Not trying to replace existing tools — this scratched a very specific itch for me. Curious if others have run into the same config drift problem.
Open Source REPO here: https://github.com/abstractrenderblocks/arb