Reference
Commands
The typeglish bin runs the whole loop — check, score, test, build, deploy — and prints the language reference.
Commands
The typeglish bin — author → check → score → test → build → deploy.
| Command | What it does |
|---|---|
typeglish import <file> [--out <path>] [--json] | convert an existing prompt to .tg — deterministic: repairs FORM (never words), |
typeglish check <file|dir...> [check options] | validate; exits 1 when any file has a blocking error. A directory expands to its |
typeglish build <file|dir...> [build options] | compile passing files to artifacts + record the manifest. A directory builds |
typeglish score <file> [--min B|80] [--json] | the deterministic TG score; exits 1 below --min |
typeglish fmt <file|dir...> [--check] | mechanical formatting, in place: join hard-wrapped fragments, split compound rules, |
typeglish test <file...> [test options] | run the file's $TEST suite — --dry is offline (validate + coverage); |
typeglish resolve <file> [--vars '<json>'] | apply conditionals, print the resolved SOURCE (a .tg — |
typeglish reference | print the language reference (agents: read this first) |
typeglish mcp | serve check/build/score/explain/reference over MCP stdio |
typeglish lsp | serve the language server over stdio — diagnostics, semantic tokens, hover, completion, rename — for any LSP editor |
Flags
Flags grouped by the command they modify.
| Flag | What it does |
|---|---|
--out-dir <dir> | artifact directory (default: .typeglish/dist) · build |
--vars '<json>' | input bag — conditionals compile away; omitted = template build (unbound switches · build |
--bundle | also write <artifact>.agent.json — the $CONFIG / $TOOL agent bundle · build |
--dry | fully offline: validate the suite + report rule coverage, zero model calls · test |
--no-judge | deterministic asserts only — skip the judge on prose expectations (still generates) · test |
--model <id> | the model that answers each case (and judges, unless --no-judge) · test |
--strict | escalate every IMPORTANT finding (correctness defects) to a blocking error · global |
--json | machine-readable output on stdout (agents: parse this, not the text) · global |
--vars | a JSON object of input values, e.g. '{"tier":"premium"}' · global |
--min | score floor — a grade (A–F) or a number, the CI gate; for test, the 0..1 rubric pass floor · global |
--explain <code> | what a diagnostic code means (e.g. logic/contradiction) · standalone |
--version | print the compiler version · standalone |
--help | this text · standalone |