Skip to content

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:

Terminal window
# 1. You: create a token in the panel (Account › Tokens), limited to the project, and give it to the agent
export BOHR_TOKEN=bohr_…
# 2. The agent: find the project once
npx --yes bohr@latest projects --json
# 3. The agent: deploy a preview after each change, and read "url" from the JSON
npx --yes bohr@latest deploy --project p3k9x0a7qd2m --branch agent/new-header --json

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
  1. Set up a token: scoped, non-interactive.
  2. The deploy loop: --json, exit codes, and preview vs --prod etiquette.
  3. AGENTS.md snippet and SKILL.md.