Deploying from AI coding agents
AI coding agents (Claude Code, Cursor, Codex, Windsurf, Aider, your own scripts) can deploy bohr projects with the bohr CLI: build, upload and get a preview URL to show you, without a browser and without your password.
This section is written for you and for the agent. Point your agent at it, or give it the ready-made instructions:
- AGENTS.md / CLAUDE.md snippet: paste into your repository’s instructions file.
- SKILL.md: a skill file the agent loads when it needs to deploy.
The short version
Section titled “The short version”# 1. You: create a token in the panel (Account › Tokens), limited to the project, and give it to the agentexport BOHR_TOKEN=bohr_…
# 2. The agent: find the project oncenpx --yes bohr@latest projects --json
# 3. The agent: deploy a preview after each change, and read "url" from the JSONnpx --yes bohr@latest deploy --project p3k9x0a7qd2m --branch agent/new-header --jsonHow it fits with bohr’s own agent
Section titled “How it fits with bohr’s own agent”bohr already has an agent that changes your site from a chat, with a preview and an approval. An external coding agent is for when you work in your editor or terminal instead: it changes the code locally and uses bohr deploy to publish previews of its work.
| bohr’s agent | Your coding agent + CLI | |
|---|---|---|
| Where it runs | The sandbox in your Cloudflare account | Your machine, or the agent’s own sandbox |
| Preview | The homolog branch, approved in the panel |
Any branch name, with bohr deploy |
| Production | Approve in the panel or on Telegram | bohr deploy --prod (owners), only when you ask |
Read on
Section titled “Read on”- Set up a token: scoped, non-interactive.
- The deploy loop:
--json, exit codes, and preview vs--prodetiquette. - AGENTS.md snippet and SKILL.md.