Skip to Content

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.

FlagAliasesKindSubcommandsConsumed byNotesDescription
--help-hbooleanttsc, ttsx, build, check, fix, formatlauncherterminal, consumed-not-forwardedShow command help and exit.
--version-vbooleanttsc, ttsxlauncherterminal, consumed-not-forwardedPrint the launcher version and exit.
--tsconfig-p, --projectvaluettsc, ttsx, build, check, fix, format, prepare, cleanlauncher, host, lint-Resolve project settings from this tsconfig.
--cwd-valuettsc, ttsx, build, check, fix, format, prepare, cleanlauncher, host, lint-Resolve project-relative paths from this directory.
--emit-booleanttsc, build, checklauncher, runBuild, host, lint-Force emitted files during build.
--noEmit-booleanttsc, build, checklauncher, runBuild, host, lintshadowForce analysis-only build with no file writes.
--outDir-valuettsc, build, checklauncher, host, lint-Override compilerOptions.outDir for this invocation.
--watch-wbooleanttsc, build, checklauncherconsumed-not-forwardedRebuild when project files change.
--preserveWatchOutput-booleanttsc, build, checklauncherconsumed-not-forwardedDo not clear the screen between watch rebuilds.
--quiet-booleanttsc, build, check, fix, formatlauncher, host, lint-Keep build output quiet (default).
--verbose-booleanttsc, build, check, fix, formatlauncher, host, lint-Print the build summary and emitted files.
--binary-valuettsc, ttsx, build, check, fix, format, prepare, cleanlauncherconsumed-not-forwardedUse an explicit tsgo binary.
--cache-dir-valuettsc, ttsx, build, check, fix, format, prepare, cleanlauncherconsumed-not-forwardedOverride the runner and source-plugin cache root.
--singleThreaded-booleanttsc, ttsx, build, check, fix, formatlauncher, runBuild, tsgo, host, lintcapability: threadingArgsRun TypeScript-Go single-threaded (one checker).
--checkers-valuettsc, ttsx, build, check, fix, formatlauncher, runBuild, tsgo, host, lintcapability: threadingArgsType-checker pool size (default: TypeScript-Go’s).
--require-rvaluettsxlauncherconsumed-not-forwardedPreload a module before the entrypoint (ttsx).
--no-plugins-booleanttsxlauncherconsumed-not-forwardedBuild the project without ttsc plugins (ttsx).
--listEmittedFiles-booleanttsc, build, checkrunBuild, tsgoshadowPrint the list of emitted files (forwarded to tsgo; ttsc keeps the lines when forwarded).
--pretty-valuettsc, ttsx, build, check, fix, formattsgoshadowToggle tsgo pretty-printed diagnostics (forwarded to tsgo).
--diagnostics-booleanttsc, ttsx, build, check, fix, formatrunBuild, tsgo, lintcapability: diagnosticsTimingPrint compiler performance information; plugin-backed ttsc runs add plugin wall-clock timings.
--extendedDiagnostics-booleanttsc, ttsx, build, check, fix, formatrunBuild, tsgo, lintcapability: diagnosticsTimingPrint detailed compiler performance information; plugin-backed ttsc runs add plugin wall-clock timings.
--showConfig-booleanttsc, build, checktsgoterminalPrint the resolved tsconfig and exit (forwarded to tsgo).
--listFilesOnly-booleanttsc, build, checktsgoterminalPrint the project file list and exit (forwarded to tsgo).
--all-booleanttsc, build, checktsgoterminalPrint the full tsgo CLI help and exit.
--init-booleanttsc, build, checktsgoterminalWrite a starter tsconfig.json and exit (forwarded to tsgo).
--tsgo-args-valuettsc, build, check, fix, format, prepare, cleanhost, lint-JSON-encoded tsgo passthrough argv (internal: emitted by runBuild).
--plugins-json-valuebuild, check, fix, formathost, lint-JSON-encoded ttsc plugin manifest (internal: emitted by runBuild).
--manifest-valuebuildhost-Write emitted file list as JSON to this path (host build only).
--file-valuebuild, checklint-Absolute or cwd-relative path of the .ts file to transform (lint transform only).
--out-valuebuild, checklint-Write transform output to PATH (lint transform only; default: stdout).

Reading this table

  • Kind boolean flags take no value; value flags consume the next argv token (or accept --flag=VALUE); valueOptional keeps 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), and capability: ... (the flag is delivered to native check-stage hosts that opt in via the matching ITtscPluginCapabilities field).

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