
# How do I deploy an app built with Claude Code, Cursor or Codex?

Install agc, run `agc init` in the app's folder, and let the agent take it from there. The first release needs no approval. The app is live at `https://<name>.ac0.app` when `agc ship` returns exit 0 with `"outcome": "live"`. If the agent isn't connected to an account yet, the first ship runs at a private preview, and you sign up with the publish link to put it live.

`agc init` creates the app on Agent Cloud and infers an `agentcloud.toml` from the code. It also writes an `AGENTS.md` section that Codex and Cursor read, plus a `CLAUDE.md` pointer for Claude Code, so the agent knows the commands without being taught.

## Ask your agent

Open the agent in the app's root folder and paste:

```text
Put this app online with Agent Cloud. Install agc with npm, run agc init here, follow the
AGENTS.md it writes, and give me any link I need to open. Don't ask me for passwords or keys.
```

You get the app's URL. If you haven't signed up yet, you get a private preview link to try it and a publish link that puts it live.

## Steps

```bash
npm install -g https://agent.cloud/agc.tgz
agc init
agc doctor
agc up --detach
agc check
agc ship
```

| Step | What happens | What you do |
|---|---|---|
| `agc init` | Creates and links the app; takes its name from `package.json` or `pyproject.toml`, or asks for one: then run `agc init --name <name> --bring` | Open the `claim_url` it prints |
| `agc up --detach` | Runs the app on your machine against its own database branch | Look at it on `localhost` if you like |
| `agc check` | Runs the app's checks on that copy | Nothing |
| `agc ship` | Builds, rehearses when there's something to check, and goes live (exit 0). An app nobody owns yet stops at a private preview (exit 10, `ship.preview`) | Open the preview link; sign up with the publish link to put it live |

The TypeScript stack needs Node 24 (with npm) and git. In an empty folder, `agc init --name <name>` starts from a working TypeScript starter; add `--stack python` for a Python (FastAPI) server.

## Does my app fit?

Agent Cloud runs one web server that listens on `PORT` (Node, Python with uv, or your own Dockerfile), a Postgres database, and optionally one background worker (`[service.worker]`). [Which platform should my agent deploy to?](/docs/compare/which-platform-should-my-agent-deploy-to.md) walks through the choice.

## How it works

The agent never needs a production password. Every agc command answers JSON with `ok` and a `next` list. The agent follows `next` rather than guessing. agc picks JSON when it sees `AI_AGENT`, `CLAUDECODE`, `CURSOR_AGENT`, `CI`, `CODEX_SANDBOX` or `CODEX_THREAD_ID` in the environment, or when output isn't a terminal. `--json`, `--human` or `AGC_OUTPUT` override that.

`agc ship` snapshots the folder, builds an image, and rehearses on a copy of production when there's something to check. It asks a person only when a rule requires one. A first release goes out on its own with `routine` autonomy, so code-only releases go live by themselves. The app's owner can switch it to `watch`, where every release asks them. An app nobody owns yet runs at a private preview until its person publishes it.

To teach Codex about agc in every project, before any app exists, run `agc agent install codex`. Claude Code and Cursor pick agc up from the app folder's `CLAUDE.md` and `AGENTS.md`.

## Agent notes

- Relay `claim_url` to the person exactly as printed. An unclaimed app is deleted 7 days after the agent was created; `data.claim_by` gives the deadline.
- Exit 10 with `ship.preview` is the expected first ship of an app nobody owns, not a failure: relay `data.relay` word for word, then `agc wait <op>`, which answers `"outcome": "live"` once the person publishes.
- Production starts empty. To bring the app's current data, start with `agc import <dump>` before the first ship: it checks the dump and answers with an `import_url` for the person ([Importing existing data](/docs/data/importing-existing-data.md)).
- Any other exit 10 means a person decides. Relay the decision; don't approve it yourself.

## Related

- [Quickstart: an existing app](/docs/getting-started/quickstart-existing-app.md)
- [Quickstart: a new app from an empty folder](/docs/getting-started/quickstart-new-app.md)
- [Working with your coding agent](/docs/getting-started/working-with-your-coding-agent.md)
- [Recommended stack](/docs/build/recommended-stack.md)

<!-- feedback:start -->
---
Wrong, outdated or unclear? Run `agc feedback docs "questions/deploy-an-app-built-with-claude-code-cursor-or-codex: <what is wrong>" --body <file>` with the sentence quoted in the file. No code or app data is sent.
<!-- feedback:end -->
