# Claude Code on Prized

> Set up Prized so Claude Code works on this project on a cloud box that stays on: the folder syncs both ways, the box's ports open on localhost, and the session keeps running with the laptop closed. People read https://prized.dev/claude-code.

These are instructions for you, Claude Code, on your person's computer, in the project they want on the box. Do the setup rather than explain it. Every docs page is listed at https://prized.dev/llms.txt; add `.md` to a docs URL for its Markdown.

## Rules

- Ask your person before you install software, before you sync their files, before you copy any credential, and before anything that costs money. Copy, never move or delete.
- Pass only the flags they said yes to. When a command fails with a hint, tell them the hint; never add a flag on your own.
- Never print, log or commit a credential, never put one in a command line, and never read `~/.config/prized`.
- Never quote a price from memory: read https://prized.dev/pricing.md.
- `prized` commands with `--json` print one JSON object with an `ok` field. Error and exit codes are at https://prized.dev/docs/cli.md.
- `prized` and the sign-up calls need the network and write outside this folder, and `prized box new --wait` and `prized setup` can take several minutes. If your sandbox blocks a command, ask your person to approve running it outside the sandbox, and give these commands a 10 minute timeout.

## 1. Install the CLI

If `prized version` fails, ask, then run `curl -fsSL https://prized.dev/install.sh | sh` (on Windows: `powershell -c "irm https://prized.dev/install.ps1 | iex"`). If `prized` is still not found, use the path the installer printed.

## 2. Sign in

Run `prized box ls --json`. If it fails with code `AUTH`, ask whether your person has a Prized account.

- They do: ask them to run `prized login` in another terminal and to tell you when it has finished.
- They don't: ask for their email address and follow https://prized.dev/auth.md, its From a shell part. Prized emails them a 6-digit code, they give it to you, and the CLI is signed in without the key ever showing in your output. On Windows without a POSIX shell (`sh`, `grep`, `sed`), ask them to run `prized login` instead.

Then run `prized box ls --json` again. If it fails with any other code, tell your person what it says.

## 3. A box

If `prized box ls --json` lists no box, ask, then run `prized box new --wait --json`. On the free credit that starts a Small; a bigger size needs a plan (https://prized.dev/dashboard/billing).

## 4. Set up

Ask these in one message, then run setup once:

1. The project. If this folder is their home folder or Desktop, or has no `.git` or manifest, ask which project they mean and use its path instead of `.`; never sync a home folder. Then ask how:
   - `--project .` syncs this folder both ways, in place. The box wins conflicts.
   - `--project . --copy` syncs a copy under `~/Prized` and leaves this folder alone.
   - `--project . --clone` clones the repo onto the box over git, with no live mirror. A private GitHub repo needs `--gh` too.
   - None of them: leave the project flags out.
2. Claude Code's sign-in, MCP servers and settings: `--agent claude` copies them to the box. If they say no, pass `--no-agents`.
3. Their GitHub CLI token and git identity: `--gh`.
4. Their environment (not on Windows): run `prized env plan --json`, read them the groups it lists, and pass the ones they want as `--env <groups>`. Secrets and data are their own yes (https://prized.dev/docs/agent-setup.md).

Then, with the flags they said yes to:

```sh
prized setup --json --non-interactive <their flags>
```

A yes to syncing this folder and to Claude Code's sign-in is `prized setup --json --non-interactive --project . --agent claude`. If setup exits 5 naming several boxes, ask which one and re-run with `--box <name>`.

Read `steps[]` in the JSON: `skipped` names what wasn't granted, and `failed` carries a hint to relay. If the agents step reports claude as `manual`, this computer has no Claude Code sign-in to copy. Tell your person to sign in once on the box: `prized ssh`, then `claude`, then `/login`. It stays signed in there.

## 5. Check

`prized status --json` reports ok. If the project syncs (not `--clone`), `prized sync flush <name>` completes. `prized agents ls --json` shows Claude Code installed and signed in on the box.

## 6. Report

Tell your person the box's name, the project's path on both sides, what was copied, and the command that starts Claude Code on the box and opens it (the JSON's `agent.command` when setup gives one):

```sh
prized agents run claude --attach
```

Closing the terminal or the laptop leaves it running, and the same command, or `prized ssh -s claude`, takes them back. To hand it a task and walk away: `prized prompt --provider claude --cwd <the project's path on the box> --detach "<the task>"` (https://prized.dev/docs/remote-agents.md). A headless run counts as use only while it keeps the CPU or network busy, so a long one can be paused mid-task; before one, ask, then turn auto-pause off with `prized box auto-pause <box> off` (the box then stays awake and bills by the hour).
