# 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]

Create the box in the [dashboard](https://prized.dev/dashboard), then paste this into your agent on your machine, in the project you want on the box. It covers steps 2 through 4 of the [Quickstart](https://prized.dev/docs/quickstart).

```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. https://prized.dev/llms.txt lists every page; fetch the ones you need as Markdown by adding .md to a page URL (https://prized.dev/docs/quickstart.md).

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.md.

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, ask me whether I have a Prized account. If I do, stop and ask me to run `prized login` in another terminal, or to paste an API key from the dashboard for `prized login --token <key>`. If I don't, ask for my email address and follow https://prized.dev/auth.md: Prized emails me a 6-digit code, I give it to you, and you get an API key for my new account. Then run `prized login --token <key>` and never print the key. If that page is not available, stop and ask me to run `prized login` in another terminal.
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: no credentials, settings, or MCP configuration were copied, and any existing box sign-in was left alone. A local sign-in that cannot be read also leaves the box unchanged. 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]

| It asks about    | What happens                                                                                                                                                                                                                                                                  |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Sign-in          | Run `prized login` yourself, or give the agent a key from the dashboard. New to Prized? The agent can make your account with your email address and the 6-digit code Prized emails you ([Agent sign-in](https://prized.dev/docs/agent-sign-in)); give the code only to the agent you are using. |
| The project      | In place, `--copy`, or `--clone` ([Sync](https://prized.dev/docs/sync#add-a-project) compares them); no to all three still leaves a signed-in CLI and a healthy box.                                                                                                                            |
| Your environment | The groups `prized env plan --json` lists; the ones you accept go in `--env`, and secrets and data are their own yes ([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 ([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.

Signing in to Claude Code on the box? Select the sign-in link and press **c** to copy it through `prized ssh` ([Copy out](https://prized.dev/docs/sessions#copy-out)). To run agents on the box afterwards, see [Agents](https://prized.dev/docs/agents).
