tsrs.run

tsrs-run CLI Guide & Options Reference

Evaluate local TypeScript repositories with npx tsrs-run across tsc, tsrs, tsrs --fast, and tsgo. Inspect timing medians, OS Peak RSS, Doctor readiness, and privacy redaction.

Quickstart commands

npx tsrs-run
npx tsrs-run -p apps/web/tsconfig.json --runs 5 --warmup 1
npx tsrs-run --share-dry-run --out report.json
npx tsrs-run --share

Key CLI flags

FlagDefaultPurpose
-p, --project <path>.Target a tsconfig.json file or workspace directory.
--runs <n>3Measured compiler rounds per engine after warmup (>= 1).
--warmup <n>1Unrecorded warmup rounds per engine before timed runs (>= 0).
--engines <list>tsc,tsrs,tsrs-fastComma-separated engines: tsc, tsrs, tsrs-fast, tsgo, tsc7.
--strict-parityfalseExit with status 1 whenever the final verdict is not Ready.
--share-dry-runfalseGenerate and validate the sealed share report locally with zero network requests.
--sharefalseUpload a redacted CLI evaluation report to tsrs.run/s/:id.
--publicfalseSwitch --share visibility to normalized relative paths and 240-char diagnostics.

Install & Engine Resolution

How do I run tsrs-run without installing packages globally?

Requires Node.js 22.12.0 or newer. Run npx tsrs-run inside any TypeScript repository to compare tsc, tsrs, and tsrs --fast automatically without modifying package.json or lockfiles.

How does tsrs-run locate tsc, tsrs, tsgo, and tsc7?

The CLI walks upward from your config directory through node_modules/.bin to prefer your repository's pinned compilers, falling back to the bundled tsrs package or system PATH. Explicit --tsc, --tsrs, --tsgo, and --tsc7 paths are supported too.

Solution tsconfigs & Doctor

How are solution-style tsconfig.json projects evaluated?

For root tsconfigs using files: [] with project references, tsrs-run executes read-only tsrs -b --dry and fans out read-only --noEmit --pretty false checks across up to 24 referenced subprojects inside the repository root.

What does Doctor readiness inspect before comparing engines?

Doctor inspects compiler resolution, unsupported flags, extends inheritance, and solution references via tsc --showConfig before timed rounds begin, surfacing blockers explicitly instead of guessing defaults.

Timing & Memory Metrics

How are wall-clock time and OS Peak RSS collected?

Each engine executes configurable warmup and timed rounds (default 1 warmup, 3 runs) in alternating order. External wall-clock medians sit alongside OS Peak RSS gathered from platform resource accounting rather than self-reported estimates.

Why show --extendedDiagnostics separately from Peak RSS?

Compiler --extendedDiagnostics figures (files, lines, check time, total time, reported memory) come from inside the process and follow different definitions across JS, Rust, and Go engines. Keeping them in a dedicated block prevents apples-to-oranges ratios.

Privacy & Share Redaction

Does npx tsrs-run contact tsrs.run by default?

No. Standard runs, --json, --out, and --share-dry-run execute completely offline on your workstation with zero network requests. Network upload happens only when you explicitly pass --share.

What is the difference between --share and --share --public?

Default --share sends redacted payloads: repoRoot, homeDir, raw paths, cwd, stderr, source code, and diagnostic messages are stripped, replacing file identities with salted SHA-256 f_... hashes. Adding --public retains normalized relative paths and up to 80 diagnostic samples truncated to 240 characters.

Verdicts & CI Exit Codes

How do exit codes work in CI pipelines?

Exit 0 means Ready (or Parity Gaps unless --strict-parity is passed). Exit 1 triggers when --strict-parity sees a non-Ready verdict. Exit 2 reports Blocked runs, invalid CLI flags, bad binary overrides, or failed uploads.

What do Ready, Parity Gaps, and Blocked verdicts mean?

Ready indicates baseline and candidate engines match on normalized diagnostic parity. Parity Gaps flags code, location, or count divergences that need review. Blocked means configuration errors, missing tools, or crashes prevented a fair run.