
# Quickstart: a new app from an empty folder

Start here if you have no code yet. `agc init` creates the app and writes a small working starter for your agent to build on. You're done when `agc ship` exits 0 with `"outcome": "live"` and the app answers at `https://<name>.ac0.app`.

```bash
agc init --name camp-bookings
```

## Ask your agent

Open Claude Code, Codex or Cursor in a new, empty folder and paste:

```text
Build an app where parents book spots in our summer camps, and run it on Agent Cloud.
```

You get a private preview link to try the app, and a publish link that signs you up and puts it live. [Started from the console](#start-from-the-console), the first ship goes straight to live.

## Steps

**1. Install agc** (once per machine; it keeps itself current):

```bash
npm install -g https://agent.cloud/agc.tgz
```

Or `curl -fsSL https://agent.cloud/install | sh` ([Installing agc](/docs/getting-started/installing-agc.md)); the TypeScript starter still needs Node 24 and git.

**2. Create the app** in a new, empty folder. The name becomes the web address and can't change, so name it for what it does. The starter is a React UI and a TypeScript or Python server, with sign-in, email, a job queue and checks wired in.

```bash
mkdir camp-bookings
cd camp-bookings
agc init --name camp-bookings
```

| Folder or flag | Result |
|---|---|
| Empty, or only `.git`, `.DS_Store`, `Thumbs.db`, `desktop.ini`, `.claude`, `.cursor`, `.vscode`, `.idea`, `.zed` | The app is created |
| Anything else, `AGENTS.md` included | `init.not_new_folder` (`init.folder_not_empty` with `--stack`) |
| Inside another git repository | `init.not_new_folder`, unless you pass `--stack` |
| `--stack python` | A Python (FastAPI) server with the same React UI |
| No `--stack` | Your connected organization's default stack, else TypeScript |

The answer, abbreviated:

```json
{
  "ok": true,
  "product": "agent.cloud",
  "command": "init",
  "data": {
    "app": "camp-bookings",
    "claim_url": "https://agent.cloud/claim/camp-bookings?code=…",
    "stack": "typescript",
    "claim_by": "2026-10-27T15:04:05.000Z"
  },
  "next": [
    { "cmd": "npm ci", "why": "install the dependencies (agc up doesn't)" },
    { "cmd": "agc up --detach", "why": "start your mirror: the app on localhost, reloading on save" }
  ]
}
```

**3. Open the claim link.** Sign in, pick the organization and what the agent may do (Builder is preselected), and claim ([Claiming an app](/docs/getting-started/working-with-your-coding-agent.md#claiming-an-app-and-connecting-your-agent)). It works until `claim_by` (7 days after this machine's agent was made). Unclaimed at the first ship, it becomes the publish link.

**4. Install dependencies:** `npm ci`, or `uv sync && npm ci` for Python (with `uv` on PATH). `agc up` also installs from the lockfile when `node_modules` is missing or older than `package-lock.json`.

**5. Start the mirror and check it.** The mirror is your own copy of the app on your machine; it reloads as the agent edits.

```bash
agc up --detach
agc check
```

It runs on the app's own empty database, after the starter's migrations and `seed.sql`. Open the `url` it prints (`http://127.0.0.1:<port>`) to see a welcome page at `/` and a Notes example at `/notes`, yours to replace.

**6. Draw the app's icon** as an SVG by the rules `agc help icon` gives, then set it ([Your app's icon](/docs/build/your-apps-icon.md)). Until then the app has a default, and `agc check` warns.

```bash
agc icon use icon.svg
```

**7. Ship:**

```bash
agc ship
```

The first release needs no approval. After the build and rehearsal pass:

| Whose app | What `agc ship` answers | What the person does |
|---|---|---|
| Claimed, or made with a console join code | Exit 0, `"outcome": "live"`, the URL and a receipt (exit 10 with an approval link if it was set to `watch` at the claim) | Opens the app |
| Nobody's yet | Exit 10, `"outcome": "preview"` (`ship.preview`), with `data.preview_url`, `data.publish_url` and a `data.relay` line to pass on word for word | Tries the private preview, then signs up and presses **Publish** on the publish link |

After publishing, `agc wait op_…` answers exit 0, `"outcome": "live"` and a receipt.

Everything before the ship, as one sequence:

```bash runnable
mkdir camp-bookings
cd camp-bookings
agc init --name camp-bookings --stack typescript
npm ci
agc up --detach
agc check
```

## Start from the console

With an organization, start in the console instead: the agent creates the app there, already yours, with no claim link. On **Start an app** (`/console/start`), fill in **What should the app do?** (optional), leave **Pick your agent** on **On this computer**, choose **Make prompt**, then **Copy prompt** and paste it to your agent. It carries a single-use join code (`agcj_…`; "one use · expires in 24 h"). Its key line:

```text
Create it in my organization on agent.cloud: run agc init --name <a name for what it does> --join agcj_…
```

| With a join code | What happens |
|---|---|
| The prompt | Also says to work in a new, empty folder, to ask for a new prompt on `init.join_expired`, and, if `init.join_other_org` persists, to rerun with `--reset-identity` under a new, empty `AGC_HOME` kept for the app. It names connections you picked, each to declare as `[connection.<name>]` |
| Success | `data.org`, `data.approvers` and `data.task`; no `claim_url` |
| A later step fails | Joining still sticks: retry without `--join`, as `next` says |
| The agent | Connected to you in that organization as Builder; narrow it in **Your agents**. A code for a second organization makes a separate agent ([Local state](/docs/reference/agc-environment-variables.md#local-state)); `data.identity.note` says so |
| Stack and sign-in | The organization's defaults ([New-app defaults](/docs/owners/new-app-defaults.md)) |
| `AGENTS.md` | Gains a `## Your organization` part: name, approvers, where the app runs, sign-in, default stack, context docs, connections |
| First ship | Goes live on its own once its rehearsal passes; later releases that need a person ask you or an organization owner (`approvers`), usually in chat (`decision.in_session: true`) |
| First task | **What should the app do?** becomes task `<name>#1`, word for word, owned by this agent; the first `agc ship` carries it. Or `agc init --prompt "<the person's words>"` |
| Your prompts | Unused (hours left), used (by which agent, for which app), revoked or expired; **Revoke** ends an unused one |

**An existing repo.** Run the prompt's `agc init` line in the repo's root with `--bring` added. agc infers `agentcloud.toml`, keeping an existing one.

## How it works

`agc init` creates the app and its production database before writing any file, so an early failure leaves the folder empty, and one while writing removes what it wrote (`init.write_failed`). A retry links the same app. The starter comes from the release pinned in agc, refused unless its sha256 matches. On a fresh machine, `agc init` also makes an unclaimed agent identity in `~/.agentcloud`.

It writes `agentcloud.toml` (with your name and `starter = "typescript@<version>"` under `[app]`), `AGENTS.md` (the starter's section, then Agent Cloud's), `CLAUDE.md`, `STARTER-LICENSE` (MIT) and `.gitignore`.

## Errors

Every code, its exit and fix: [Error code catalog](/docs/reference/error-code-catalog.md). Running `agc init` with no name in an empty folder:

```json
{
  "ok": false, "product": "agent.cloud", "command": "init",
  "error": { "code": "init.name_needed",
             "message": "Nothing names this app yet, and the folder's name (\"camp-bookings\") would become its web address …",
             "fix": "Name the app for what it does, in a few words joined by hyphens (like spend-approvals), and run `agc init --name <name>`. …",
             "retryable": false },
  "next": [ { "cmd": "agc init --name <name>", "why": "the name becomes the web address people use" } ]
}
```

## Limits

| What | Limit |
|---|---|
| Unclaimed apps per agent | 3 |
| New apps per agent per organization | 5 a day |
| Join code | `agcj_` plus 20 base32 characters; single use; 24 hours |
| Unused codes per member | 20 from the last day (used and revoked ones don't count) |
| Starters download | 5 MB, 30 s timeout |

App name, `--prompt` and approval limits: [Limits and quotas](/docs/reference/limits-and-quotas.md).

## Agent notes

- Relay `claim_url`, `data.relay` and `approval.url` exactly as printed; never open or summarize them. Publishing and approving are the person's steps.
- Post `data.tell_person` ([the Live screen](/docs/ship/the-live-screen.md) link) to the person word for word, once per item.
- `agc up --detach` and `agc up` both run the mirror in the background today; `agc down` stops it.
- Pass a join code exactly as written and never paste it elsewhere: whoever uses it builds as the person. AGENTS.md's "Your organization" part beats your own defaults.

## Related

- [Installing agc](/docs/getting-started/installing-agc.md)
- [Quickstart: an existing app](/docs/getting-started/quickstart-existing-app.md)
- [Starters](/docs/build/recommended-stack.md#starters)
- [Organizations](/docs/owners/setting-up-an-organization.md#organizations-and-roles)

<!-- feedback:start -->
---
Wrong, outdated or unclear? Run `agc feedback docs "getting-started/quickstart-new-app: <what is wrong>" --body <file>` with the sentence quoted in the file. No code or app data is sent.
<!-- feedback:end -->
