---
name: t2000-setup
description: >-
  Set up a t2000 Agent Wallet end-to-end on the user's machine. Use when
  the user says "set up t2000", "install the wallet", "create my Agent
  Wallet", "connect t2000 to Claude / Cursor", or pastes a one-prompt
  install URL. Covers wallet creation, optional spending limits, and MCP
  wiring. Read this first when bootstrapping a new user; the other skills
  assume this has run.
license: MIT
metadata:
  author: t2000
  version: "2.0"
  requires: Node.js 18+ and a terminal
---

# t2000: Agent Wallet — One-Prompt Setup

## Purpose

Get a fresh user from "nothing installed" to "Agent Wallet ready" in under 5 minutes. This is the canonical entry point for the **one-prompt install** UX:

```
Run curl -sL https://t2000.ai/skills/t2000-setup, and use the returned setup
instructions to set up my Agent Wallet.
```

When invoked through that prompt, the LLM fetches this file, then executes the steps below in order.

## Rules

1. **Walk the steps in order.** Each step depends on the previous one. Skipping breaks setup.
2. **Stop at the first failure.** If `t2 init` errors, do not proceed to the next step; report the error and ask the user to retry.
3. **Confirm AI-client choice before MCP install.** Don't assume Claude Desktop vs. Cursor vs. Windsurf — ask which they use, then pick the matching config path.
4. **Setup is read + write — show, then ask.** Echo each command you're about to run. The user runs it (or confirms you can). Never silently shell out.
5. **No PIN. No encryption.** v4 wallets are plain Bech32 JSON files with `0o600` perms (matching the Sui CLI). The user owns the file; back it up via `t2 export`.

## Steps

### Step 1 — Install the CLI

```bash
npm install -g @t2000/cli
```

Verify:
```bash
t2 --version
# Should print: 4.x.x
```

If `npm` is missing, point the user to https://nodejs.org/ (Node 18+).

> **Binary naming.** The published binary is currently `t2000`. The `t2` alias ships in Phase C — until then, both `t2000 <verb>` and `t2 <verb>` work via shell alias (or you can keep using `t2000` everywhere). The skills use `t2` because that's the canonical name going forward.

### Step 2 — Create a wallet

```bash
t2 init                              # fresh wallet
t2 init --import                     # import an existing Bech32 secret (interactive prompt)
t2 init --import suiprivkey1xxx...   # import via flag (warns: shell history exposure)
```

`t2 init` (no flag):
- Generates a fresh Ed25519 keypair on Sui mainnet.
- Writes the plain Bech32 private key to `~/.t2000/wallet.key` (mode `0o600`).
- Prints the wallet address.
- Prints a warning footer if no spending limits are set (those are opt-in, see Step 4).

