# CLI commands

> T3 Code · channel `stable` · v0.1.14 @ [`c0eed7328db2`](https://github.com/pingdotgg/t3code/tree/c0eed7328db2609e5a535be704e90638aef1c111) · 2026-12-05 · generated by Everdoc from source (no LLM).

151 entries.

<a id="cli-command-apply-web-brand-assets"></a>

## `apply-web-brand-assets`

Copy web brand assets into a built hosted web app.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/apply-web-brand-assets.ts:39](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/apply-web-brand-assets.ts#L39)
- Handlers: 1 · Callers: 0
- Arguments: `<brand>` `<target-directory>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--channel` | `string` | yes |  | Hosted release channel to map to a web asset brand. |


<a id="cli-command-build-cli-archive"></a>

## `build-cli-archive`

Package the t3 single-executable into a per-platform archive.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/build-cli-archive.ts:713](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/build-cli-archive.ts#L713)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--arch` | `string` | yes |  |  |
| `--notary-submission-file` | `string` | yes |  | macOS: submit for notarization without waiting and write the submission id here. Publish only after await-notarization succeeds. |
| `--output-dir` | `string` |  | `release-cli` |  |
| `--platform` | `string` | yes |  |  |
| `--resource-monitor-dir` | `string` | yes |  | Directory laid out like dist/resource-monitor (defaults to apps/server/dist/resource-monitor). |
| `--version` | `string` | yes |  | Release version for the archive name. |


<a id="cli-command-build-cli-archive-await-notarization"></a>

## `build-cli-archive await-notarization`

Wait for a --notary-submission-file submission; fail unless Accepted.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/build-cli-archive.ts:739](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/build-cli-archive.ts#L739)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--submission-file` | `string` | yes |  |  |


<a id="cli-command-build-desktop-artifact"></a>

## `build-desktop-artifact`

Build a desktop artifact for T3 Code.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/build-desktop-artifact.ts:4362](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/build-desktop-artifact.ts#L4362)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--arch` | `string` | yes |  | Build arch, for example arm64/x64/universal (env: T3CODE_DESKTOP_ARCH). |
| `--build-version` | `string` | yes |  | Compiled bundle and desktop package version (env: T3CODE_DESKTOP_VERSION). |
| `--keep-stage` | `boolean` |  |  | Keep temporary staging files (env: T3CODE_DESKTOP_KEEP_STAGE). |
| `--mock-update-server-port` | `number` | yes |  | Mock update server port (env: T3CODE_DESKTOP_MOCK_UPDATE_SERVER_PORT). |
| `--mock-updates` | `boolean` |  |  | Enable mock updates (env: T3CODE_DESKTOP_MOCK_UPDATES). |
| `--output-dir` | `string` | yes |  | Output directory for artifacts (env: T3CODE_DESKTOP_OUTPUT_DIR). |
| `--platform` | `string` | yes |  | Build platform (env: T3CODE_DESKTOP_PLATFORM). |
| `--signed` | `boolean` |  |  | Enable signing/notarization discovery; Windows uses Azure Trusted Signing (env: T3CODE_DESKTOP_SIGNED). |
| `--skip-build` | `boolean` |  |  | Skip `vp run build:desktop` and use existing dist artifacts (env: T3CODE_DESKTOP_SKIP_BUILD). |
| `--target` | `string` | yes |  | Artifact target, for example dmg/AppImage/nsis (env: T3CODE_DESKTOP_TARGET). |
| `--verbose` | `boolean` |  |  | Stream subprocess stdout (env: T3CODE_DESKTOP_VERBOSE). |
| `--wsl-runtime` | `string` | yes |  | Path to the Linux CLI release archive (t3-<version>-linux-x64.tar.gz) to embed as the WSL runtime of a Windows build (env: T3CODE_DESKTOP_WSL_RUNTIME). |


<a id="cli-command-build-npm-launcher"></a>

## `build-npm-launcher`

Build the t3 npm launcher package.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/build-npm-launcher.ts:115](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/build-npm-launcher.ts#L115)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--output-dir` | `string` |  | `npm-packages` |  |
| `--version` | `string` | yes |  | Exact release version; the launcher downloads this version's archive. |


<a id="cli-command-check-changed"></a>

## `check-changed`

Run CI's fast checks for this branch's changes.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/check-changed.ts:602](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/check-changed.ts#L602)
- Handlers: 1 · Callers: 0
- Arguments: `<ref>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--concurrency` | `number` | yes |  | Budget of parallel steps and typecheck workers; also CHECK_CHANGED_CONCURRENCY. Defaults to one per two cores and per 6 GiB of available memory. |
| `--timeout` | `number` | yes |  | Seconds before a step is killed; also CHECK_CHANGED_TIMEOUT. Defaults to 900. |


<a id="cli-command-cli"></a>

## `cli`

T3 server build & publish CLI.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/scripts/cli.ts:228](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/scripts/cli.ts#L228)
- Handlers: 0 · Callers: 0

<a id="cli-command-cli-build"></a>

## `cli build`

Build the server package (tsdown + bundle web client).

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/scripts/cli.ts:71](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/scripts/cli.ts#L71)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--verbose` | `boolean` |  | `false` |  |


<a id="cli-command-cli-build-exe"></a>

## `cli build-exe`

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/scripts/cli.ts:106](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/scripts/cli.ts#L106)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--target` | `string` | yes |  | Cross-build for <platform>-<arch> in nodejs.org naming (for example darwin-x64); defaults to the host. |
| `--verbose` | `boolean` |  | `false` |  |


<a id="cli-command-cli-publish"></a>

## `cli publish`

Publish the t3 launcher to npm.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/scripts/cli.ts:190](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/scripts/cli.ts#L190)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--access` | `string` |  | `public` |  |
| `--dry-run` | `boolean` |  | `false` |  |
| `--packages-dir` | `string` | yes |  | Output dir of scripts/build-npm-launcher.ts. |
| `--provenance` | `boolean` |  | `false` |  |
| `--tag` | `string` |  | `latest` |  |
| `--verbose` | `boolean` |  | `false` |  |


<a id="cli-command-client-metrics"></a>

## `client-metrics`

Measure the web client in headless Chromium against a production build and a seeded server. Linux and macOS. Thread switches (each its own thread, switched to from a small hub thread by a sidebar click): short, long Panel closed; one turn, and many heavy turns: the timeline's cost. working A thread streaming a long replayed turn while it is switched to. approval A thread waiting on an approval. medium Panel closed, the same timeline as the panel cases: their baseline. diff Diff panel on a branch changing 40 files. pull-request Pull request panel with a long body, files, commits and comments (fake GitHub). browser Browser surface on a local page. device Device surface; no device stream exists here, so it shows its empty state (light). Interactions (each a few measured steps inside one thread): type-short, type-long Keys typed into the composer, each key to its next paint. scroll-long Wheel up a fixed distance through the long timeline: missed frames, LoAF. palette Open the command palette, type a query. pr-tabs Pull request panel: Timeline, Code, then Summary. surfaces Switch between two right-panel surfaces (pull request and diff). terminal Open and close the terminal drawer. settings Open Settings and go back. Trust a change only from `ab` on one machine; calibrate floors with `noise` on A/A runs.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/metrics/web/client-metrics.ts:1914](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/metrics/web/client-metrics.ts#L1914)
- Handlers: 0 · Callers: 0

<a id="cli-command-client-metrics-ab"></a>

## `client-metrics ab`

Run two checkouts alternately (A B, then B A) on this machine and compare them. The harness, seed and replay agent come from this script, so an older checkout works too; a case it cannot run is skipped and named.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/metrics/web/client-metrics.ts:1721](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/metrics/web/client-metrics.ts#L1721)
- Handlers: 1 · Callers: 0
- Arguments: `<checkout-a>` `<checkout-b>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--cases` | `string` |  | `` |  |
| `--floors` | `string` | yes |  | Floors file from `noise --out`; its metrics gate on calibrated floors. |
| `--long-turns` | `number` |  | `12` | Turns in the long thread, each a heavy recorded turn. |
| `--out-dir` | `string` |  | `client-metrics-ab` | Directory for a.json and b.json. |
| `--renders` | `boolean` |  | `false` | Count React commits and component renders per measured step and per window that samples renderer CPU while a thread streams, with their top components and caus… |
| `--rounds` | `number` |  | `3` | Rounds; each runs A and B once, alternating which goes first. |
| `--skip-build` | `boolean` |  | `false` | Serve the checkout's existing apps/web/dist instead of building it. |
| `--slot-diff` | `string` |  | `` | With --renders, comma-separated components whose changed hook slots are deep-diffed into renders.ndjson beside the output. |
| `--soak` | `number` |  | `0` | After measuring, repeat every case this many times in a second browser with V8's compiling tiers off (so compiled code does not read as a leak) and record heap… |
| `--switch-rounds` | `number` |  | `4` | Rounds over every case per run: a switch's first round is its first visit, the rest revisits. |
| `--threshold` | `number` |  | `10` | Percent a metric must move, past its floor, to count. |
| `--trace` | `boolean` |  | `false` | Trace one extra round with a CPU profile: per step, the input task's forced style and layout and its JS by source file and library, and the long tasks after it… |
| `--unminified` | `boolean` |  | `false` | Build without minification (sourcemaps kept), so render counts and profiles name components. Slower than production; compare like with like. |


<a id="cli-command-client-metrics-compare"></a>

## `client-metrics compare`

Markdown table of two result files, lower is better. Each run's median is one sample; with 2+ runs a side, a metric counts only when the 95% bootstrap interval of the median difference across runs clears the threshold and its floor (calibrated with --floors, else a default). One run a side is shown, not gated. Exits 1 on a regression.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/metrics/web/client-metrics.ts:1817](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/metrics/web/client-metrics.ts#L1817)
- Handlers: 1 · Callers: 0
- Arguments: `<before>` `<after>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--floors` | `string` | yes |  | Floors file from `noise --out`; its metrics gate on calibrated floors. |
| `--threshold` | `number` |  | `10` | Percent a metric must move, past its floor, to count. |


<a id="cli-command-client-metrics-noise"></a>

## `client-metrics noise`

Spread of every metric over A/A runs (`ab <same> <same>`): the 95% interval of the median difference, a calibrated floor covering it, and whether the metric is steady enough to gate on. ⚠ marks a floor above the default. --out writes the floors for compare.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/metrics/web/client-metrics.ts:1840](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/metrics/web/client-metrics.ts#L1840)
- Handlers: 1 · Callers: 0
- Arguments: `<dir>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--out` | `string` | yes |  | Floors file to write, for `compare --floors` and `ab --floors`. |


<a id="cli-command-client-metrics-run"></a>

## `client-metrics run`

Build a checkout's web app, seed a server with replayed threads, a large diff, a pull request on a fake GitHub and a local page, and measure thread switches, interactions, memory and renderer CPU in headless Chromium.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/metrics/web/client-metrics.ts:1669](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/metrics/web/client-metrics.ts#L1669)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--cases` | `string` |  | `` |  |
| `--checkout` | `string` | yes |  | Checkout to measure, with dependencies installed. |
| `--long-turns` | `number` |  | `12` | Turns in the long thread, each a heavy recorded turn. |
| `--out` | `string` | yes |  | JSON file to write. |
| `--renders` | `boolean` |  | `false` | Count React commits and component renders per measured step and per window that samples renderer CPU while a thread streams, with their top components and caus… |
| `--skip-build` | `boolean` |  | `false` | Serve the checkout's existing apps/web/dist instead of building it. |
| `--slot-diff` | `string` |  | `` | With --renders, comma-separated components whose changed hook slots are deep-diffed into renders.ndjson beside the output. |
| `--soak` | `number` |  | `0` | After measuring, repeat every case this many times in a second browser with V8's compiling tiers off (so compiled code does not read as a leak) and record heap… |
| `--switch-rounds` | `number` |  | `4` | Rounds over every case per run: a switch's first round is its first visit, the rest revisits. |
| `--trace` | `boolean` |  | `false` | Trace one extra round with a CPU profile: per step, the input task's forced style and layout and its JS by source file and library, and the long tasks after it… |
| `--unminified` | `boolean` |  | `false` | Build without minification (sourcemaps kept), so render counts and profiles name components. Slower than production; compare like with like. |


<a id="cli-command-client-metrics-summary"></a>

## `client-metrics summary`

Print a result file's tables.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/metrics/web/client-metrics.ts:1906](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/metrics/web/client-metrics.ts#L1906)
- Handlers: 1 · Callers: 0
- Arguments: `<file>`

<a id="cli-command-dev-runner"></a>

## `dev-runner`

Run monorepo development modes with deterministic port/env wiring.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/dev-runner.ts:1008](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/dev-runner.ts#L1008)
- Handlers: 1 · Callers: 0
- Arguments: `<mode>` `<run-arg>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--auto-bootstrap-project-from-cwd` | `boolean` |  |  | Auto-bootstrap toggle (equivalent to T3CODE_AUTO_BOOTSTRAP_PROJECT_FROM_CWD). |
| `--browser` | `boolean` |  | `false` | Open a browser automatically (disabled by default for web dev). |
| `--built` | `boolean` |  | `false` | With --share: serve a production web build from the backend instead of the Vite dev server. Rebuilds on change, no HMR, much smaller remote loads. |
| `--dev-url` | `string` | yes |  | Explicit web dev URL override (forwards to VITE_DEV_SERVER_URL). Ambient VITE_DEV_SERVER_URL values are ignored so a parent dev app cannot redirect the child r… |
| `--dry-run` | `boolean` |  | `false` | Resolve mode/ports/env and print, but do not spawn Vite+. |
| `--home-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). Inside a git worktree this defaults to that worktree's own… |
| `--host` | `string` | yes |  | Server host/interface override (forwards to T3CODE_HOST). Ambient T3CODE_HOST is ignored: agent shells inherit it from the T3 server that spawned them. |
| `--log-websocket-events` | `boolean` |  |  | WebSocket event logging toggle (equivalent to T3CODE_LOG_WS_EVENTS). |
| `--memory-limit-gb` | `number` | yes |  | Stop the dev server when it and its child processes use more than this many GiB of RAM plus swap (equivalent to T3CODE_DEV_MEMORY_LIMIT_GB). Defaults to half o… |
| `--port` | `number` | yes |  | Server port override (forwards to T3CODE_PORT). Ambient T3CODE_PORT is ignored: agent shells inherit it from the T3 server that spawned them. |
| `--seed` | `boolean` |  |  | Seed an empty worktree database from ~/.t3 on first start (read-only, via migrate-dev-db) if the source is at most 500 MiB. On by default; --no-seed or T3CODE_… |
| `--share` | `boolean` |  | `false` | Publish the web dev server on this machine's tailnet over HTTPS (via `tailscale serve`) and print the pairing URL for it. Removed again on exit. |


<a id="cli-command-export-brand-icons"></a>

## `export-brand-icons`

Export development, preview, and production assets from Icon Composer projects.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/export-brand-icons.ts:772](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/export-brand-icons.ts#L772)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--check` | `boolean` |  | `false` | Verify generated icon assets without modifying files. |


<a id="cli-command-generate"></a>

## `generate`

Generate Effect ACP schemas from the pinned ACP release assets.

- Kind: cli-command
- Workspace: [effect-acp](../architecture/effect-acp.md)
- Source: [packages/effect-acp/scripts/generate.ts:601](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/packages/effect-acp/scripts/generate.ts#L601)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--only` | `string` |  | `all` |  |
| `--skip-download` | `boolean` |  | `false` |  |


<a id="cli-command-generate-release-notes"></a>

## `generate-release-notes`

Write release notes with a model summary over GitHub's full list.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/generate-release-notes.ts:327](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/generate-release-notes.ts#L327)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--output` | `string` | yes |  | File to write the notes to. |
| `--previous-tag` | `string` | yes |  | Previous release tag. |
| `--ref` | `string` | yes |  | Commit being released. |
| `--repository` | `string` | yes |  | GitHub owner/name. |
| `--tag` | `string` | yes |  | Tag being released. |
| `--version` | `string` | yes |  | Version shown in the header. |


<a id="cli-command-knip-check"></a>

## `knip-check`

Report unused files, dependencies and exports.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/knip-check.ts:180](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/knip-check.ts#L180)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--cwd` | `string` | yes |  | Project to check instead of this repository. |


<a id="cli-command-merge-release-update-manifests"></a>

## `merge-release-update-manifests`

Require and merge complete arm64/x64 desktop updater manifest pairs.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/merge-release-update-manifests.ts:120](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/merge-release-update-manifests.ts#L120)
- Handlers: 1 · Callers: 0
- Arguments: `<release-assets-dir>`

<a id="cli-command-merge-update-manifests"></a>

## `merge-update-manifests`

Merge two Electron updater manifests into a multi-arch manifest.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/merge-update-manifests.ts:79](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/merge-update-manifests.ts#L79)
- Handlers: 1 · Callers: 0
- Arguments: `<primary-path>` `<secondary-path>` `<output-path>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--platform` | `string` | yes |  | Update manifest platform. |


<a id="cli-command-migrate-dev-db"></a>

## `migrate-dev-db`

Rebuild the worktree dev database from a pruned snapshot of the real ~/.t3 data, then run migrations.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/scripts/migrate-dev-db.ts:767](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/scripts/migrate-dev-db.ts#L767)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Isolated .t3 directory. Defaults to the current worktree's .t3. |
| `--drop-resumable` | `string` | yes |  | Only drop, in place, the thread families a server started on this database would resume, and fail if any remain. Copies only; never the live database. |
| `--projects` | `number` |  | `5` | How many recently updated projects to keep. |
| `--source` | `string` | yes |  | Source database. Defaults to ~/.t3/userdata/statev2.sqlite. |
| `--threads-per-project` | `number` |  | `10` | How many recent stopped threads, with their forks and subagents, to keep per project. A family with more threads than this is skipped. |


<a id="cli-command-mobile-audit"></a>

## `mobile-audit`

Capture, diff, and visualize mobile accessibility audits.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/mobile-audit.ts:473](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/mobile-audit.ts#L473)
- Handlers: 0 · Callers: 0

<a id="cli-command-mobile-audit-capture"></a>

## `mobile-audit capture`

Capture a screenshot, native agent-device audit JSON, and raw accessibility snapshot.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/mobile-audit.ts:404](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/mobile-audit.ts#L404)
- Handlers: 1 · Callers: 0
- Arguments: `<agent-device-arg>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--agent-device` | `string` | yes |  | Optional path to an agent-device launcher; defaults to the workspace CLI. |
| `--out` | `string` | yes |  | Directory to write captured artifacts. |
| `--platform` | `string` | yes |  | Target mobile platform (ios or android). |
| `--screen` | `string` | yes |  | Screen identifier for output files. |


<a id="cli-command-mobile-audit-compare"></a>

## `mobile-audit compare`

Diff two audit capture directories and render annotated side-by-side PNGs and Markdown.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/mobile-audit.ts:430](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/mobile-audit.ts#L430)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--after` | `string` | yes |  | Candidate capture directory. |
| `--after-label` | `string` |  | `AFTER (head)` | Banner label for the after panel. |
| `--all` | `boolean` |  | `false` | Render comparison PNGs even for screens with no delta. |
| `--before` | `string` | yes |  | Baseline capture directory. |
| `--before-label` | `string` |  | `BEFORE (base)` | Banner label for the before panel. |
| `--fail-on-regression` | `boolean` |  | `false` | Exit non-zero if any screen introduces new findings. |
| `--out` | `string` | yes |  | Output directory for diff.json, report.md, and comparison PNGs. |


<a id="cli-command-mobile-audit-report"></a>

## `mobile-audit report`

Annotate a single audit capture directory with hit-box overlays.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/mobile-audit.ts:462](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/mobile-audit.ts#L462)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--dir` | `string` | yes |  | Capture directory to annotate. |
| `--out` | `string` | yes |  | Output directory for report.md and annotated PNGs. |


<a id="cli-command-mobile-behavior"></a>

## `mobile-behavior`

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/mobile-behavior/run.ts:33](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/mobile-behavior/run.ts#L33)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--agent-device` | `string` |  |  |  |
| `--baseline` | `string` | yes |  | results.jsonl from an earlier run to compare against. |
| `--case` | `string` | yes |  | Comma-separated case ids. |
| `--device` | `string` |  | `` | Simulator UDID; leave out for a Simlock lease, whose gateway picks it. |
| `--device-config` | `string` | yes |  | The --config path device_open returned for this device. |
| `--device-name` | `string` |  | `` | Simulator name as Metro lists it, e.g. "iPhone 17 Pro". Leave out when this run's Metro serves one device. |
| `--device-session` | `string` | yes |  | The --session name device_open returned for this device. |
| `--forget-other-environments` | `boolean` |  | `false` | Remove the app's other saved environments first. Only for a simulator kept for this eval. |
| `--host` | `string` | yes |  | Address the simulator uses to reach this machine; defaults to the tailnet IP. |
| `--label` | `string` | yes |  | Column name in the scoreboard; defaults to the pose. |
| `--out` | `string` | yes |  | Directory for results and run state. |
| `--pose` | `string` |  | `phone` |  |
| `--samples` | `number` |  | `3` |  |


<a id="cli-command-mobile-metrics"></a>

## `mobile-metrics`

Measure the iOS app on a Simlock simulator with mobile:behavior's server, Metro and behavior probe. Needs SIMLOCK_AGENT_DEVICE_URL and AGENT_DEVICE_DAEMON_AUTH_TOKEN. Cases (real taps, swipes and typing through agent-device): switch-short, switch-long Tap a Home row: tap to the frame showing the thread's rows. switch-working A thread streaming a reply, opened twice; each round starts and stops its own. tabs PRs, Usage, then Chats in the tab bar. pull-request The PR list, then the branch PR (40 files, long body, comments; fake GitHub). issues The issues list, which shares the PR tab's slot. diff A thread's git menu, then Review changes on the 40-file branch. side-chat A thread's side chat chip. type Keys typed into a composer, each to its next JS frame. scroll-long Drag up through the long timeline: JS and UI frame drops. scroll-home Scroll the chat list after seeding 60 extra threads. fling-home Repeat four closely spaced swipes across the same populated list. `--build dev` (the default) runs the development bundle: render and commit counts and A/B differences are representative, absolute times and heap growth are not. `--build release` runs the production bundle as Hermes bytecode: real times and a flat heap, but no commit ms, no `--renders`, and minified component names in soak retention. Soak in release. Trust a change only from `ab` on one simulator model and build.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/metrics/mobile/mobile-metrics.ts:780](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/metrics/mobile/mobile-metrics.ts#L780)
- Handlers: 0 · Callers: 0

<a id="cli-command-mobile-metrics-ab"></a>

## `mobile-metrics ab`

Run two checkouts alternately (A B, then B A) on one device and compare them. The harness, server and seed come from this script; each side's Metro serves its own app.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/metrics/mobile/mobile-metrics.ts:634](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/metrics/mobile/mobile-metrics.ts#L634)
- Handlers: 1 · Callers: 0
- Arguments: `<checkout-a>` `<checkout-b>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--ab-rounds` | `number` |  | `2` | App launches a side; each round runs A and B once, alternating which goes first. |
| `--build` | `string` |  | `dev` | dev runs the development bundle; release runs the production bundle as Hermes bytecode on the same dev client (compiling takes a few minutes per launch). Soak … |
| `--cases` | `string` |  | `` |  |
| `--device` | `string` |  | `iPhone 18 Pro` | Simlock iOS model to lease; compare only runs on one model. |
| `--device-target` | `string` | yes |  | JSON with command and targetArgs from device_open for a simulator or emulator. Install the dev client first; both A/B checkouts must share its native fingerpri… |
| `--floors` | `string` | yes |  | Floors file from `noise --out`. |
| `--forget-other-environments` | `boolean` |  | `false` | Clear saved connections and cached threads from an attached disposable device. |
| `--host` | `string` | yes |  | Address the simulator reaches this machine on; defaults to the tailnet IP. |
| `--long-turns` | `number` |  | `40` | Turns in the long settled thread. |
| `--out-dir` | `string` |  | `mobile-metrics-ab` |  |
| `--platform` | `string` |  | `ios` | Device platform. Android requires an attached emulator and a development bundle. |
| `--renders` | `boolean` |  | `false` | Count component renders and their causes per step with the render counter. It slows commits; compare like with like. |
| `--rounds` | `number` |  | `3` | Rounds over every case per app launch; a switch's first round is its first visit. |
| `--soak` | `number` |  | `0` | After the rounds, repeat the switch cases this many times, sampling the Hermes heap and process memory after each, with growth per iteration. |
| `--threshold` | `number` |  | `10` | Percent a metric must move, past its floor, to count. |


<a id="cli-command-mobile-metrics-compare"></a>

## `mobile-metrics compare`

Markdown table of two result files, gated like client-metrics: each app launch's median is one sample, and a metric counts only with 2+ launches a side when its bootstrap interval clears the threshold and floor. Exits 1 on a regression.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/metrics/mobile/mobile-metrics.ts:706](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/metrics/mobile/mobile-metrics.ts#L706)
- Handlers: 1 · Callers: 0
- Arguments: `<before>` `<after>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--floors` | `string` | yes |  | Floors file from `noise --out`. |
| `--threshold` | `number` |  | `10` | Percent a metric must move, past its floor, to count. |


<a id="cli-command-mobile-metrics-noise"></a>

## `mobile-metrics noise`

Each metric's A/A spread and a floor for `compare --floors`.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/metrics/mobile/mobile-metrics.ts:728](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/metrics/mobile/mobile-metrics.ts#L728)
- Handlers: 1 · Callers: 0
- Arguments: `<dir>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--out` | `string` | yes |  | Floors file to write. |


<a id="cli-command-mobile-metrics-run"></a>

## `mobile-metrics run`

Use an attached device or lease an iOS simulator from Simlock, seed a server (replayed threads, a 40-file branch with a PR on a fake GitHub), open a checkout's dev client and measure each case.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/metrics/mobile/mobile-metrics.ts:578](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/metrics/mobile/mobile-metrics.ts#L578)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--build` | `string` |  | `dev` | dev runs the development bundle; release runs the production bundle as Hermes bytecode on the same dev client (compiling takes a few minutes per launch). Soak … |
| `--cases` | `string` |  | `` |  |
| `--checkout` | `string` |  |  | Checkout whose app Metro serves, with dependencies installed. |
| `--device` | `string` |  | `iPhone 18 Pro` | Simlock iOS model to lease; compare only runs on one model. |
| `--device-target` | `string` | yes |  | JSON with command and targetArgs from device_open for a simulator or emulator. Install the dev client first; both A/B checkouts must share its native fingerpri… |
| `--forget-other-environments` | `boolean` |  | `false` | Clear saved connections and cached threads from an attached disposable device. |
| `--host` | `string` | yes |  | Address the simulator reaches this machine on; defaults to the tailnet IP. |
| `--long-turns` | `number` |  | `40` | Turns in the long settled thread. |
| `--out` | `string` |  | `mobile-metrics.json` | JSON file to write. |
| `--platform` | `string` |  | `ios` | Device platform. Android requires an attached emulator and a development bundle. |
| `--renders` | `boolean` |  | `false` | Count component renders and their causes per step with the render counter. It slows commits; compare like with like. |
| `--rounds` | `number` |  | `3` | Rounds over every case per app launch; a switch's first round is its first visit. |
| `--soak` | `number` |  | `0` | After the rounds, repeat the switch cases this many times, sampling the Hermes heap and process memory after each, with growth per iteration. |


<a id="cli-command-mobile-metrics-summary"></a>

## `mobile-metrics summary`

Print a result file's tables.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/metrics/mobile/mobile-metrics.ts:772](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/metrics/mobile/mobile-metrics.ts#L772)
- Handlers: 1 · Callers: 0
- Arguments: `<file>`

<a id="cli-command-mobile-native-client"></a>

## `mobile-native-client`

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/mobile-native-client.ts:1430](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/mobile-native-client.ts#L1430)
- Handlers: 1 · Callers: 0
- Arguments: `<mode>` `<platform>` `<device>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--abi` | `string` |  | `x86_64` | Android ABI of the session's device (default x86_64). |
| `--app` | `string` |  | `expo` | Which client: apps/mobile (expo) or apps/mobile-nitro (nitro). |
| `--config` | `string` | yes |  | With --session, the agent-device config the session was opened with (T3 Code's device_open returns it in targetArgs). Needed for a device pool behind a gateway. |
| `--expect-fingerprint` | `string` | yes |  | With --prepare, fail before building unless the checkout's native fingerprint is this one. |
| `--metro` | `string` | yes |  | With --session, open the dev client against this Metro URL. |
| `--prepare` | `boolean` |  | `false` | Fetch or build the client for this checkout without a device (Android: for --abi). Run it before leasing a device: a build can outlast the lease. |
| `--session` | `string` | yes |  | Install into this already-open agent-device session (a device pool, cloud, or remote host) instead of a local device. |


<a id="cli-command-mobile-native-static-check"></a>

## `mobile-native-static-check`

Run mobile native static analysis. SwiftLint may be skipped when unavailable; ktlint and detekt are required when Kotlin sources exist.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/mobile-native-static-check.ts:305](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/mobile-native-static-check.ts#L305)
- Handlers: 1 · Callers: 0

<a id="cli-command-notify-discord-release"></a>

## `notify-discord-release`

Post a T3 Code release announcement to Discord.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/notify-discord-release.ts:323](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/notify-discord-release.ts#L323)
- Handlers: 1 · Callers: 0
- Arguments: `<target>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--release-name` | `string` | yes |  | Human-readable release name. |
| `--release-notes-file` | `string` | yes |  | File containing the published GitHub release notes. |
| `--release-url` | `string` | yes |  | Public GitHub release URL. |
| `--release-version` | `string` | yes |  | Release version. |
| `--role-id` | `string` | yes |  | Discord role ID to mention in the release announcement. |
| `--tag` | `string` | yes |  | Git tag for the release. |


<a id="cli-command-prove-scenario"></a>

## `prove-scenario`

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/prove-scenario.ts:343](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/prove-scenario.ts#L343)
- Handlers: 1 · Callers: 0
- Arguments: `<scenario>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base` | `string` | yes |  | Commit the bug shows on. |
| `--head` | `string` |  | `HEAD` | Commit with the fix. |
| `--target` | `string` | yes |  | Target to run on: web or ios. Default: ios when the scenario imports t3-mobile.ts, else web. |
| `--upload-command` | `string` | yes |  | Command that takes capture paths and prints one URL per line. |


<a id="cli-command-record-cursor-agent-sdk-replay-fixture"></a>

## `record-cursor-agent-sdk-replay-fixture`

Record a Cursor Agent SDK replay fixture live. Reads CURSOR_API_KEY, plus optional T3_CURSOR_REPLAY_MODEL and T3_CURSOR_REPLAY_CWD.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/scripts/record-cursor-agent-sdk-replay-fixture.ts:202](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/scripts/record-cursor-agent-sdk-replay-fixture.ts#L202)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--out` | `string` | yes |  | Write the transcript here instead of over the checked-in fixture. |
| `--scenario` | `string` | yes |  | Scenario to record (or T3_CURSOR_REPLAY_SCENARIO). |


<a id="cli-command-resolve-nightly-release"></a>

## `resolve-nightly-release`

Resolve nightly release version metadata.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/resolve-nightly-release.ts:195](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/resolve-nightly-release.ts#L195)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--channel` | `string` |  | `nightly` | Prerelease channel whose identifier the version carries. |
| `--date` | `string` | yes |  | Nightly build date in YYYYMMDD. |
| `--github-output` | `boolean` |  | `false` | Write values to GITHUB_OUTPUT instead of stdout. |
| `--root` | `string` | yes |  | Workspace root used to resolve apps/desktop/package.json. |
| `--run-number` | `string` | yes |  | GitHub Actions run number. |
| `--sha` | `string` | yes |  | Commit sha for the nightly build. |


<a id="cli-command-resolve-previous-release-tag"></a>

## `resolve-previous-release-tag`

Resolve the previous release tag for a stable or nightly series.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/resolve-previous-release-tag.ts:336](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/resolve-previous-release-tag.ts#L336)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--channel` | `string` | yes |  | Release channel whose previous tag should be resolved. |
| `--current-tag` | `string` | yes |  | Current release tag to compare against. |
| `--github-output` | `boolean` |  | `false` | Write values to GITHUB_OUTPUT instead of stdout. |


<a id="cli-command-server-metrics"></a>

## `server-metrics`

Measure the server process against a fake Anthropic API and the real claude CLI, on Linux, macOS and Windows. Which scenario answers what: working Many threads editing files at once, one client watching all: steer performance work by its loop delay, turn end and turns per minute. pipeline One thread's overhead per turn: send to API request, reply end to run end. clients What an attached client costs, and a user's 3 devices reconnecting. --stress adds the 20-client storm, an upper bound. quiet Idle cost per open thread (the scaling fit); rest is an idle server. streaming CPU and loop delay while 5 replies stream. firstWord A new thread's time to the API; startup is time to the first answer. Latency on a shared machine is noisy. busy Opt-in: a copy of your real database, read-only, for costs an empty one hides. Trust a change only from `ab` on one machine. compare gates on floors measured from A/A runs (`noise`), shows metrics too noisy to gate on without counting them, and warns when other processes loaded the machine; rerun then. --quick suits a per-PR or nightly check; decide on full runs.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/metrics/server/server-metrics.ts:2449](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/metrics/server/server-metrics.ts#L2449)
- Handlers: 0 · Callers: 0

<a id="cli-command-server-metrics-ab"></a>

## `server-metrics ab`

Run two checkouts alternately on this machine and compare them. Each needs its dependencies installed; the harness comes from this script, so an old release works too.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/metrics/server/server-metrics.ts:2328](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/metrics/server/server-metrics.ts#L2328)
- Handlers: 1 · Callers: 0
- Arguments: `<checkout-a>` `<checkout-b>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--busy-ballast-mb` | `number` |  | `768` | busy: MB the server retains off-heap, so its RSS matches a server open for days. A seeded database alone keeps RSS near 0.5 GB. |
| `--busy-projects` | `number` |  | `10` | busy: projects to keep from the real database, each backed by a clone. |
| `--busy-threads` | `number` |  | `200` | busy: stopped threads to keep per project. |
| `--no-agent-scope` | `boolean` |  | `false` | Linux only: start the server without XDG_RUNTIME_DIR, so it takes the no-agent-scope path macOS and Windows always take. |
| `--only` | `string` | yes |  |  |
| `--out-dir` | `string` |  | `server-metrics-ab` | Directory for a.json and b.json. |
| `--quick` | `boolean` |  | `false` | Shorter windows, fewer turns and fewer points (about a third of the time), for a per-PR or nightly check. Compare quick runs only with quick runs. |
| `--rounds` | `number` |  | `3` | Rounds; each runs A and B once, alternating which goes first. |
| `--runs` | `number` | yes |  | firstWord runs in each variant. Default 5, 3 with --quick. |
| `--seed-dir` | `string` | yes |  | busy: a base dir `vp run migrate-dev-db --base-dir <dir>` already seeded, instead of seeding each checkout on every invocation. |
| `--soak` | `number` |  | `0` | Minutes of soak: 10 threads under one web client, a short turn every 30 s in a project with 3,000 loose remote refs that gains one per turn. From minute 2, eve… |
| `--stress` | `boolean` |  | `false` | Also run upper bounds no user hits daily: clients drops 20 clients at once and reconnects them. Compare stress numbers only with stress numbers. |
| `--threads` | `string` | yes |  | Open thread counts the quiet and clients scenarios measure. Default 0,5,10,20; 0,10 with --quick. |
| `--threshold` | `number` |  | `10` | Percent a metric must move, past its noise floor, to count. |


<a id="cli-command-server-metrics-compare"></a>

## `server-metrics compare`

Markdown table of two result files, lower is better. With 2+ runs a side, a metric counts only when the 95% bootstrap interval of the median difference clears the threshold and its noise floor, measured from A/A runs (see `noise`). Metrics too noisy to gate on are shown but never counted. Warns when either side ran under heavy machine load. Exits 1 on a regression.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/metrics/server/server-metrics.ts:2384](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/metrics/server/server-metrics.ts#L2384)
- Handlers: 1 · Callers: 0
- Arguments: `<before>` `<after>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--threshold` | `number` |  | `10` | Percent a metric must move, past its noise floor, to count. |


<a id="cli-command-server-metrics-noise"></a>

## `server-metrics noise`

Spread of every metric over A/A runs (`ab <same> <same>`), an estimated floor covering the half ranges and median differences these runs showed, and which metrics are too noisy to gate on. ⚠ marks a current floor under the estimate. Refuses directories whose two files record different commits.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/metrics/server/server-metrics.ts:2403](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/metrics/server/server-metrics.ts#L2403)
- Handlers: 1 · Callers: 0
- Arguments: `<dir>`

<a id="cli-command-server-metrics-run"></a>

## `server-metrics run`

Measure a checkout's server: startup, rest and first word on one server, then quiet threads (with their cost per thread), clients, many threads working, the turn pipeline, streaming and an optional soak on servers of their own. Needs the real claude CLI on PATH; on Windows the native claude.exe from claude.ai/install.ps1, since an npm claude.cmd shim cannot be started without a shell.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/metrics/server/server-metrics.ts:2279](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/metrics/server/server-metrics.ts#L2279)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--busy-ballast-mb` | `number` |  | `768` | busy: MB the server retains off-heap, so its RSS matches a server open for days. A seeded database alone keeps RSS near 0.5 GB. |
| `--busy-projects` | `number` |  | `10` | busy: projects to keep from the real database, each backed by a clone. |
| `--busy-threads` | `number` |  | `200` | busy: stopped threads to keep per project. |
| `--checkout` | `string` | yes |  | Checkout whose server to measure, with dependencies installed. |
| `--no-agent-scope` | `boolean` |  | `false` | Linux only: start the server without XDG_RUNTIME_DIR, so it takes the no-agent-scope path macOS and Windows always take. |
| `--only` | `string` | yes |  |  |
| `--out` | `string` | yes |  | JSON file to write. |
| `--quick` | `boolean` |  | `false` | Shorter windows, fewer turns and fewer points (about a third of the time), for a per-PR or nightly check. Compare quick runs only with quick runs. |
| `--repeat` | `number` |  | `1` | Runs to record in one file. |
| `--runs` | `number` | yes |  | firstWord runs in each variant. Default 5, 3 with --quick. |
| `--seed-dir` | `string` | yes |  | busy: a base dir `vp run migrate-dev-db --base-dir <dir>` already seeded, instead of seeding each checkout on every invocation. |
| `--soak` | `number` |  | `0` | Minutes of soak: 10 threads under one web client, a short turn every 30 s in a project with 3,000 loose remote refs that gains one per turn. From minute 2, eve… |
| `--stress` | `boolean` |  | `false` | Also run upper bounds no user hits daily: clients drops 20 clients at once and reconnects them. Compare stress numbers only with stress numbers. |
| `--threads` | `string` | yes |  | Open thread counts the quiet and clients scenarios measure. Default 0,5,10,20; 0,10 with --quick. |


<a id="cli-command-smoke-cli-archive"></a>

## `smoke-cli-archive`

Extract a CLI archive and run its executable.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/smoke-cli-archive.ts:209](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/smoke-cli-archive.ts#L209)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--archive` | `string` | yes |  |  |
| `--expect-version` | `string` | yes |  |  |


<a id="cli-command-start-app"></a>

## `start-app`

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/scenarios/start-app.ts:232](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/scenarios/start-app.ts#L232)
- Handlers: 1 · Callers: 0
- Arguments: `<surface>` `<t3-home>` `<port>`

<a id="cli-command-sync-reference-repos"></a>

## `sync-reference-repos`

Sync vendored reference repositories under .repos/.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/sync-reference-repos.ts:346](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/sync-reference-repos.ts#L346)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--dry-run` | `boolean` |  | `false` | Print the planned syncs without cloning or committing. |
| `--latest` | `boolean` |  | `false` | Sync each repo from its latest branch instead of the installed version. |
| `--repo` | `string` | yes |  | Sync only the named reference repo. Defaults to all configured repos. |
| `--root` | `string` | yes |  | Workspace root used to resolve versions and .repos/ prefixes. |


<a id="cli-command-t3"></a>

## `t3`

Run T3 Code in this terminal and open it in your browser. To use it from your other devices, run `t3 up`.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/binCli.ts:73](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/binCli.ts#L73)
- Handlers: 1 · Callers: 0
- Arguments: `<cwd>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--auto-bootstrap-project-from-cwd` | `boolean` |  |  | Create a project for the current working directory on startup when missing. |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--bootstrap-fd` | `number` | yes |  | Read one-time bootstrap secrets from the given file descriptor. |
| `--dev-url` | `string` | yes |  | Dev web URL to proxy/redirect to (equivalent to VITE_DEV_SERVER_URL). |
| `--host` | `string` | yes |  | Host/interface to bind (for example 127.0.0.1, 0.0.0.0, or a Tailnet IP). |
| `--lan` | `boolean` |  |  | Accept connections from your local network and tailnet, not only this machine (equivalent to T3CODE_LAN). |
| `--log-websocket-events` | `boolean` |  |  | Emit server-side logs for outbound WebSocket push traffic (equivalent to T3CODE_LOG_WS_EVENTS). |
| `--mode` | `string` | yes |  | Runtime mode. `desktop` keeps loopback defaults unless overridden. |
| `--no-browser` | `boolean` |  |  | Disable automatic browser opening. |
| `--port` | `number` | yes |  | Port for the HTTP/WebSocket server. |
| `--tailscale-serve` | `boolean` |  |  | Configure Tailscale Serve to expose this backend over HTTPS on the Tailnet. |
| `--tailscale-serve-port` | `number` | yes |  | HTTPS port for Tailscale Serve when --tailscale-serve is enabled. |


<a id="cli-command-t3-__claude-history"></a>

## `t3 __claude-history`

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/claudeHistory.ts:5](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/claudeHistory.ts#L5)
- Handlers: 1 · Callers: 0
- Arguments: `<method>` `<session-id>` `<options>`

<a id="cli-command-t3-__service-launcher"></a>

## `t3 __service-launcher`

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/binCli.ts:105](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/binCli.ts#L105)
- Handlers: 1 · Callers: 0

<a id="cli-command-t3-__service-preflight"></a>

## `t3 __service-preflight`

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/servicePreflight.ts:7](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/servicePreflight.ts#L7)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--database-path` | `string` | yes |  |  |
| `--launcher-protocol` | `number` | yes |  |  |


<a id="cli-command-t3-__speech-worker"></a>

## `t3 __speech-worker`

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/speechWorker.ts:5](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/speechWorker.ts#L5)
- Handlers: 1 · Callers: 0
- Arguments: `<mode>` `<module-url>`

<a id="cli-command-t3-__ssh-helper"></a>

## `t3 __ssh-helper`

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/sshHelper.ts:197](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/sshHelper.ts#L197)
- Handlers: 0 · Callers: 0

<a id="cli-command-t3-__ssh-helper-home-owned"></a>

## `t3 __ssh-helper home-owned`

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/sshHelper.ts:185](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/sshHelper.ts#L185)
- Handlers: 1 · Callers: 0
- Arguments: `<base-dir>`

<a id="cli-command-t3-__ssh-helper-keep-server"></a>

## `t3 __ssh-helper keep-server`

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/sshHelper.ts:155](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/sshHelper.ts#L155)
- Handlers: 1 · Callers: 0
- Arguments: `<runtime-file>` `<pid>`

<a id="cli-command-t3-__ssh-helper-pick-port"></a>

## `t3 __ssh-helper pick-port`

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/sshHelper.ts:44](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/sshHelper.ts#L44)
- Handlers: 1 · Callers: 0
- Arguments: `<port-file>` `<default-port>` `<scan-window>`

<a id="cli-command-t3-__ssh-helper-runtime-port"></a>

## `t3 __ssh-helper runtime-port`

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/sshHelper.ts:108](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/sshHelper.ts#L108)
- Handlers: 1 · Callers: 0
- Arguments: `<runtime-file>`

<a id="cli-command-t3-__ssh-helper-update-remaining"></a>

## `t3 __ssh-helper update-remaining`

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/sshHelper.ts:169](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/sshHelper.ts#L169)
- Handlers: 1 · Callers: 0
- Arguments: `<marker-file>`

<a id="cli-command-t3-__ssh-helper-wait-ready"></a>

## `t3 __ssh-helper wait-ready`

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/sshHelper.ts:86](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/sshHelper.ts#L86)
- Handlers: 1 · Callers: 0
- Arguments: `<port>` `<timeout-ms>` `<probe-timeout-ms>`

<a id="cli-command-t3-acp-mcp-bridge"></a>

## `t3 acp-mcp-bridge`

Bridge T3 Code's MCP endpoint to stdio for ACP agents.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/acpMcpBridge.ts:7](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/acpMcpBridge.ts#L7)
- Handlers: 1 · Callers: 0

<a id="cli-command-t3-acp-mcp-call"></a>

## `t3 acp-mcp-call`

Call one T3 Code MCP tool from an ACP agent terminal.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/acpMcpBridge.ts:13](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/acpMcpBridge.ts#L13)
- Handlers: 1 · Callers: 0
- Arguments: `<tool>` `<arguments-json>`

<a id="cli-command-t3-app"></a>

## `t3 app`

Open a project in the running T3 Code desktop app.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/app.ts:272](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/app.ts#L272)
- Handlers: 1 · Callers: 0
- Arguments: `<path>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |


<a id="cli-command-t3-auth"></a>

## `t3 auth`

Manage the local auth control plane for headless deployments.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/auth.ts:383](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/auth.ts#L383)
- Handlers: 0 · Callers: 0

<a id="cli-command-t3-auth-connect-device"></a>

## `t3 auth connect-device`

Approve and revoke devices that reach this host through T3 Connect.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/auth.ts:284](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/auth.ts#L284)
- Handlers: 0 · Callers: 0

<a id="cli-command-t3-auth-connect-device-approve"></a>

## `t3 auth connect-device approve`

Approve the waiting T3 Connect device that shows this code.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/auth.ts:219](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/auth.ts#L219)
- Handlers: 1 · Callers: 0
- Arguments: `<code>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--dev-url` | `string` | yes |  | Dev web URL to proxy/redirect to (equivalent to VITE_DEV_SERVER_URL). |


<a id="cli-command-t3-auth-connect-device-list"></a>

## `t3 auth connect-device list`

List T3 Connect devices waiting for approval and those already trusted.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/auth.ts:192](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/auth.ts#L192)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--dev-url` | `string` | yes |  | Dev web URL to proxy/redirect to (equivalent to VITE_DEV_SERVER_URL). |
| `--json` | `boolean` |  | `false` | Emit JSON instead of human-readable output. |


<a id="cli-command-t3-auth-connect-device-revoke"></a>

## `t3 auth connect-device revoke`

Stop trusting a T3 Connect device and end its sessions.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/auth.ts:251](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/auth.ts#L251)
- Handlers: 1 · Callers: 0
- Arguments: `<code>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--dev-url` | `string` | yes |  | Dev web URL to proxy/redirect to (equivalent to VITE_DEV_SERVER_URL). |


<a id="cli-command-t3-auth-pairing"></a>

## `t3 auth pairing`

Manage one-time client pairing tokens.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/auth.ts:187](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/auth.ts#L187)
- Handlers: 0 · Callers: 0

<a id="cli-command-t3-auth-pairing-create"></a>

## `t3 auth pairing create`

Issue a new client pairing token.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/auth.ts:103](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/auth.ts#L103)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--base-url` | `string` | yes |  | Optional public base URL used to print a ready `/pair#token=...` link. |
| `--dev-url` | `string` | yes |  | Dev web URL to proxy/redirect to (equivalent to VITE_DEV_SERVER_URL). |
| `--json` | `boolean` |  | `false` | Emit JSON instead of human-readable output. |
| `--label` | `string` | yes |  | Optional human-readable label. |
| `--ttl` | `string` | yes |  | TTL, for example `5m`, `1h`, `30d`, or `15 minutes`. |


<a id="cli-command-t3-auth-pairing-list"></a>

## `t3 auth pairing list`

List active client pairing tokens without revealing their secrets.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/auth.ts:136](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/auth.ts#L136)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--dev-url` | `string` | yes |  | Dev web URL to proxy/redirect to (equivalent to VITE_DEV_SERVER_URL). |
| `--json` | `boolean` |  | `false` | Emit JSON instead of human-readable output. |


<a id="cli-command-t3-auth-pairing-revoke"></a>

## `t3 auth pairing revoke`

Revoke an active client pairing token.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/auth.ts:158](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/auth.ts#L158)
- Handlers: 1 · Callers: 0
- Arguments: `<id>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--dev-url` | `string` | yes |  | Dev web URL to proxy/redirect to (equivalent to VITE_DEV_SERVER_URL). |


<a id="cli-command-t3-auth-session"></a>

## `t3 auth session`

Manage bearer sessions.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/auth.ts:378](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/auth.ts#L378)
- Handlers: 0 · Callers: 0

<a id="cli-command-t3-auth-session-issue"></a>

## `t3 auth session issue`

Issue a scoped bearer access token for headless or remote clients.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/auth.ts:293](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/auth.ts#L293)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--dev-url` | `string` | yes |  | Dev web URL to proxy/redirect to (equivalent to VITE_DEV_SERVER_URL). |
| `--json` | `boolean` |  | `false` | Emit JSON instead of human-readable output. |
| `--label` | `string` | yes |  | Optional human-readable label. |
| `--subject` | `string` | yes |  | Optional session subject. |
| `--token-only` | `boolean` |  | `false` | Print only the issued bearer token. |
| `--ttl` | `string` | yes |  | TTL, for example `5m`, `1h`, `30d`, or `15 minutes`. |


<a id="cli-command-t3-auth-session-list"></a>

## `t3 auth session list`

List active sessions without revealing bearer tokens.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/auth.ts:328](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/auth.ts#L328)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--dev-url` | `string` | yes |  | Dev web URL to proxy/redirect to (equivalent to VITE_DEV_SERVER_URL). |
| `--json` | `boolean` |  | `false` | Emit JSON instead of human-readable output. |


<a id="cli-command-t3-auth-session-revoke"></a>

## `t3 auth session revoke`

Revoke an active session. A T3 Connect device's session takes the device's trust and other sessions with it; if approval for new devices is off, the device can connect again on its own.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/auth.ts:348](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/auth.ts#L348)
- Handlers: 1 · Callers: 0
- Arguments: `<session-id>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--dev-url` | `string` | yes |  | Dev web URL to proxy/redirect to (equivalent to VITE_DEV_SERVER_URL). |


<a id="cli-command-t3-browser"></a>

## `t3 browser`

Manage T3's headless browser on this host.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/browser.ts:263](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/browser.ts#L263)
- Handlers: 0 · Callers: 0

<a id="cli-command-t3-browser-setup"></a>

## `t3 browser setup`

Set up this Linux host for T3's browser: allow Chrome's sandbox and install its libraries and fonts.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/browser.ts:113](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/browser.ts#L113)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |


<a id="cli-command-t3-connect"></a>

## `t3 connect`

Set up T3 Connect for this machine. Same as `t3 up --connect`.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/up.ts:495](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/up.ts#L495)
- Handlers: 2 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--headless` | `boolean` |  | `false` | Sign in with a URL and code on any device. Automatic without a terminal or over SSH. |

- Used at: [apps/server/src/binCli.ts:57](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/binCli.ts#L57)

<a id="cli-command-t3-connect-link"></a>

## `t3 connect link`

Authorize this environment for T3 Connect on next start.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/connect.ts:630](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/connect.ts#L630)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--headless` | `boolean` |  | `false` | Sign in with a URL and code on any device. Automatic without a terminal or over SSH. |
| `--publish-only` | `boolean` |  | `false` | Link to publish agent activity only, with no managed tunnel. Reach this environment out of band (e.g. Tailscale). |


<a id="cli-command-t3-connect-login"></a>

## `t3 connect login`

Authorize the T3 Connect CLI without enabling remote access.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/connect.ts:612](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/connect.ts#L612)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--headless` | `boolean` |  | `false` | Sign in with a URL and code on any device. Automatic without a terminal or over SSH. |


<a id="cli-command-t3-connect-logout"></a>

## `t3 connect logout`

Disable T3 Connect and clear the stored CLI authorization.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/connect.ts:812](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/connect.ts#L812)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |


<a id="cli-command-t3-connect-publish"></a>

## `t3 connect publish`

Toggle publishing agent activity (push notifications and Live Activities) to your mobile clients.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/connect.ts:740](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/connect.ts#L740)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--disable` | `boolean` |  | `false` | Stop publishing agent activity to your mobile clients. |


<a id="cli-command-t3-connect-status"></a>

## `t3 connect status`

Show T3 Connect setup and check that other devices can reach this machine.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/connect.ts:666](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/connect.ts#L666)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--json` | `boolean` |  | `false` | Emit JSON instead of human-readable output. |


<a id="cli-command-t3-connect-unlink"></a>

## `t3 connect unlink`

Disable T3 Connect while retaining the stored authorization.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/connect.ts:803](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/connect.ts#L803)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |


<a id="cli-command-t3-doctor"></a>

## `t3 doctor`

Inspect this T3 Code data directory and repair it. Pauses and restarts the background service as needed.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/doctor.ts:195](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/doctor.ts#L195)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--dry-run` | `boolean` |  | `false` | Show the repairs without changing anything, even with --fix. |
| `--fix` | `boolean` |  | `false` | Apply the recommended repairs without prompting. |


<a id="cli-command-t3-environment"></a>

## `t3 environment`

Link other T3 Code environments, so agents here can work there.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/environment.ts:320](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/environment.ts#L320)
- Handlers: 0 · Callers: 0

<a id="cli-command-t3-environment-link"></a>

## `t3 environment link`

Link another T3 Code environment, so agents here can work there. It shows up there under Authorized clients in Settings → Sharing & access, where it can be revoked.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/environment.ts:208](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/environment.ts#L208)
- Handlers: 1 · Callers: 0
- Arguments: `<url>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--access` | `string` |  | `approval-required` | What this environment's agents may do there: read-only, or the broadest runtime mode. |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--dev-url` | `string` | yes |  | Dev web URL to proxy/redirect to (equivalent to VITE_DEV_SERVER_URL). |
| `--from` | `string` | yes |  | Link several environments: a file with one `<url> <pairing-code>` per line, or - for stdin. Environments already linked are left as they are. |
| `--pairing-code` | `string` | yes |  | A pairing code from the other environment (`t3 pair` there). |
| `--url` | `string[]` | yes |  | Another address for the same environment, tried after the first. |


<a id="cli-command-t3-environment-list"></a>

## `t3 environment list`

List linked environments and whether each answers now.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/environment.ts:279](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/environment.ts#L279)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--dev-url` | `string` | yes |  | Dev web URL to proxy/redirect to (equivalent to VITE_DEV_SERVER_URL). |
| `--json` | `boolean` |  | `false` | Emit JSON instead of human-readable output. |


<a id="cli-command-t3-environment-unlink"></a>

## `t3 environment unlink`

Forget a linked environment here, and end its session there when that environment answers.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/environment.ts:294](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/environment.ts#L294)
- Handlers: 1 · Callers: 0
- Arguments: `<environment-id>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--dev-url` | `string` | yes |  | Dev web URL to proxy/redirect to (equivalent to VITE_DEV_SERVER_URL). |


<a id="cli-command-t3-feedback"></a>

## `t3 feedback`

Send feedback about T3 Code to the T3 team. Needs Agent feedback set to Automatic in Settings > Labs; to approve a report first, ask your agent in a thread.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/feedback.ts:123](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/feedback.ts#L123)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--actual` | `string` | yes |  | What happened instead. |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--expected` | `string` | yes |  | What you expected. |
| `--kind` | `string` | yes |  | What went wrong. |
| `--subject` | `string` | yes |  | The T3 tool name, t3 command such as `t3 thread send`, or `general`. |
| `--workaround` | `string` |  | `` | What you did instead. |


<a id="cli-command-t3-feedback-list"></a>

## `t3 feedback list`

List recent feedback reports saved on this machine, newest first.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/feedback.ts:78](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/feedback.ts#L78)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--dev-url` | `string` | yes |  | Dev web URL to proxy/redirect to (equivalent to VITE_DEV_SERVER_URL). |
| `--json` | `boolean` |  | `false` | Print JSON instead of text. |


<a id="cli-command-t3-help"></a>

## `t3 help`

Show command help.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/binCli.ts:79](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/binCli.ts#L79)
- Handlers: 1 · Callers: 0

<a id="cli-command-t3-install"></a>

## `t3 install`

Install this version as the `t3` command.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/install.ts:233](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/install.ts#L233)
- Handlers: 1 · Callers: 0

<a id="cli-command-t3-pair"></a>

## `t3 pair`

Mint a pairing token for a running T3 Code server and print it as a QR code.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/pair.ts:531](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/pair.ts#L531)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--label` | `string` | yes |  | Optional label shown in the server's connections list. |
| `--tailscale` | `boolean` |  | `false` | Publish the server over Tailscale Serve HTTPS and pair through the tailnet URL. |
| `--tailscale-serve-port` | `number` |  | `443` | HTTPS port for Tailscale Serve when --tailscale is enabled. |
| `--ttl` | `string` | yes |  | Token TTL, for example `5m`, `1h`, or `15 minutes`. Defaults to 5 minutes. |


<a id="cli-command-t3-policy"></a>

## `t3 policy`

Inspect the administrator's managed policy.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/policy.ts:190](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/policy.ts#L190)
- Handlers: 0 · Callers: 0

<a id="cli-command-t3-policy-check"></a>

## `t3 policy check`

Validate a policy file before deploying it.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/policy.ts:93](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/policy.ts#L93)
- Handlers: 1 · Callers: 0
- Arguments: `<file>`

<a id="cli-command-t3-policy-settings"></a>

## `t3 policy settings`

List the settings a policy can manage, with their defaults.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/policy.ts:185](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/policy.ts#L185)
- Handlers: 1 · Callers: 0

<a id="cli-command-t3-policy-show"></a>

## `t3 policy show`

Show the policy installed on this machine, and whether the running server loaded it.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/policy.ts:71](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/policy.ts#L71)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |


<a id="cli-command-t3-policy-templates"></a>

## `t3 policy templates`

Write the Windows Group Policy template and a macOS configuration profile.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/policy.ts:119](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/policy.ts#L119)
- Handlers: 1 · Callers: 0
- Arguments: `<directory>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--policy` | `string` | yes |  | Policy file to put in the macOS profile. Default: a small sample. |


<a id="cli-command-t3-project"></a>

## `t3 project`

Manage projects.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/project.ts:611](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/project.ts#L611)
- Handlers: 0 · Callers: 0

<a id="cli-command-t3-project-add"></a>

## `t3 project add`

Add a project.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/project.ts:409](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/project.ts#L409)
- Handlers: 1 · Callers: 0
- Arguments: `<path>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--title` | `string` | yes |  | Optional project title. |
| `--track` | `string[]` | yes |  | A folder outside the path that the project also works in. Repositories inside the path are found on their own. Repeat for more. |


<a id="cli-command-t3-project-remove"></a>

## `t3 project remove`

Remove a project.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/project.ts:531](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/project.ts#L531)
- Handlers: 1 · Callers: 0
- Arguments: `<project>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--force` | `boolean` |  | `false` | Delete the project and all of its threads. |


<a id="cli-command-t3-project-rename"></a>

## `t3 project rename`

Rename a project.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/project.ts:570](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/project.ts#L570)
- Handlers: 1 · Callers: 0
- Arguments: `<project>` `<title>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |


<a id="cli-command-t3-serve"></a>

## `t3 serve`

Run T3 Code in this terminal without opening a browser, and print pairing details. The background service runs this too, without printing them: pair with `t3 pair`. To set up access from your other devices, run `t3 up`.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/server.ts:83](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/server.ts#L83)
- Handlers: 1 · Callers: 0

<a id="cli-command-t3-service"></a>

## `t3 service`

Manage the T3 Code background service.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/service.ts:493](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/service.ts#L493)
- Handlers: 0 · Callers: 0

<a id="cli-command-t3-service-install"></a>

## `t3 service install`

Install T3 Code as a background service for this user. `t3 up` also chooses how your other devices reach it.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/service.ts:246](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/service.ts#L246)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--allow-downgrade` | `boolean` |  | `false` | Allow replacing a newer installed service with this older CLI version. |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |


<a id="cli-command-t3-service-protect"></a>

## `t3 service protect`

Protect the T3 Code server from agents under memory pressure (Linux with systemd). Asks for sudo.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/service.ts:386](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/service.ts#L386)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--undo` | `boolean` |  | `false` | Remove the protection this command set up. |
| `--yes` | `boolean` |  | `false` | Answer yes to every question, including SSH and Tailscale. |


<a id="cli-command-t3-service-restart"></a>

## `t3 service restart`

Restart the background service. Picks up a version installed by `t3 update` that was not restarted at the time.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/service.ts:294](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/service.ts#L294)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |


<a id="cli-command-t3-service-status"></a>

## `t3 service status`

Show whether the T3 Code background service is installed.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/service.ts:350](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/service.ts#L350)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |


<a id="cli-command-t3-service-uninstall"></a>

## `t3 service uninstall`

Stop and remove the T3 Code background service.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/service.ts:323](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/service.ts#L323)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |


<a id="cli-command-t3-service-update"></a>

## `t3 service update`

Deprecated. Run `t3 update` to move to a newer release.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/service.ts:271](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/service.ts#L271)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--allow-downgrade` | `boolean` |  | `false` | Allow replacing a newer installed service with this older CLI version. |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |


<a id="cli-command-t3-start"></a>

## `t3 start`

Same as `t3`.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/server.ts:74](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/server.ts#L74)
- Handlers: 1 · Callers: 0
- Arguments: `<cwd>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--auto-bootstrap-project-from-cwd` | `boolean` |  |  | Create a project for the current working directory on startup when missing. |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--bootstrap-fd` | `number` | yes |  | Read one-time bootstrap secrets from the given file descriptor. |
| `--dev-url` | `string` | yes |  | Dev web URL to proxy/redirect to (equivalent to VITE_DEV_SERVER_URL). |
| `--host` | `string` | yes |  | Host/interface to bind (for example 127.0.0.1, 0.0.0.0, or a Tailnet IP). |
| `--lan` | `boolean` |  |  | Accept connections from your local network and tailnet, not only this machine (equivalent to T3CODE_LAN). |
| `--log-websocket-events` | `boolean` |  |  | Emit server-side logs for outbound WebSocket push traffic (equivalent to T3CODE_LOG_WS_EVENTS). |
| `--mode` | `string` | yes |  | Runtime mode. `desktop` keeps loopback defaults unless overridden. |
| `--no-browser` | `boolean` |  |  | Disable automatic browser opening. |
| `--port` | `number` | yes |  | Port for the HTTP/WebSocket server. |
| `--tailscale-serve` | `boolean` |  |  | Configure Tailscale Serve to expose this backend over HTTPS on the Tailnet. |
| `--tailscale-serve-port` | `number` | yes |  | HTTPS port for Tailscale Serve when --tailscale-serve is enabled. |


<a id="cli-command-t3-status"></a>

## `t3 status`

Show service setup and remote access settings.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/up.ts:532](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/up.ts#L532)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--json` | `boolean` |  | `false` | Print the settings as JSON. Does not test connections. |


<a id="cli-command-t3-theme"></a>

## `t3 theme`

Inspect and set environment-wide theme defaults.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/theme.ts:592](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/theme.ts#L592)
- Handlers: 0 · Callers: 0

<a id="cli-command-t3-theme-clear"></a>

## `t3 theme clear`

Remove the environment's theme; clients keep what they have.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/theme.ts:552](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/theme.ts#L552)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |


<a id="cli-command-t3-theme-set"></a>

## `t3 theme set`

Set the environment's theme. The web app this server serves and the desktop app on this machine switch to it; a desktop app connected from another machine does not.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/theme.ts:469](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/theme.ts#L469)
- Handlers: 1 · Callers: 0
- Arguments: `<theme>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--id` | `string` | yes |  | Theme id to publish a file under, instead of its filename. |


<a id="cli-command-t3-theme-show"></a>

## `t3 theme show`

Show the environment's theme and its published themes.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/theme.ts:563](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/theme.ts#L563)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |


<a id="cli-command-t3-thread"></a>

## `t3 thread`

Start, message, and read threads on the running server.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/thread.ts:1199](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/thread.ts#L1199)
- Handlers: 0 · Callers: 0

<a id="cli-command-t3-thread-list"></a>

## `t3 thread list`

List a project's threads, newest first.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/thread.ts:966](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/thread.ts#L966)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--json` | `boolean` |  | `false` | Print JSON instead of text. |
| `--project` | `string` |  | `.` | Project id or a path inside the project. Defaults to this directory. |


<a id="cli-command-t3-thread-send"></a>

## `t3 thread send`

Send a message to a thread. A busy thread gets it as its next turn; nothing is interrupted.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/thread.ts:1092](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/thread.ts#L1092)
- Handlers: 1 · Callers: 0
- Arguments: `<thread>` `<message>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--json` | `boolean` |  | `false` | Print JSON instead of text. |
| `--output-schema` | `string` | yes |  | File holding a JSON Schema. The agent must return data matching it; --wait --json prints it as `output`. |
| `--wait` | `boolean` |  | `false` | Wait for the agent to finish and print its reply. Exits 1 if the run fails and 2 if it waits for an answer. |


<a id="cli-command-t3-thread-show"></a>

## `t3 thread show`

Show a thread's state and its latest messages.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/thread.ts:1135](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/thread.ts#L1135)
- Handlers: 1 · Callers: 0
- Arguments: `<thread>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--json` | `boolean` |  | `false` | Print JSON instead of text. |
| `--messages` | `number` |  | `10` | How many of the latest messages to print. |


<a id="cli-command-t3-thread-start"></a>

## `t3 thread start`

Start a thread in a project and print its id.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/thread.ts:1004](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/thread.ts#L1004)
- Handlers: 1 · Callers: 0
- Arguments: `<project>` `<message>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--branch` | `string` | yes |  | Branch name for the new worktree. |
| `--generate-title` | `boolean` |  | `false` | Generate the thread's title from the message. Until it's ready, the thread shows --title or the first line. |
| `--json` | `boolean` |  | `false` | Print JSON instead of text. |
| `--model` | `string` | yes |  | Model slug. Defaults to the project's default model. |
| `--option` | `string[]` | yes |  | Model option as id=value (Codex: reasoningEffort=high; Claude: effort=high). Ids depend on the model. Repeat for more. Needs --provider and --model. |
| `--output-schema` | `string` | yes |  | File holding a JSON Schema. The agent must return data matching it; --wait --json prints it as `output`. |
| `--provider` | `string` | yes |  | Provider instance id. Pass with --model. |
| `--title` | `string` | yes |  | Thread title. Defaults to the message's first line. |
| `--wait` | `boolean` |  | `false` | Wait for the agent to finish and print its reply. Exits 1 if the run fails and 2 if it waits for an answer. |
| `--worktree` | `string` | yes |  | Run in a new git worktree based on this branch, tag, or commit, instead of the project folder. |


<a id="cli-command-t3-trace"></a>

## `t3 trace`

Inspect the local server trace file.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/trace.ts:238](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/trace.ts#L238)
- Handlers: 0 · Callers: 0

<a id="cli-command-t3-trace-summary"></a>

## `t3 trace summary`

Summarize the local server trace file: counts, rates, and latency.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/trace.ts:183](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/trace.ts#L183)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--limit` | `number` |  | `25` | Number of span names to show, busiest first. |
| `--since` | `string` | yes |  | Only count spans that ended in this window, for example 30m or 2h. |


<a id="cli-command-t3-triage"></a>

## `t3 triage`

Investigate a T3 Code problem on this machine with Claude Code, Codex, or Antigravity, and help file a good issue.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/triage.ts:172](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/triage.ts#L172)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--agent` | `string` | yes |  | Agent CLI to use. Default: ask when multiple are installed. |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--model` | `string` | yes |  | Model passed through to the agent CLI. Default: the agent's default. |


<a id="cli-command-t3-uninstall"></a>

## `t3 uninstall`

Remove t3 from this machine: the background service, the launcher, and every downloaded version. Your projects and threads are kept.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/uninstall.ts:199](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/uninstall.ts#L199)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--yes, -y` | `boolean` |  | `false` | Remove everything without asking. Required from a script, where there is no prompt. |


<a id="cli-command-t3-up"></a>

## `t3 up`

Set up remote access and the T3 Code background service. Access flags skip the question, and routes not named keep their settings. Without a terminal, a needed restart runs without asking and stops running agent turns.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/up.ts:458](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/up.ts#L458)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--connect` | `boolean` |  |  | Allow access through T3 Connect with your T3 account. Turn off with --no-connect. |
| `--headless` | `boolean` |  | `false` | Sign in with a URL and code on any device. Automatic without a terminal or over SSH. |
| `--lan` | `boolean` |  |  | Allow LAN and tailnet connections. Anyone there can reach the port; a pairing code is the only lock. Turn off with --no-lan. |
| `--yes` | `boolean` |  | `false` | Ask nothing. Keep the access settings; a new machine gets T3 Connect. A restart stops running agent turns. |


<a id="cli-command-t3-update"></a>

## `t3 update`

Download a newer t3 and switch this machine to it, including the background service when one is installed.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/update.ts:345](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/update.ts#L345)
- Handlers: 1 · Callers: 0
- Arguments: `<version>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--allow-downgrade` | `boolean` |  | `false` | Allow moving to an older version than the one running. |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--channel` | `string` | yes |  | Release channel to follow. Defaults to the channel this t3 was published on. |
| `--github-token` | `string` | yes |  | GitHub token for listing and downloading unlisted preview releases. Defaults to GH_TOKEN or GITHUB_TOKEN. |
| `--yes, -y` | `boolean` |  | `false` | Restart the background service without asking. Required to restart it from a script, where there is no prompt. |


<a id="cli-command-t3-workflow"></a>

## `t3 workflow`

Start, inspect and steer durable workflow runs on the running server.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/workflow.ts:486](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/workflow.ts#L486)
- Handlers: 0 · Callers: 0

<a id="cli-command-t3-workflow-cancel"></a>

## `t3 workflow cancel`

Cancel a run.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/workflow.ts:211](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/workflow.ts#L211)
- Handlers: 1 · Callers: 0
- Arguments: `<run>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--json` | `boolean` |  | `false` | Print JSON instead of text. |
| `--reason` | `string` | yes |  | Why, kept as the run's detail. |


<a id="cli-command-t3-workflow-hooks"></a>

## `t3 workflow hooks`

List the URL paths that start runs. Each holds its hook's secret; add the server's origin.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/workflow.ts:387](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/workflow.ts#L387)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--json` | `boolean` |  | `false` | Print JSON instead of text. |


<a id="cli-command-t3-workflow-list"></a>

## `t3 workflow list`

List workflow runs, newest first.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/workflow.ts:102](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/workflow.ts#L102)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--json` | `boolean` |  | `false` | Print JSON instead of text. |
| `--status` | `string` | yes |  | Only runs in this state. A skipped run is listed only with `skipped`, unless another run invoked it. |
| `--subject` | `string` | yes |  | Only runs about this: the web address of their subject, or a thread id. |
| `--tag` | `string` | yes |  | Only runs their workflow tagged with this. |


<a id="cli-command-t3-workflow-questions"></a>

## `t3 workflow questions`

List the questions runs are waiting on a person to answer.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/workflow.ts:357](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/workflow.ts#L357)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--json` | `boolean` |  | `false` | Print JSON instead of text. |
| `--kind` | `string` | yes |  | Only questions of this kind, as their workflow's `asks` names it. |


<a id="cli-command-t3-workflow-resume"></a>

## `t3 workflow resume`

Run a paused run's failed step again.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/workflow.ts:198](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/workflow.ts#L198)
- Handlers: 1 · Callers: 0
- Arguments: `<run>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--json` | `boolean` |  | `false` | Print JSON instead of text. |


<a id="cli-command-t3-workflow-show"></a>

## `t3 workflow show`

Show a run and its steps.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/workflow.ts:146](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/workflow.ts#L146)
- Handlers: 1 · Callers: 0
- Arguments: `<run>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--json` | `boolean` |  | `false` | Print JSON instead of text. |


<a id="cli-command-t3-workflow-signal"></a>

## `t3 workflow signal`

Wake a waiting run, or answer its question.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/workflow.ts:226](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/workflow.ts#L226)
- Handlers: 1 · Callers: 0
- Arguments: `<value>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--channel` | `string` | yes |  | The channel the wait opened with. |
| `--id` | `string` | yes |  | Names this signal: sending it again with the same id is the same signal. |
| `--run` | `string` | yes |  | Run id. Pass with --wait, not with --workflow and --channel. |
| `--wait` | `string` | yes |  | The wait's or question's name in that run. |
| `--workflow` | `string` | yes |  | Workflow name. Pass with --channel when the run is not known. |


<a id="cli-command-t3-workflow-start"></a>

## `t3 workflow start`

Start a workflow run and print it.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/workflow.ts:66](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/workflow.ts#L66)
- Handlers: 1 · Callers: 0
- Arguments: `<workflow>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--input` | `string` |  | `{}` | The run's payload, as JSON. Defaults to {}. |
| `--json` | `boolean` |  | `false` | Print JSON instead of text. |
| `--key` | `string` | yes |  | Required. Names this run: starting again with the same key is the same run, not a second one. |


<a id="cli-command-t3-workflow-store"></a>

## `t3 workflow store`

See and change what workflows keep between runs.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/workflow.ts:481](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/workflow.ts#L481)
- Handlers: 0 · Callers: 0

<a id="cli-command-t3-workflow-store-delete"></a>

## `t3 workflow store delete`

Delete a key of the store.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/workflow.ts:465](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/workflow.ts#L465)
- Handlers: 1 · Callers: 0
- Arguments: `<key>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |


<a id="cli-command-t3-workflow-store-list"></a>

## `t3 workflow store list`

List what workflows keep in the store.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/workflow.ts:413](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/workflow.ts#L413)
- Handlers: 1 · Callers: 0
- Arguments: `<prefix?>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--json` | `boolean` |  | `false` | Print JSON instead of text. |


<a id="cli-command-t3-workflow-store-set"></a>

## `t3 workflow store set`

Set a key of the store, as a person flipping a switch does.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/workflow.ts:441](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/workflow.ts#L441)
- Handlers: 1 · Callers: 0
- Arguments: `<key>` `<value>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |


<a id="cli-command-t3-workflow-withdraw"></a>

## `t3 workflow withdraw`

End a run's open question unanswered. The run goes on as if the question timed out.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/src/cli/workflow.ts:318](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/src/cli/workflow.ts#L318)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 Code data directory; runtime state is stored under userdata (equivalent to T3CODE_HOME). |
| `--json` | `boolean` |  | `false` | Print JSON instead of text. |
| `--reason` | `string` | yes |  | Why, kept on the question's step. |
| `--run` | `string` | yes |  | Run id. |
| `--wait` | `string` | yes |  | The question's name in that run. |


<a id="cli-command-t3-sqlite-state"></a>

## `t3-sqlite-state`

Inspect or seed an isolated T3 SQLite database with automatic backups for writes.

- Kind: cli-command
- Workspace: [t3](../architecture/t3.md)
- Source: [apps/server/scripts/t3-sqlite-state.ts:253](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/apps/server/scripts/t3-sqlite-state.ts#L253)
- Handlers: 1 · Callers: 0
- Arguments: `<operation>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--base-dir` | `string` | yes |  | Explicit T3 base directory containing userdata/statev2.sqlite. |
| `--file` | `string` | yes |  | Path to a SQL source file. |
| `--sql` | `string` | yes |  | SQL source supplied directly on the command line. |


<a id="cli-command-task-cache"></a>

## `task-cache`

- Kind: cli-command
- Workspace: [@t3tools/task-cache](../architecture/t3tools-task-cache.md)
- Source: [infra/task-cache/scripts/manage.ts:62](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/infra/task-cache/scripts/manage.ts#L62)
- Handlers: 0 · Callers: 0

<a id="cli-command-task-cache-add-writer"></a>

## `task-cache add-writer`

- Kind: cli-command
- Workspace: [@t3tools/task-cache](../architecture/t3tools-task-cache.md)
- Source: [infra/task-cache/scripts/manage.ts:64](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/infra/task-cache/scripts/manage.ts#L64)
- Handlers: 1 · Callers: 0
- Arguments: `<name>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--new-registry` | `boolean` |  | `false` |  |


<a id="cli-command-task-cache-revoke-writer"></a>

## `task-cache revoke-writer`

- Kind: cli-command
- Workspace: [@t3tools/task-cache](../architecture/t3tools-task-cache.md)
- Source: [infra/task-cache/scripts/manage.ts:69](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/infra/task-cache/scripts/manage.ts#L69)
- Handlers: 1 · Callers: 0
- Arguments: `<name>`

<a id="cli-command-update-release-package-versions"></a>

## `update-release-package-versions`

Update release package versions across the workspace.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/update-release-package-versions.ts:144](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/update-release-package-versions.ts#L144)
- Handlers: 1 · Callers: 0
- Arguments: `<version>`

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--github-output` | `boolean` |  | `false` | Append changed=<boolean> to GITHUB_OUTPUT. |
| `--root` | `string` | yes |  | Workspace root used to resolve the release package manifests. |


<a id="cli-command-verify-windows-desktop-artifact"></a>

## `verify-windows-desktop-artifact`

Verify a Windows desktop artifact's packaged natives load.

- Kind: cli-command
- Workspace: [@t3tools/scripts](../architecture/t3tools-scripts.md)
- Source: [scripts/verify-windows-desktop-artifact.ts:18](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/scripts/verify-windows-desktop-artifact.ts#L18)
- Handlers: 1 · Callers: 0

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--app-dir` | `string` | yes |  | The electron-builder `win-<arch>-unpacked` directory. |
| `--arch` | `string` | yes |  |  |
| `--build-version` | `string` | yes |  | The artifact's build version. |
| `--verbose` | `boolean` |  | `false` |  |
