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.
--build-bbooleanttsc, ttsx, build, check, fix, formatlauncherconsumed-not-forwardedRefused by the launcher: ttsc pins one resolved project, so tsgo’s solution-build mode is unsupported.
--tsconfig-p, --projectvaluettsc, ttsx, build, cache, check, fix, format, prepare, cleanlauncher, host, lint-Resolve project settings from this tsconfig.
--cwd-valuettsc, ttsx, build, cache, 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.
--composite-booleanttsc, ttsx, build, check, fix, formattsgotsconfig-onlyConfigure project-reference constraints in tsconfig; CLI accepts only false or null.
--incremental-ibooleanttsc, ttsx, build, check, fix, formattsgo-Write build information for incremental compilation.
--tsBuildInfoFile-valuettsc, ttsx, build, check, fix, formattsgo-Choose the incremental build-information file.
--declaration-dbooleanttsc, ttsx, build, check, fix, formattsgo-Emit declaration files.
--declarationDir-valuettsc, ttsx, build, check, fix, formattsgo-Choose the declaration output directory.
--declarationMap-booleanttsc, ttsx, build, check, fix, formattsgo-Emit source maps for declaration files.
--emitDeclarationOnly-booleanttsc, ttsx, build, check, fix, formattsgo-Emit declarations without JavaScript.
--inlineSourceMap-booleanttsc, ttsx, build, check, fix, formattsgo-Inline source maps into emitted JavaScript.
--sourceMap-booleanttsc, ttsx, build, check, fix, formattsgo-Emit external JavaScript source maps.
--outFile-valuettsc, ttsx, build, check, fix, formattsgo-Forward the removed legacy option for TypeScript-Go’s diagnostic.
--rootDir-valuettsc, ttsx, build, check, fix, formattsgo-Choose the compiler input root.
--jsx-valuettsc, ttsx, build, check, fix, formattsgo-Choose the JSX emit transform.
--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, cache, check, fix, format, prepare, cleanlauncherconsumed-not-forwardedOverride the runner and source-plugin cache root.
--json-booleancachelauncherconsumed-not-forwardedPrint cache paths as JSON.
--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-rvaluettsxlauncherrepeatable, consumed-not-forwardedPreload a module before the entrypoint (ttsx; repeatable).
--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-booleanttsc, 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, checktsgoterminal, project-freePrint the full tsgo CLI help and exit.
--init-booleanttsc, build, checktsgoterminal, project-freeWrite a starter tsconfig.json and exit (forwarded to tsgo).
-?-booleanttsc, build, checktsgoterminal, project-freePrint the tsgo CLI help and exit (forwarded to tsgo).
--tsgo-args-valuettsc, build, check, fix, format, prepare, cleanhost, lint-JSON-encoded tsgo passthrough argv (internal: accepted by ttsc’s own hosts; the launcher forwards it in TTSC_TSGO_ARGS).
--plugins-json-valuebuild, check, fix, formathost, lint-JSON-encoded ttsc plugin manifest (internal: emitted by runBuild).
--project-context-json-valuebuild, check, fix, formatlint-JSON-encoded lexical and physical project identity (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 required value; value flags consume the next argv token; valueOptional keeps a value optional. Launcher-owned flags also accept --flag=VALUE. Flags forwarded to tsgo preserve their original spelling, and the pinned tsgo CLI does not support inline =VALUE.
  • 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), project-free (a terminal flag ttsc answers without resolving a project, so it works in a directory that has no tsconfig yet), repeatable (every occurrence counts, not just the last), 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).

Flag names are matched the way the compiler matches them: case-insensitively, with one or two leading dashes. --noemit, --NoEmit, and -noEmit are the same flag to ttsc because they are the same option to tsgo.

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