`t2 init --import`:
- Prompts for a `suiprivkey1...` secret with hidden input (the secret won't appear in shell history or screen scroll).
- Validates the Bech32 format, derives the address, writes the wallet file.
- Used for: re-creating the wallet on a fresh box (paired with `t2 export` on the source box), or bringing in a key from another tool (Sui CLI, hardware wallet, etc.).

> **Upgrading from v3 (PIN-encrypted)?** v4 doesn't auto-migrate v3 AES wallets — a v3 file at `~/.t2000/wallet.key` will throw `WALLET_CORRUPT`. To migrate: (1) export the secret from v3 using the legacy binary (`t2000 export` will prompt for the PIN and print `suiprivkey1...`), (2) move or delete the v3 file at `~/.t2000/wallet.key`, (3) `t2 init --import` and paste the secret. The same Bech32 secret produces the same address — funds carry over automatically. (Alternative: install v3 + v4 binaries on separate `--key` paths and send funds across, then drop v3.)

### Step 3 — Fund the wallet

```bash
t2 receive
```

Shows the deposit address + Payment Kit URI + an ANSI QR code. Tell the user:
- Send USDC (or USDsui or SUI) to the printed address on **Sui mainnet** (not Solana, not Ethereum).
- USDC + USDsui sends are gasless (Sui foundation sponsored) — they work even with 0 SUI in the wallet.
- For swaps via Cetus, the wallet needs a small SUI balance (~0.05 SUI covers many swaps; cost is typically < $0.01 each).
- 1 USDC is enough to get going (the gateway service catalog at `t2 services list` shows prices from $0.005).

### Step 4 — (Optional) Set spending limits

```bash
t2 limit set --per-tx 50         # cap every write at $50 USD
t2 limit set --daily 200         # cap every send at $200 USD
```

v4 ships with **no default limits** — wallets are unconstrained until the user opts in. The `t2 limit` command writes to `~/.t2000/config.json`; CLI writes (`t2 send`, `t2 swap`, `t2 pay`) honor the caps and surface a `LIMIT_EXCEEDED` error when exceeded. Use `--force` on a write to override one time.

To view current limits:
```bash
t2 limit show
```

To clear them:
```bash
t2 limit reset
```

### Step 5 — Install MCP into the user's AI client

Ask the user which AI client they use, then run:

```bash
t2 mcp install
```

This is interactive — it discovers installed clients (Claude Desktop, Cursor, Windsurf, Cline, Continue) and offers a multi-select. The CLI writes the correct config block into each chosen client.

After install, the user must **restart the AI client** for it to pick up the new MCP server.

### Step 6 — Verify

**6a — CLI smoke** (in the same terminal):
```bash
t2 balance
```

Should print:
- Wallet address (last 6 chars match step 2)
- Available USDC + USDsui + SUI (matches step 3 funding, or $0.00 if not yet funded)
- Total (USD value)

**6b — AI client tool smoke** (after restart):
```
What's my t2000 balance?
```

Should invoke the `t2000_balance` MCP tool and return the same numbers.

**6c — AI client prompt smoke**:

The MCP server doesn't just expose tools — it also exposes one `skill-<name>` prompt per t2000 skill (auto-registered from `t2000-skills/skills/*/SKILL.md`). Type `/` in the AI client's chat input to open the prompt picker. You should see:

- `skill-setup` — this skill
- `skill-send` — sending USDC / USDsui / SUI
- `skill-swap` — swapping via Cetus
- `skill-pay` — paying for MPP services
- `skill-receive` — generating payment requests
- `skill-services` — discovering MPP gateway services
- `skill-check-balance` — reading the wallet
- `skill-mcp` — MCP integration deep-dive

Run `/skill-check-balance` (or just type and accept the autocomplete). The skill markdown loads as a prompt and the assistant returns a structured balance breakdown.

## What "ready" looks like

After setup the user has:
- A non-custodial Sui wallet at `~/.t2000/wallet.key` (plain Bech32 JSON, `0o600` perms, **no PIN**).
- Optional USDC / USDsui / SUI funded on Sui mainnet.
- Optional spending limits configured.
- An MCP server wired into Claude / Cursor / Windsurf — chat that can move money under user confirmation.

## What setup does NOT do

- **Does not move money.** Setup is read + config only. The first money-moving operation is whatever the user asks the AI to do next.
- **Does not back up the private key.** The Bech32 key lives in `~/.t2000/wallet.key`. To back up, the user runs `t2 export` manually — never volunteer this unless asked. v4 has no PIN, so anyone with read access to the file owns the wallet.
- **Does not gate MCP writes on `t2 limit`.** v4 Phase B: the CLI writes (`t2 send/swap/pay`) honor the caps; MCP writes do NOT yet. Enforcement parity is a Phase D consolidation. Until then, MCP can read limits via `t2000_limit` for narration but writes proceed without gating.

## Next steps to suggest

After verify succeeds, surface a short menu of natural next moves:
- "Send USDC to someone" → `t2000-send`
- "Swap tokens via Cetus" → `t2000-swap`
- "Pay for a service via MPP" → `t2000-pay`
- "Generate a payment request" → `t2000-receive`
- "See available paid services" → `t2000-services`
- "Connect more AI clients" → `t2000-mcp`
- "See what else t2 can do" → run `t2 --help` or browse https://t2000.ai/skills

## Troubleshooting

| Symptom | Fix |
|---|---|
| `t2000: command not found` after npm install | `npm bin -g` directory not on PATH; add it or use `npx @t2000/cli ...` instead |
| `t2 init` fails with permission error | Don't run with `sudo`; npm global may need a user-level prefix (`npm config set prefix ~/.npm-global`) |
| `t2 init` fails with `WALLET_EXISTS` | A file already lives at `~/.t2000/wallet.key`. If it's a v3 file you no longer need, move/delete it. If you still need it, point v3 + v4 at separate paths via `--key`. v4 does not auto-migrate v3 wallets — see the v3 upgrade note in Step 2. |
| MCP server "doesn't do anything" when run manually | Working as designed — the server is a subprocess launched by the AI client, never run from a terminal. See the `t2000-mcp` skill. |
| AI client doesn't see `t2000_*` tools after install | Restart the client. If still missing, check the per-client config path printed by `t2 mcp install`. |
