The Dialecte CLI. Type-performance benchmarking, coverage probes, and readability
audits for any Dialecte — and for @dialecte/core itself.
Dev-time tooling. It is not a runtime dependency: it shells out to the consumer's own
tscand reads its schema, so a dialect's published library never ships any of this.
npm i -D @dialecte/cli # provides the `dialecte` binarytypescript is a peer dependency — the CLI uses the consumer's installed compiler so the types
audit renders come from the exact same tsc that bench measures with.
dialecte coverage # generate complete, schema-driven type-coverage probes
dialecte bench [--check] # measure type-instantiation cost (tsc --extendedDiagnostics); --check gates CI
dialecte audit # render the public type surface and flag readability issues (C1–C6)
dialecte --help
A dialect is built by convention: src/<version>/definition/{constants,definition}.generated.ts, and
its hydrated namespace is the capitalized package name (@dialecte/scl → Scl). The CLI discovers
every version + the namespace with no config, emitting benchmarks per version under
benchmarks/types/<version>/. @dialecte/core is detected by name and benched via a built-in generic
test dialect.
Everything is overridable per package.json "dialecte" field (odd layouts) or CLI flags:
--namespace <Name> --entry <import> --constants-dir <dir> --out <dir> --version <v> --tsconfig <f>
Env: RUNS=5 dialecte bench (repetitions kept as the min); COVERAGE_CHILD_CAP=N (cap child edges).
| Package | Bin | Audience | Phase |
|---|---|---|---|
@dialecte/create |
create-dialecte |
new-dialect authors | scaffold |
@dialecte/cli |
dialecte |
dialect authors / CI | dev |
@dialecte/core · @dialecte/scl |
— | libraries | runtime |