ttsc & ttsx CLI flags
For ttsc and ttsx CLI users (command-line, build scripts, CI runners). Plugin authors should also skim the Consumed by column to see which layer reads each flag.
Single source of truth: packages/ttsc/src/flags/schema.ts. Each row is one
entry in FLAG_SCHEMA; the parsing engine, the docs table, and the Go
allow-lists are generated from the same array so a new flag never lands in
one layer and silently disappears at the next boundary.
| Flag | Aliases | Kind | Subcommands | Consumed by | Notes | Description |
|---|---|---|---|---|---|---|
--help | -h | boolean | ttsc, ttsx, build, check, fix, format | launcher | terminal, consumed-not-forwarded | Show command help and exit. |
--version | -v | boolean | ttsc, ttsx | launcher | terminal, consumed-not-forwarded | Print the launcher version and exit. |
--tsconfig | -p, --project | value | ttsc, ttsx, build, check, fix, format, prepare, clean | launcher, host, lint | - | Resolve project settings from this tsconfig. |
--cwd | - | value | ttsc, ttsx, build, check, fix, format, prepare, clean | launcher, host, lint | - | Resolve project-relative paths from this directory. |
--emit | - | boolean | ttsc, build, check | launcher, runBuild, host, lint | - | Force emitted files during build. |
--noEmit | - | boolean | ttsc, build, check | launcher, runBuild, host, lint | shadow | Force analysis-only build with no file writes. |
--outDir | - | value | ttsc, build, check | launcher, host, lint | - | Override compilerOptions.outDir for this invocation. |
--watch | -w | boolean | ttsc, build, check | launcher | consumed-not-forwarded | Rebuild when project files change. |
--preserveWatchOutput | - | boolean | ttsc, build, check | launcher | consumed-not-forwarded | Do not clear the screen between watch rebuilds. |
--quiet | - | boolean | ttsc, build, check, fix, format | launcher, host, lint | - | Keep build output quiet (default). |
--verbose | - | boolean | ttsc, build, check, fix, format | launcher, host, lint | - | Print the build summary and emitted files. |
--binary | - | value | ttsc, ttsx, build, check, fix, format, prepare, clean | launcher | consumed-not-forwarded | Use an explicit tsgo binary. |
--cache-dir | - | value | ttsc, ttsx, build, check, fix, format, prepare, clean | launcher | consumed-not-forwarded | Override the runner and source-plugin cache root. |
--singleThreaded | - | boolean | ttsc, ttsx, build, check, fix, format | launcher, runBuild, tsgo, host, lint | capability: threadingArgs | Run TypeScript-Go single-threaded (one checker). |
--checkers | - | value | ttsc, ttsx, build, check, fix, format | launcher, runBuild, tsgo, host, lint | capability: threadingArgs | Type-checker pool size (default: TypeScript-Goβs). |
--require | -r | value | ttsx | launcher | consumed-not-forwarded | Preload a module before the entrypoint (ttsx). |
--no-plugins | - | boolean | ttsx | launcher | consumed-not-forwarded | Build the project without ttsc plugins (ttsx). |
--listEmittedFiles | - | boolean | ttsc, build, check | runBuild, tsgo | shadow | Print the list of emitted files (forwarded to tsgo; ttsc keeps the lines when forwarded). |
--pretty | - | value | ttsc, ttsx, build, check, fix, format | tsgo | shadow | Toggle tsgo pretty-printed diagnostics (forwarded to tsgo). |
--diagnostics | - | boolean | ttsc, ttsx, build, check, fix, format | runBuild, tsgo, lint | capability: diagnosticsTiming | Print compiler performance information; plugin-backed ttsc runs add plugin wall-clock timings. |
--extendedDiagnostics | - | boolean | ttsc, ttsx, build, check, fix, format | runBuild, tsgo, lint | capability: diagnosticsTiming | Print detailed compiler performance information; plugin-backed ttsc runs add plugin wall-clock timings. |
--showConfig | - | boolean | ttsc, build, check | tsgo | terminal | Print the resolved tsconfig and exit (forwarded to tsgo). |
--listFilesOnly | - | boolean | ttsc, build, check | tsgo | terminal | Print the project file list and exit (forwarded to tsgo). |
--all | - | boolean | ttsc, build, check | tsgo | terminal | Print the full tsgo CLI help and exit. |
--init | - | boolean | ttsc, build, check | tsgo | terminal | Write a starter tsconfig.json and exit (forwarded to tsgo). |
--tsgo-args | - | value | ttsc, build, check, fix, format, prepare, clean | host, lint | - | JSON-encoded tsgo passthrough argv (internal: emitted by runBuild). |
--plugins-json | - | value | build, check, fix, format | host, lint | - | JSON-encoded ttsc plugin manifest (internal: emitted by runBuild). |
--manifest | - | value | build | host | - | Write emitted file list as JSON to this path (host build only). |
--file | - | value | build, check | lint | - | Absolute or cwd-relative path of the .ts file to transform (lint transform only). |
--out | - | value | build, check | lint | - | Write transform output to PATH (lint transform only; default: stdout). |
Reading this table
- Kind
booleanflags take no value;valueflags consume the next argv token (or accept--flag=VALUE);valueOptionalkeeps a value optional. - Consumed by lists every layer that reads the flag into its own option struct. A flag without a Consumed-by entry is forwarded verbatim to tsgo.
- Notes marks structural attributes:
terminal(the flag asks tsgo to print and exit),shadow(ttsc adds the flag internally; post- processing must not eat a user-forwarded copy), andcapability: ...(the flag is delivered to native check-stage hosts that opt in via the matchingITtscPluginCapabilitiesfield).
Unknown --prefixed flags are forwarded to tsgo without registration in
the schema, so adding a flag is only needed for flags ttsc itself consumes,
mutates, or shadows.
Last updated on