> ## Documentation Index
> Fetch the complete documentation index at: https://developers.t2000.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# t2 code

> The private coding agent you can verify — a multi-agent coding CLI running on t2000 Private Inference, open models first, GPU-TEE confidential on demand.

**t2 code** is a terminal coding agent (TUI + headless) that runs the full multi-agent editing loop — planner, editor, reviewer, file-picker — on the t2000 rail. Private by default: out of the box it never sends your code to a closed frontier lab, and in confidential mode every token is processed inside a verified GPU-TEE.

```bash theme={null}
npm install -g @t2000/code
t2code
```

The installer downloads a platform binary (macOS arm64/x64, Linux x64/arm64, Windows x64). First run asks for your **console key** (free — [agents.t2000.ai/manage](https://agents.t2000.ai/manage), API keys → Create) and your **privacy mode**, then drops you into chat.

## Privacy modes

One choice, three postures — enforced at the transport layer, not the prompt:

| Mode                  | Routing           | What it means                                                               |
| --------------------- | ----------------- | --------------------------------------------------------------------------- |
| **Private** (default) | `t2000/auto-open` | Open models only. Never escalates to a closed lab.                          |
| **Full router**       | `t2000/auto`      | Best quality per task; may route to frontier labs.                          |
| **Confidential**      | `phala/*` GPU-TEE | Every call runs in a verified enclave with attested receipts (`t2 verify`). |

* Check or switch anytime with **`/privacy`** in the TUI (`/privacy confidential` etc.).
* **Pin a repo** with `t2code init` — it writes `.t2000/config.json` with the repo's mode. The pin **overrides everyone's global setting**: pin a client's NDA repo to `private` or `confidential` and it can never silently escalate, no matter who runs the agent. Commit the file to make it the team default.

## Verbs

| Command                | What it does                                                                                                                      |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `t2code`               | Interactive TUI — multi-agent chat over your repo.                                                                                |
| `t2code "prompt"`      | TUI with an initial prompt.                                                                                                       |
| `t2code login`         | Paste your console key (or set `T2000_API_KEY`).                                                                                  |
| `t2code init`          | Scaffold the repo for agents: `AGENTS.md`, `.agents/` (+ `skills/`), `plans/`, and the `.t2000/` privacy pin.                     |
| `t2code exec "<task>"` | **Headless one-shot**: run the task, stream the answer to stdout (progress on stderr), exit. `--json` for an NDJSON event stream. |

## Delegation — the reason `exec` exists

The economics: frontier agents are great at the hard 20% (architecture, ambiguity) and wasteful on the mechanical 80% (sweeps, renames, test-fix loops). `t2code exec` lets any cockpit agent hand that 80% to open-model pricing:

```bash theme={null}
t2code exec "Rename getCwd to getCurrentWorkingDirectory across src/,
update call sites, then make 'pnpm typecheck' pass."
```

The **`t2000-code-delegate`** skill teaches any agent that reads Agent Skills (Cursor, Claude Code, …) when and how to do this — dispatch, supervise, review the diff, report back:

```bash theme={null}
t2 skills install --target=cursor    # installs t2000-* skills as Cursor rules
```

Auth is self-contained (t2code reads the persisted key itself) and the repo's privacy pin applies to delegated runs too.

## What ships inside

* **t2000 MCP preinstalled** — the [Agent Wallet](/agent-wallet) tools (balance, send, swap, pay-any-API, hire agents) are available to the agent out of the box; wallet actions activate once `t2 init` has created a wallet.
* **9+ `t2000-*` skills baked in** — available as `/skill:t2000-*` slash commands.
* **Zero data retention** — same [ZDR posture](/private-inference) as the API; nothing about your repo is stored server-side. Session state lives in `~/.config/t2code`.

## Verify a confidential session

In confidential mode, responses carry attested receipts anchored on Sui. Check any receipt client-side:

```bash theme={null}
t2 verify rcpt-…        # from @t2000/cli — trustless: Sui anchor + receipt signature + TDX quote
```

See [Confidential AI](/confidential-ai/how-it-works) for the full trust model.

## Credits

t2 code is a rebranded, privacy-hardened distribution of [Codebuff](https://codebuff.com) (Apache-2.0) — the multi-agent architecture is theirs; the t2000 rail, wire-privacy strip (no telemetry, no repo upload), privacy modes, and wallet integration are ours.
