baton

Set up with your agent

Copy one prompt into Claude Code, Cursor, or Antigravity and let it install Baton, wire up your project, and start the dashboard.

You already have an AI coding agent. Let it do the install.

Copy the prompt below, paste it into Claude Code, Cursor, Antigravity, Codex, or Gemini with your project open, and it will build Baton, index your repo, wire up the agent CLIs you actually use, start the dashboard, and leave you a GETTING_STARTED.md.

Why a prompt and not a script

The prompt doesn't contain the install steps — it points your agent at AGENTS.md in the Baton repo, which is the install guide, written for an agent to follow. So the prompt can't drift out of date, and you can read exactly what your agent is about to do before you paste anything.

The prompt

Your agent asks you six short questions first — the ones where a wrong guess means re-doing the setup — then does the whole thing.

Set up Baton for this project.

Baton is a local CLI + dashboard that coordinates multiple AI coding agents on one
git repo. It installs from npm as `batonhq`; the command it provides is `baton`.

Do this:

1. Install it:
   npm install -g batonhq
   Then confirm with `baton --version`. If the global install fails on permissions,
   prefix every later command with `npx batonhq` instead and tell me.

2. Read https://github.com/Rakshan001/Baton-Multi-Agent-/blob/main/AGENTS.md and follow
   it top to bottom. It is the install guide and it is written for you. Treat it as the
   source of truth — prefer it over anything you already believe about Baton.

3. Step 1 of AGENTS.md asks me six questions: which project to coordinate, single
   repo vs multi-repo hub, shared vs local knowledge base, which agent CLIs I use,
   dashboard port, and read-only vs --write. Ask me all six BEFORE running anything
   past the preflight. Do not answer them for me, and do not run `baton setup --yes`.

4. Then do Steps 2 through 6: install Baton, wire up my project, start the dashboard,
   write me a GETTING_STARTED.md, and summarise what you did and why.

If Step 0's preflight finds Node < 24 or no git, stop and tell me instead of working
around it. A missing uv/pipx is fine — that only costs the knowledge graph, and setup
continues without it.

Same install, with the six answers pre-filled. Use this when your project is one git repo and you just want it running.

Set up Baton for this project. Don't ask me the setup questions — my answers are below.

Baton is a local CLI + dashboard that coordinates multiple AI coding agents on one
git repo. It installs from npm as `batonhq`; the command it provides is `baton`.

1. Install it:
   npm install -g batonhq
   Then confirm with `baton --version`.

2. Read https://github.com/Rakshan001/Baton-Multi-Agent-/blob/main/AGENTS.md. It is the
   install guide and it is written for you. Follow Step 0 and Steps 2 through 6, and
   treat it as the source of truth.

3. Skip Step 1's questions. My answers:
   - Target project: the folder I have open.
   - Setup mode: single repo. If it turns out to be a folder holding several separate
     git repos, STOP and ask me — do not guess between hub and individual.
   - Knowledge base: local only (not committed).
   - Agent CLIs: whichever of claude, cursor-agent, codex, gemini, agy, aider and
     opencode are actually on my PATH. Check; don't assume.
   - Dashboard port: 7077.
   - Write mode: read-only for now.

4. When the dashboard is up, tell me the URL, what you installed and where, which
   agents you wired, and where GETTING_STARTED.md landed.

If Step 0's preflight finds Node < 24 or no git, stop and tell me instead of working
around it. A missing uv/pipx is fine — that only costs the knowledge graph, and setup
continues without it.

Where to paste it

Run claude from your project folder and paste the prompt as your first message. The IDE extension works the same way.

It will ask permission to run shell commands (npm install -g batonhq, then baton …) and to write files in your project — it needs both. Approve them as they come, or start the session in a mode that lets it run builds.

Claude Code is Baton's most complete integration: baton setup writes .mcp.json, which Claude picks up automatically in every worktree, and baton hooks install claude adds the session-end hook that writes a handoff brief when a session runs out.

Open your project, open the agent sidebar (⌘I / Ctrl+I), make sure it's in Agent mode — not Ask — and paste the prompt.

Agent mode is what lets it run terminal commands; in Ask mode it will only describe the steps back to you. If you'd rather stay in the terminal, cursor-agent in the project folder takes the same prompt.

Open your project, open the Agent Manager, start a new agent task, and paste the prompt. The agy CLI takes the same prompt from the project folder.

Antigravity is a first-class target: Baton writes its MCP config to .agents/mcp_config.json in your repo, so once setup finishes it can see the knowledge graph and the coordination tools like any other agent.

Run codex or gemini from your project folder and paste the prompt.

One difference worth knowing before it starts: both keep their MCP config in your home directory (~/.codex/config.toml, ~/.gemini/settings.json) rather than in the repo. Baton won't write a global file without an explicit confirmation, so expect to be asked once — or to run baton connect --agents codex,gemini --yes yourself afterwards.

What it will ask you

Only the guided prompt asks these, and only these. Two of them are worth thinking about for a moment; the rest are one-word answers.

QuestionWhat it decides
Which project?The repo Baton coordinates. Not where Baton itself lives.
Single repo, hub, or individual?The one that's expensive to change later. One product split across several repos → a hub gives you one merged cross-repo graph. Unrelated repos → individual. See Setup & multi-repo hubs.
Shared or local knowledge base?Shared commits a kb/ directory so teammates clone-and-go with zero re-indexing. Local keeps it in gitignored .baton/. Solo → local; team → shared.
Which agent CLIs?Which MCP configs and hooks get written.
Dashboard portDefault 7077.
Read-only or --write?Whether merge / remove / rebuild buttons work in the dashboard. Read-only is the safe start.

Check it worked

Your agent should report these itself, but they're quick to confirm:

Then open http://localhost:7077. If it says dashboard not built, the web build was skipped — run npm run build --prefix web in the Baton checkout and restart baton serve.

To wire more agents after the fact, one command does all of them:

If the prompt doesn't fit your agent

Some agents can't run shell commands, or are sandboxed away from the network. Nothing is lost — the Quickstart is the same install done by hand, and it's about six commands.

AGENTS.md is also just a file. If your agent can't reach GitHub but can read your filesystem, clone the repo yourself and point it at the local copy instead.

What you're approving

This prompt has your agent clone a repo, run npm install and a build, write MCP config files into your project, and start a local daemon. Nothing leaves your machine — the daemon binds to 127.0.0.1 — but it is a real install, so read AGENTS.md first if you want the exact list before you paste.

Next

On this page