# CLI

> Every prized command, flag, and exit code, on macOS, Linux, and Windows. Add --help to any command; every non-interactive command also takes --json and prints exactly one JSON object.

URL: https://prized.dev/docs/cli

## Commands [#commands]

Each group below lists its commands, their flags, and the object `--json` prints. On success that object is `{"ok": true, ...}` with the payload inline; the failure shape and the exit codes are under [For agents and scripts](#for-agents-and-scripts).

### Sign in and set up [#sign-in-and-set-up]

`prized login` opens the dashboard to mint a CLI token, stores it in `~/.config/prized` (`%LOCALAPPDATA%\Prized` on Windows), sets up your SSH identity, and registers this machine's device key ([Claude Desktop remote](https://prized.dev/docs/claude-desktop)). With no config yet and exactly one box on the account it also connects that box; otherwise it leaves that to `prized setup`. Flags: `--token` (a CLI token from the dashboard or a single-use install token; the only login form `--json` accepts), `--token-stdin`, `--url`. JSON: `{"ok": true, "email", "workspace", "boxes", "box", "url"}`.

`prized setup [PATH]` sets this machine up to work on your box, safe to re-run: a repairing health check, then the project to sync, your environment, the agents, and a detached session. `prized setup auto` skips the auto-or-manual question ([Quickstart](https://prized.dev/docs/quickstart#4-set-up)).

| Flag                                                                 | Meaning                                                                                                                                |
| -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `--project`, `--no-project`                                          | The project to sync (a name or a path), or none.                                                                                       |
| `--copy`, `--copy-once`, `--clone`                                   | Copy and keep syncing, copy once with no sync, or `git clone` on the box; the default syncs in place.                                  |
| `--merge`                                                            | Merge into an existing folder on the box instead of refusing.                                                                          |
| `--env`, `--env-secrets`, `--env-data`, `--no-env`                   | The [environment](https://prized.dev/docs/environment) groups to bring; data is never covered by auto or `-y`.                                           |
| `--env-workers N`                                                    | How many environment items install at once (default 8); `1` installs them in order.                                                    |
| `--agent NAME`, `--no-agents`, `--save`                              | Which agents to hand off (`claude`, `codex`, `cursor`, `chatgpt`); `--save` records the pick.                                          |
| `--gh`, `--no-gh`, `--install-cursor`                                | The GitHub token and git identity; Cursor's installer.                                                                                 |
| `--start`, `--no-start`, `--attach`, `--no-attach`, `--session NAME` | The detached session setup starts for the picked agent; `--attach` opens it in this terminal instead of printing the reattach command. |
| `--box NAME`                                                         | The box to set up; one other than the default gets its own config and daemon ([Several boxes](https://prized.dev/docs/boxes#several-boxes)).             |
| `--dry-run`, `--non-interactive`                                     | Print everything a run would do and change nothing; never prompt.                                                                      |

JSON: `{"ok": true, "steps": [{"id", "status": "done|skipped|failed", "duration"}], "state": "READY|DEGRADED", "env"}`.

`prized init` adopts a box on your account (config, SSH stanza, daemon); `login` and `setup` run it for you. `--box NAME` connects another box with its own `boxes/<name>.toml` and daemon; `--force` makes it the default instead, rewriting `config.toml` (backed up first) and refusing a box that already has its own file; `--user NAME`, `--no-daemon`, `--non-interactive`.

`prized env scan|plan|migrate` is the environment step on its own: list what your machine has, print the questions, apply them. Flags: `--project PATH`, `--advisor`/`--no-advisor`, `--non-interactive` ([Bring your environment](https://prized.dev/docs/environment)).

### Box lifecycle [#box-lifecycle]

Every action works from the CLI and the [dashboard](https://prized.dev/dashboard); what each does to the machine is on [Boxes](https://prized.dev/docs/boxes).

* **Naming a box.** `BOX` is a hostname (`mango`), a box id, or an alias: `current` (the last box this machine created) or `self` (the box the command runs on). With no `BOX`, the box you set up is meant. An unknown name exits 5 and lists your boxes.
* **Sizes.** Tier id or public name: `nano` (Nano), `micro` (Micro), `lite` (Extra Small), `flow` (Small), `pro` (Medium), `max` (Large), `ultra` (Extra Large). Prices: [Billing](https://prized.dev/docs/billing). On the [free credit](https://prized.dev/docs/billing#free-credit), Nano through Small, one box at a time; a bigger size is refused with exit 5, a second box with exit 6, until a plan is live.
* **Windows.** `--ttl` and `--auto-pause` take a duration with a unit: `45m`, `4h`, `1h30m`, `2d`.

#### box new [#box-new]

```bash
prized box new                         # a fruit name, the size your balance runs comfortably
prized box new mango --size Small --ttl 4h --auto-pause 45m --wait
```

Returns as soon as the control plane has the box, which becomes `current`. A plain Small box (no name, snapshot, or environment) is usually running already ([Boxes](https://prized.dev/docs/boxes)); anything else boots in about a minute.

| Flag                  | Meaning                                                                                                                              |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `NAME`                | Lowercase letters, digits, and hyphens, starting and ending with a letter or digit, up to 32 characters.                             |
| `--tier`, `--size`    | The size (the two flags mean the same thing).                                                                                        |
| `--ttl WINDOW`        | A [pause deadline](https://prized.dev/docs/boxes#pause-deadline), 5m to 30d from now.                                                                  |
| `--auto-pause WINDOW` | [Idle auto-pause](https://prized.dev/docs/boxes#auto-pause), 30m to 7d. A plan feature: on the [free credit](https://prized.dev/docs/billing#free-credit) it is refused. |
| `--environment NAME`  | Apply a saved [environment](https://prized.dev/docs/boxes#environments) at first boot, by name or `env_` id.                                           |
| `--from-snapshot ID`  | Restore a [snapshot](https://prized.dev/docs/boxes#snapshots) into the new box; its size is the snapshot's.                                            |
| `--region REGION`     | `us-west-2` (Oregon, the default) or `us-west-1` (California), a [move](https://prized.dev/docs/boxes#regions) after first boot.                       |
| `--wait`              | Poll until the box is running (5 minute budget), then print the `prized ssh` line.                                                   |

A taken name, the box count, or a balance that cannot run the box exit 6 (`CONFLICT`); a size not on your plan, a bad name, or a window out of bounds exit 5.

#### The rest of the box group [#the-rest-of-the-box-group]

Each prints `{"ok": true, "box": {...}}` with [the box object](#the-box-object) unless noted.

| Command                                            | What it does                                                                                                                                                                                                                                                             |
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `box ls [--all] [--filter STATES]`                 | NAME, STATE, SIZE, REGION, AUTO-PAUSE, PAUSE-AT, CREATED; `--all` adds terminated boxes. JSON: `{"boxes"}`.                                                                                                                                                              |
| `box info BOX`                                     | State, size, region, tunnel IP, login user, disk, pause settings, last vitals, last eight events. JSON adds `events` and `pausesSurvived`.                                                                                                                               |
| `box pause BOX`, `box resume BOX [--wait]`         | Aliases `stop`, `wake` ([Pause and resume](https://prized.dev/docs/boxes#pause-and-resume)); `--wait` polls until running. Idempotent; a resume the balance cannot cover exits 5.                                                                                                          |
| `box delete BOX [-y]`                              | Permanent: machine and disk gone. Asks you to type the name; `--json` needs `-y` (exit 2 without).                                                                                                                                                                       |
| `box rebind BOX`                                   | Binds the ssh alias for a name to the box that wears it now. An alias is bound to the box it first connected to; if the box was recreated, or its freed name was taken by another box, `ssh BOX` and the prized commands refuse the name until you rebind it on purpose. |
| `box resize BOX SIZE` (or `prized resize SIZE`)    | Restarts the box at the new size, metered at the new rate from then on ([Resize](https://prized.dev/docs/boxes#resize)). Refusals exit 5. JSON adds `from`, `to`.                                                                                                                          |
| `box move BOX REGION`                              | Moves the box ([Regions](https://prized.dev/docs/boxes#regions)); `desiredRegion` is set at once, `region` changes when the move lands.                                                                                                                                                    |
| `box extend BOX --ttl WINDOW \| --no-deadline`     | Sets, replaces, or clears the [pause deadline](https://prized.dev/docs/boxes#pause-deadline); setting one needs a running box (exit 5), clearing always works.                                                                                                                             |
| `box auto-pause BOX WINDOW\|off`                   | Sets the [idle window](https://prized.dev/docs/boxes#auto-pause) (30m to 7d, or bare minutes) or switches it off. A window is refused while the workspace runs on the [free credit](https://prized.dev/docs/billing#free-credit), which never auto-pauses.                                                   |
| `box auto-snapshot BOX --every 6h\|off [--keep 5]` | Sets or clears a [snapshot schedule](https://prized.dev/docs/snapshots#automatic-snapshots): every 1 to 168 hours, keeping 1 to 10.                                                                                                                                                        |

#### The box object [#the-box-object]

```json
{
  "id": "5d0a…", "hostname": "mango",
  "observedState": "running", "desiredState": "running",
  "tier": "flow", "instanceType": "m6a.xlarge",
  "region": "us-west-2", "desiredRegion": "us-west-2",
  "loginUser": "hudson", "boxIp": "10.77.3.1", "diskGb": 100,
  "autoPauseMin": 45, "pauseAt": "2026-09-01T18:30:00Z",
  "lastHeartbeatAt": "2026-09-01T15:17:52Z", "createdAt": "2026-08-29T12:00:00Z",
  "vitals": {"cpu_pct": 12, "mem_pct": 41, "disk_pct": 63, "idle_for_sec": 720}
}
```

`autoPauseMin`, `pauseAt`, `diskGb`, `lastHeartbeatAt`, and `vitals` are `null` when unset or unknown. Timestamps are RFC 3339 UTC.

### Snapshots [#snapshots]

`prized snapshot create BOX [--name NAME] [--description TEXT]` snapshots a disk without stopping the box; `snapshot ls [--box BOX] [--kind KIND]` lists them; `snapshot restore SNAPSHOT [--name NAME] [--tier SHAPE]` launches a new box from a snapshot or template; `snapshot delete SNAPSHOT` retires one; `snapshot template SNAPSHOT NAME` names a snapshot (or a box, snapshotting it first) as a template and `snapshot untemplate NAME` drops the name. `prized fork BOX [--name NAME] [--tier SHAPE] [--keep-snapshot] [--wait]` makes a new box from a copy of a running box's disk. Behaviour, kinds, and limits: [Snapshots](https://prized.dev/docs/snapshots).

### Environments [#environments]

`prized environments` (alias `envs`) manages what a new box inherits: `ls`, `info`, `new`, `default`, `rm`, `set`, `set-var`/`rm-var`, `set-file`/`rm-file`, `add-repo`/`rm-repo`, `upgrade`. Every command and its JSON is on [Environments](https://prized.dev/docs/environments).

### Secrets [#secrets]

`prized secrets` is who a workspace secret is available to and what it was spent on; values are set and rotated in the dashboard, never here ([Scoped secrets](https://prized.dev/docs/teams#scoped-secrets)).

| Command                                           | What it does                                                                                                                        |
| ------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `secrets ls [--box BOX]`                          | NAME, SCOPE, HOSTS, MOUNTS, ROTATED; with `--box`, only what that box may mount.                                                    |
| `secrets grant NAME --box BOX \| --member EMAIL`  | Make the secret available to one box, or to every box a member owns. The first grant narrows a workspace-wide secret to its grants. |
| `secrets revoke NAME --box BOX \| --member EMAIL` | Take a grant back; the box loses the secret within seconds. Revoking the last grant makes the secret workspace-wide again.          |
| `secrets grants NAME`                             | Who has it: KIND, TO, SINCE.                                                                                                        |
| `secrets usage NAME`                              | Which boxes spent it against which hosts: BOX, HOST, FIRST, LAST, COUNT (a floor).                                                  |

`grant` and `revoke` take exactly one of `--box` and `--member` (exit 2 otherwise); an unknown secret, box, member, or grant exits 5; a `409` exits 6. JSON mirrors the columns.

### Connect [#connect]

`prized ssh [BOX] [SESSION] [-- CMD...]` connects in a persistent tmux session, wakes a suspended box first, and, for a box other than your default, forwards its ports for the life of the session ([Sessions](https://prized.dev/docs/sessions)). Flags: `-s, --session NAME` (default `main`), `--ls`, `--kill NAME` (asks unless `-y`), `--raw` (no tmux), `--no-forward`, `--no-drop-upload`, `--no-clipboard` (copies on the box stay off your clipboard; [Copy out](https://prized.dev/docs/sessions#copy-out)). Interactive forms reject `--json` (exit 2); after connecting, the exit code is ssh's or the remote command's. JSON: `--ls` `{"sessions": [{"name", "windows", "created", "attached"}]}`, `--kill` `{"killed"}`.

Every command that reaches the box over SSH (`ssh`, `exec`, `setup`, `doctor`, the agent handoffs) runs the OpenSSH client from the system directories (`/usr/bin`, or `System32\OpenSSH` on Windows), never one found on `PATH`. An ssh installed elsewhere is named with `bin = "/path/to/ssh"` under `[ssh]` in the config.

`prized mosh [BOX] [SESSION]` is the same session over mosh (needs mosh installed locally; not on Windows yet), with `-s`, `--raw`, `--no-forward`, `--no-drop-upload`. `prized up` starts the box and reconnects everything from cold, then prints the `status` block; `--resume` resumes paused syncs, `--wait-timeout` (default `5m`) bounds the wait. `prized proxy BOX PORT[:LOCALPORT]` forwards one box port to localhost until interrupted.

### Run commands and files [#run-commands-and-files]

`prized exec [BOX] [flags] -- CMD...` runs one command on the box and exits with its exit code; `--cwd`, `--timeout`, and `--env K=V` shape the run, `--detach` starts it and returns an id, and `--status ID`, `--ps`, `--kill ID` inspect or stop detached runs without waking a paused box. JSON: `{"ok": true, "exitCode", "stdout", "stderr"}`. `prized cp [-r] SRC DST` copies files scp-style: `box:path` names a path on a box, `:path` one on your box. Both are on [Run commands and files](https://prized.dev/docs/exec); both report what they did (never output or contents) to the [audit log](https://prized.dev/docs/teams#audit-log) as a **reported** row.

### Desktop [#desktop]

`prized desktop [BOX]` opens the box's desktop in the dashboard and forwards its VNC port until interrupted; `--no-open` prints the `vnc://` address and password, `--stop` ends it. `prized browser [BOX]` is the same with one Chrome window (`--profile`, `--url`). Starting either reports a `desktop.start` row (mode and profile, never the password) to the audit log. See [Desktop](https://prized.dev/docs/desktop).

### Sync [#sync]

`prized sync add PROJECT | add --local PATH` mirrors a folder between the box and this machine ([Sync](https://prized.dev/docs/sync)). Flags: `--local PATH` (a folder of your own, in place, instead of `~/Prized/<name>`), `--remote PATH` (default `~/code/<name>`), `--name NAME`, `--prefer box|local` (default `box`), `--mode MODE` (default `two-way-resolved`), `--ignore` and `--unignore`, `--create` (make the remote folder), `--paused`, `--merge` (allow a non-empty local folder).

`prized sync` on its own, or `sync ls`, lists sessions with state and problems, and says so when nothing is synced yet; `pause`, `resume`, `flush` take a name or `--all` (`flush --timeout`, default `60s`); `repair NAME` recreates a halted session; `rm NAME` removes one (`--delete-local`, `--delete-box` also move the files aside). JSON: `add` `{"project"}`; `ls` `{"projects", "degraded"?}`; `repair` `{"repaired"}`; `rm` `{"removed", "files": "keep|trash_local|trash_box"}`.

### Mount [#mount]

`prized mount [BOX]` mounts a box in Finder as a network drive served by a background process and returns; running it again for a mounted box opens the folder; `-f, --foreground` serves from the terminal until interrupted instead; macOS only ([Mount](https://prized.dev/docs/mount)). Flags: `--dir PATH` (default the home directory), `--at PATH` (default `~/Prized/boxes/<box>`), `--read-only`, `--mount-opt OPTS`, `--no-open`. `prized unmount [BOX]` stops a mount, background or foreground. JSON: mount `{"box", "mountpoint", "pid", "detached", "log"}` plus `"already": true` when it was mounted before the call; unmount `{"box", "mountpoint", "unmounted"}`.

### Ports [#ports]

`prized ports ls` lists the box's listeners and their mirror state; `prized ports toggle PORT` switches one mirror on or off ([Ports](https://prized.dev/docs/ports)). JSON: `ls` `{"ports": [{"port", "label", "process", "state", "reason"}]}`; `toggle` `{"port", "state", "reason"}`.

`prized ports share PORT` shares a port with your workspace at a prized.dev link and prints it (sharing a shared port reprints its link); `prized ports share` alone lists the box's shared ports; `prized ports unshare PORT` stops sharing ([Share a port with your team](https://prized.dev/docs/ports#share-a-port-with-your-team)). A bad port is exit 2 before any call; a port that is not shared is exit 5. JSON: `share PORT` `{"share": {"id", "boxId", "hostname", "port", "slug", "url", "createdBy", "createdAt", "openCount", "lastOpenedAt"}, "created"}`; `share` `{"enabled", "shares": [...]}`; `unshare` `{"share", "revoked": true}`.

### Agents [#agents]

`prized agents ls` shows one row per coding agent: installed and signed in here and on the box, MCP servers, where it runs. `prized agents handoff [AGENT...]` copies the named agents' sign-in and MCP config to the box (`--gh`, `--install-cursor`). `prized agents run AGENT` starts an agent detached in a tmux session (`--session`, `--dir`, `--attach`, `-- ARGS`). `prized agent upgrade [--version V]` upgrades the box agent, which normally updates itself. See [Agents](https://prized.dev/docs/agents).

### Prompt an agent remotely [#prompt-an-agent-remotely]

`prized prompt [BOX] --provider claude|codex [flags] TEXT` runs the box's coding agent headless on one prompt and follows its events until it answers. Flags: `--model`, `--effort low|medium|high`, `--cwd`, `--continue` (resume the provider's newest session), `--queue` (run after the run in progress), `--detach` (start and return the id), `--auto` (no approvals); `-` reads the prompt from stdin. `prized prompt ls [BOX]` lists runs; `prized events [BOX] [--run ID] [--follow] [--after N]` shows or follows one; `prized interrupt [BOX] [--run ID]` stops the run in progress. Only `prompt` wakes a box. Exit: 0 when the run ends cleanly, 1 when it failed or was interrupted, 130 on Ctrl-C.

JSON: `prompt --json` prints the started run and does not follow; `prompt --jsonl` and `events --jsonl` print one normalized event per line; `prompt ls` `{"runs", "active"}`; `events` `{"run", "events", "next", "finished"}`; `interrupt` `{"id", "wasRunning", "signal"}`. Shapes: [Prompt an agent remotely](https://prized.dev/docs/remote-agents).

### Team [#team]

`prized team status` is what the team is doing now, `prized team log` what happened; neither needs a box config ([Teams](https://prized.dev/docs/teams)).

```bash
prized team status
prized team log --since 7d --kind exec,prompt --member ana@acme.com
```

`team status` prints every live box (BOX, OWNER, STATE, IDLE, SESSIONS, SPEND TODAY), then every member (MEMBER, ROLE, BOXES, SESSIONS, SPEND (CYCLE), LAST ACTIVE), then a totals line; a contractor gets their own boxes. JSON: the fields of [`GET /api/v1/team/status`](https://prized.dev/docs/api#team). `team log` prints the [audit log](https://prized.dev/docs/teams#audit-log) as TIME, MEMBER, KIND, BOX, DETAIL, ORIGIN (`server` or `reported`); contractors exit 5. Flags: `--since WINDOW` (default `24h`), `--kind KINDS`, `--box BOX`, `--member EMAIL`, `--limit N` (default 100, at most 1000). JSON: `{"events": [{"id", "at", "kind", "origin", "actorKind", "actorUserId", "actorTokenId", "boxId", "detail"}], "nextBefore"}`.

### Health and updates [#health-and-updates]

`prized status` is box, sync, ports, and daemon state at a glance; `--watch 2s` keeps it open. JSON: `{"box", "sync", "ports", "daemon", "update": {"available"}}`, where `box.transport_path` is `udp`, `ws` (the port 443 fallback), or empty while the tunnel is down; an unreachable box prints `"ok": false` and exits 3.

`prized doctor` is the full health check; it applies safe repairs by default, marks them `(fixed)`, and prints only checks that failed, warned, or were fixed ([Troubleshooting](https://prized.dev/docs/troubleshooting)). Flags: `--no-fix`, `--strict` (warnings fail), `-v` (every check), `--bundle` (a diagnostics tarball; nothing leaves your machine); `--rotate-token`, `--fetch-token`, `--forget-hostkey`, `--pin-hostkey K`: agent token and host key maintenance. JSON: `{"summary": {"pass", "warn", "fail", "skip", "fixed"}, "checks": [{"id", "status", "detail", "hint", "fixed"}]}`.

`prized version` prints client, daemon, and agent versions for the box in use (`--box NAME` for another). `prized update` updates prized and the daemon in place from signed releases (`--check` only reports, `--channel` picks one); it also runs by itself ([Updates](#updates)). `prized daemon install|uninstall|start|stop|restart|status|logs` manages the daemon of the box in use (launchd on macOS, systemd --user on Linux, a Scheduled Task on [Windows](#windows)). `prized mutagen ensure` fetches Prized's managed Mutagen; the installer, `setup`, and `doctor` run it for you. `prized ops status OP [--wait]` prints or polls a deletion operation (`dop_…`) the API returned ([Deletion operations](https://prized.dev/docs/data-retention#deletion-operations)).

### Completions [#completions]

```bash
prized completion zsh > "${fpath[1]}/_prized"      # zsh
prized completion bash > /etc/bash_completion.d/prized
prized completion fish > ~/.config/fish/completions/prized.fish
```

Tab then completes commands, flags, box names on every command that takes a `BOX` (cached for 15 seconds; offline or signed out, nothing completes and nothing complains), sizes on `resize`, regions on `move`, and windows on `auto-pause`.

## Global flags [#global-flags]

| Flag            | What it does                                                                                                                                    |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `--json`        | Exactly one JSON object on stdout. Interactive commands reject it; never inferred from a pipe.                                                  |
| `-y, --yes`     | Assume yes for confirmations.                                                                                                                   |
| `-q, --quiet`   | Suppress non-essential output.                                                                                                                  |
| `-v, --verbose` | Verbose output; repeat for wire detail on stderr.                                                                                               |
| `--timeout`     | Per-request network timeout, default 10s.                                                                                                       |
| `--no-color`    | Disable ANSI color; `NO_COLOR` is honored too.                                                                                                  |
| `--box NAME`    | The box to act on (`PRIZED_BOX`): the default box, or another connected with `prized setup --box` ([Several boxes](https://prized.dev/docs/boxes#several-boxes)). |
| `--config PATH` | The config file to use (`PRIZED_CONFIG`). Overrides `--box`; an escape hatch, not the way to a second box.                                      |

## For agents and scripts [#for-agents-and-scripts]

A failing `--json` command prints:

```json
{
  "ok": false,
  "error": { "code": "CHECK_FAILED", "message": "…", "hint": "…" }
}
```

`error.code` maps 1:1 to the exit code, and both are a stable contract:

| Exit | `error.code`            | Meaning                                                                                                    |
| ---- | ----------------------- | ---------------------------------------------------------------------------------------------------------- |
| 0    |                         | Success.                                                                                                   |
| 1    | `INTERNAL`, `AWS_ERROR` | Internal or unexpected error.                                                                              |
| 2    | `USAGE`                 | A bad flag, an unknown size or region, a window without a unit, `box delete --json` without `-y`.          |
| 3    | `BOX_UNREACHABLE`       | Box unreachable, or a `--wait` that ran out its five minutes.                                              |
| 4    | `DAEMON_UNAVAILABLE`    | Daemon required but unavailable.                                                                           |
| 5    | `CHECK_FAILED`          | A precondition failed; the `hint` says what to do. Unknown boxes, sizes not on your plan, refused changes. |
| 6    | `CONFLICT`              | Already exists or cannot fit: a taken box name, the box count, a balance that cannot run the box, a port.  |
| 7    | `PARTIAL`               | A batch partly failed: some items of a `--all` run or an `agents handoff` succeeded, others did not.       |
| 8    | `AUTH`                  | Not signed in or token rejected; run `prized login`.                                                       |
| 9    | `MISSING_DEP`           | A dependency is missing; `prized doctor` usually fixes it.                                                 |
| 10   | `DECLINED`              | You declined a confirmation.                                                                               |
| 130  |                         | Interrupted.                                                                                               |

* **Two exceptions.** `prized ssh` and `prized exec` exit with the remote command's code; `prized prompt --jsonl` and `prized events --jsonl` print one object per event.
* **`--json` is opt-in.** Piping does not switch it on, so `prized box ls | head` still prints the table.
* **The same token drives the [edge API](https://prized.dev/docs/exec#the-edge-api)** and every route on the [API reference](https://prized.dev/docs/api), with no `prized` installed.
* **Sign in without a browser.** `prized login --token dcp_…` takes a CLI token from the dashboard; in a script use `--token-stdin`, since a command line is visible to other programs. Retire one under [CLI tokens](https://prized.dev/docs/workspaces#cli-tokens).
* **A whole lifecycle in a script.** `prized box new ci-$RUN --size Small --ttl 2h --wait --json`, work over `prized ssh ci-$RUN -- make test`, then `prized box delete ci-$RUN -y --json`; the deadline is the safety net if the script dies.

## Files [#files]

| Path                                 | What lives there                                                                                                                                                                                                                                               |
| ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `~/.config/prized/config.toml`       | The config of the default box: box name, sync projects, port policy, preferred agents (`[agents]`).                                                                                                                                                            |
| `~/.config/prized/boxes/<name>.toml` | The config of every other box, same schema, with its agent token beside it (`<name>.token`).                                                                                                                                                                   |
| `~/.config/prized/`                  | CLI token, SSH identity, and per-box certificates.                                                                                                                                                                                                             |
| `~/.local/state/prized/current-box`  | The box `current` names.                                                                                                                                                                                                                                       |
| `~/Prized/`                          | The default local twin of synced projects.                                                                                                                                                                                                                     |
| `~/.ssh/config.d/prized`             | The SSH stanza that makes `ssh box-3fa9` work everywhere; prized's own commands read it directly, so they work even when `~/.ssh/config` does not apply its Include line. Each alias is bound to the box it first connected to (`prized box rebind` moves it). |
| `~/Library/Logs/prized/`             | Daemon logs (`~/.local/state/prized/` on Linux).                                                                                                                                                                                                               |

On Windows everything but the sync folder and the SSH stanza lives under `%LOCALAPPDATA%\Prized` (`state\`, `cache\`, `logs\`, `mutagen\`, `boxes\`, `bin\`). An install from before the rename keeps its `doppel` names, paths, and `DOPPEL_*` variables; `PRIZED_*` wins when both are set.

## Windows [#windows]

The CLI runs on Windows 10 1809 or later and Windows 11, x64 and arm64, from PowerShell or Windows Terminal; the [quickstart](https://prized.dev/docs/quickstart#2-install-the-cli) has the install line. `prized ssh` uses the OpenSSH client that ships with Windows.

* **The daemon is a Scheduled Task**, `PrizedDaemon` (`PrizedDaemon-<name>` for a box connected with `--box`), started at logon, no administrator needed. `daemon stop` and `daemon restart` end it hard, so sessions open through it drop; `prized daemon logs` reads its log.
* **Updates rename, then replace.** A running `.exe` cannot be overwritten, so an update moves the old one aside and the next start removes the leftover.
* **No ControlMaster.** Windows OpenSSH has no connection sharing, so `prized setup` opens one connection per command; a few seconds slower.
* **Not on Windows yet:** `prized mosh`, `prized mount` and `unmount`, drag-and-drop upload in `prized ssh`, and `prized env` (setup skips the environment step and says so).
* **Symbolic links are not synced.** Mutagen cannot carry POSIX links to a Windows machine, so a link inside a synced folder stays on the box; every other file syncs the same.
* **Unsigned binaries.** The Windows executables are not Authenticode-signed; see [Troubleshooting](https://prized.dev/docs/troubleshooting#windows).

WSL is Linux to Prized: install with the `curl` line inside the distribution.

## Updates [#updates]

The CLI keeps itself current: after a command finishes, at most once every fifteen minutes, it checks for a newer release and installs the same signed, checksum-verified download `prized update` performs; the next command prints a one-line note. The daemon restarts onto the new version as soon as no SSH session runs through it (a live `prized ssh` or an external SSH client holds it; sync, mounts, port forwards, and mosh do not); `prized version` shows a pending restart, `prized daemon restart` does it now. With [several boxes](https://prized.dev/docs/boxes#several-boxes), each box's daemon restarts on its own, the next time a command reaches that box.

Turn it off with `auto = false` under `[update]` in the config, or `PRIZED_NO_AUTO_UPDATE` in your environment. Homebrew installs are never touched (`brew upgrade prized` stays in charge), and from-source builds never self-replace. `prized update` is the manual path; `--check` only reports. A CLI below the minimum the API supports exits 5 with a `prized update` hint until you update. Releases before 0.7.0 do not update themselves; the dashboard names a machine still on one until `prized update` runs there.

## Usage telemetry [#usage-telemetry]

While you are signed in, the CLI records which command ran, its version, OS, duration, and exit code, and sends those counts in occasional batches. It never records arguments, flags, paths, or file contents, and sends nothing while you are signed out. When a `prized setup` step fails, the batch also carries one word from a fixed list naming which check failed (for a run that stops at its doctor pass, the first failing doctor check), never the message you saw.

Turn it off either way:

```toml
# in ~/.config/prized/config.toml
[telemetry]
enabled = false
```

```bash
# or per shell
export PRIZED_NO_TELEMETRY=1
```

This switch covers the CLI only. For the website and dashboard, see [Privacy](https://prized.dev/docs/privacy).
