# Agent setup

> Paste one prompt into Claude Code or Codex on your machine; the agent installs the CLI, runs prized setup, and asks before putting your project or your credentials on the box.

URL: https://prized.dev/docs/agent-setup

## One prompt [#one-prompt]

Open your agent on your machine, in the project you want on the box, and paste the prompt below. It covers steps 2 through 4 of the [Quickstart](https://prized.dev/docs/quickstart); create the box in the [dashboard](https://prized.dev/dashboard) first. The agent asks you about the project and each credential before touching them, and relays your choices as flags.

```text title="Prompt"
Set up Prized on this machine and, if I confirm each part, put this project and my coding agents on my box. Prized is a cloud dev box that syncs folders with this machine; the docs live at https://prized.dev/docs (plain-text mirror at /llms-full.txt).

Rules: copy, never move or delete; never print credentials or read ~/.config/prized; ask me before installing software, before transferring any credential, and before doing anything that could cost money. Non-interactive prized commands accept --json and print exactly one JSON object with an "ok" field; error codes and exit codes are stable and listed at https://prized.dev/docs/cli.

1. Install: if `prized version` fails, ask me, then run this and re-check (on Windows, in PowerShell: irm https://prized.dev/install.ps1 | iex):
   curl -fsSL https://prized.dev/install.sh | sh
2. Sign in: if prized commands fail with code AUTH or a "prized login" hint, stop and ask me to run `prized login` in another terminal (it needs my browser). I can instead paste a CLI token from the dashboard for you to use as `prized login --token <token>`.
3. Everything else is one command, safe to re-run:
   prized setup --json --non-interactive
   It never prompts; each consent-gated step runs only when its grant flag is present and is reported as skipped otherwise. Ask me before adding each flag, and only pass the ones I say yes to:
   - `--project <path>`: sync this folder with the box in place; the folder itself becomes the live side and the box wins conflicts. Ask me first. Two alternatives are their own distinct grants, so relay my choice exactly: `--copy` syncs a copy under ~/Prized and leaves the folder alone; `--clone` clones the repo onto the box over git with no live mirror, the right choice for a repo I actively work in elsewhere. Say which one I picked in your report; if I say no to all of them, run setup without --project.
   - `--agent claude|codex|cursor|chatgpt` (repeatable): hand that agent's sign-in and MCP config to the box. Ask me per agent.
   - `--install-cursor`: run Cursor's installer on the box. Its own yes.
   - `--gh`: copy my GitHub CLI token and git identity (an interactive setup does this on its own; your non-interactive run needs the flag). Its own yes.
   - `--env <groups>`: bring parts of my local environment to the box without asking: shell, python, node, tools, clis, docker, services (comma-separated). Run `prized env plan --json` first and read me the groups and items it lists; pass only the groups I say yes to.
   - `--env-secrets`: copy my secrets: the project's `.env` files, secret-looking env vars, and CLI sign-in files (aws, gcloud, kubectl, ...). Its own yes.
   - `--env-data`: copy database contents, Docker volumes, and local-only images; the plan shows sizes. Its own yes.
   If setup fails with exit 5 naming multiple candidate boxes, ask me which one and re-run with `--box <name>`; if it finds no box on the account, ask me to create one in the dashboard. Read steps[] in the JSON: "skipped" entries name what was declined or not granted, "failed" entries carry the hint.
4. Claude Code sign-in copies from this machine when I am signed in here, so `--agent claude` works from your run. If the claude row comes back manual with the note "no Claude Code sign-in on this machine to copy", this machine is not signed in to Claude Code: nothing was copied, and there is nothing for you to fix. Relay the row's steps to me (`prized ssh <box>`, then `claude`, then `/login` inside it); I sign in once on the box and it persists there.
5. Verify: `prized status --json` reports ok; if we set up the project as a sync (not `--clone`; a clone has no sync session), also that `prized sync flush <name>` completes. Check `prized agents ls --json` shows each chosen agent installed and signed in on the box.
6. Report: the box name, the project path on both sides (or the clone path on the box, or that I chose to keep this repo local), which project mode I granted, each agent's handoff outcome, and the reattach command for any session setup started.
```

## What the agent asks you [#what-the-agent-asks-you]

* **Sign-in.** `prized login` needs your browser, so the agent stops; run it yourself, or mint a CLI token in the dashboard for `prized login --token`.
* **The project.** In place, `--copy` (a synced copy under `~/Prized`), or `--clone` (a git clone, no mirror); say no to all three and you still get a signed-in CLI and a healthy box. The modes are compared in [Sync](https://prized.dev/docs/sync#add-a-project).
* **Your environment.** The groups from `prized env plan --json`, then `--env` with the ones you accept; secrets and data are their own yes. See [Bring your environment](https://prized.dev/docs/environment).
* **Each credential.** One flag per yes (`--agent <name>`, `--gh`, `--install-cursor`); the transfer runs over the SSH tunnel and the agent never handles a value. See [Credentials](https://prized.dev/docs/credentials).

> Agents you picked before are saved as `[agents].preferred`, so a later run hands them off without `--agent`; `--no-agents` runs on nothing but its own flags.

Every command in the prompt is safe to re-run. For running agents on the box afterwards, see [Agents](https://prized.dev/docs/agents).
