---
title: "Agent-Native Setup: Let Coding Agents Operate Caveman"
description: Configure Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, OpenCode, or Caveman Code with one command, or onboard headless agents with zero browser.
canonical: https://docs.caveman.so/guides/agent-native-setup
product: Caveman Cloud
tab: Documentation
group: Get Started
---

# Agent-Native Setup: Let Coding Agents Operate Caveman

> Configure Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, OpenCode, or Caveman Code with one command, or onboard headless agents with zero browser.

Caveman is built so your coding agent can set up, deploy, debug, evaluate, and operate the platform directly from its shell or over MCP. Every command emits clean JSON when piped, exits with deterministic status codes, and exposes live schemas on demand.

Looking to wire an existing app manually via SDK headers? Use [Connect a Workload](/guides/connect-workload).

## One-command setup for coding agents

```bash
npx -y @caveman-ai/cloud setup
```

`cvm setup` runs six idempotent steps and writes nothing into your repository:

1. **Installs `cvm` globally** (if run via `npx`, `pnpm dlx`, or `bunx`, it installs `@caveman-ai/cloud` globally unless a newer version is already on `PATH`).
2. **Signs in** via browser device flow unless a saved login or `CAVE_TOKEN` already works.
3. **Selects the project** from `--project UUID`, `CAVE_PROJECT_ID`, `.caveman-cloud.json`, or a terminal picker.
4. **Detects installed coding agents**: Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, OpenCode, and Caveman Code. Pass `--agent claude,codex,cursor` to restrict the list.
5. **Installs the four core Cloud skills**: `caveman-cloud`, `caveman-deploy`, `caveman-sandbox`, and `caveman-drive` into `~/.claude/skills` (Claude Code) and `~/.agents/skills` (all other agents). Add optional skills any time with `cvm skills add <name|all>`.
6. **Registers the `caveman-cloud` stdio MCP server** in each agent's user config file, preserving every other server byte for byte. Caveman Code signs in directly and needs no extra MCP entry.

When run outside a TTY (an agent's shell or CI, or with `--format json`), `cvm setup` prompts for nothing and emits a single JSON summary:

```bash
cvm setup --project YOUR_PROJECT_ID --yes --no-launch --format json
```

## Headless zero-browser signup (for autonomous agents)

An autonomous agent running in a terminal or CI container without a browser can sign up, receive a scoped `code:run` key, and verify with a 6-digit human OTP:

```bash
cvm signup --email you@company.com --agent my-agent --accept-terms
cvm verify 123456
```

`cvm signup` creates an organization, caches a scoped `code:run` key locally, and emails a 6-digit verification code. Once verified, the agent can immediately boot sandboxes (`cvm run-box` or `cvm sandbox create`) and deploy agents.

## Copy-paste prompts for your coding agent

After running `cvm setup`, open Claude Code, Codex, Cursor, or Caveman Code in your repository and give it one of these tasks:

**Deploy an agent**

```text
Initialize a Caveman agent in ./agents/triage using `cvm agent init`, configure its AGENT.md for our support workflow, test it locally with `cvm agent build`, and deploy it with a $2 session budget using `cvm deploy --dry-run` first so I can review the plan.
```

**Wire gateway telemetry**

```text
Verify our Caveman Cloud project with `caveman_context`, find every LLM callsite in this repo, wire them to the Caveman gateway in record mode with `x-cave-agent` and `x-cave-workflow` headers, send one small verification call, and show me the trace ID from `cvm traces search`.
```

**Add CI evals**

```text
Create an eval suite with `cvm evals init evals/core.eval.json`, add 5 real test cases from our fixtures, validate it with `cvm evals validate`, and run `cvm evals run evals/core.eval.json --set-baseline-on-pass`.
```

**Spin up a sandbox**

```text
Run `cvm sandbox init` to inspect this repo's stack and `.env` bindings, show me the plan (zero secrets inside the VM), then run `cvm sandbox up` and execute our test suite inside the sandbox.
```

## How coding agents discover live schemas

Never hardcode API paths or guess CLI flags in agent prompts. `cvm` and the Cloud MCP server expose live schema discovery:

```bash
# CLI discovery (JSON when piped)
cvm tools list
cvm tools describe traces.search
cvm sql --schema
cvm sql --schema requests
```

Over MCP, agents start with `caveman_context`, then discover operations via `caveman_search` and `caveman_describe` before calling `caveman_read` or `caveman_write`. See [Cloud MCP Server](/cli/mcp).

## Reading docs.caveman.so as an agent

Every page on this documentation site has a clean Markdown twin generated from the exact same source:

| Endpoint | What it returns |
| --- | --- |
| `<page-url>.md` | That page as plain Markdown with YAML front matter (for example, `https://docs.caveman.so/cli/cvm.md`). |
| `Accept: text/markdown` | Sending this header to any page URL returns a `303` redirect to its `.md` twin. |
| `/llms.txt` | Compact reading index of all products, groups, and `.md` URLs. |
| `/llms-index.json` | Machine routing index with every page's headings, anchor IDs, and product metadata. |
| `/llms-full.txt` | Every documentation page concatenated in reading order. |

## Verify and undo

Verify installed skills, MCP entries, and sign-in:

```bash
cvm auth status
cvm skills list
```

Remove every skill and MCP entry added by `cvm setup` (keeps your sign-in intact and leaves unrelated agent settings untouched):

```bash
cvm setup --remove
```

## Limits

- `cvm setup` refuses to overwrite a JSON config containing comments or a `caveman-cloud` MCP entry it did not create; it prints the snippet to merge manually and exits `1`.
- Skills are only replaced when they carry `cvm`'s `.cvm-version` marker; user-authored skills are never overwritten.
- `cvm signup` requires `--accept-terms` and a human 6-digit OTP verification step (`cvm verify`) before full account use.
