Get started
Quickstart
Install the CLI, sign in, set up a repo, verify it, and watch Comity catch your first conflict.
On this page
You need Node.js 22 or newer, a git repository with a remote (for example on GitHub), and Claude Code or Codex. Allow about ten minutes.
1. Create your org
Sign up at comity.so/signup and create an org. The org's slug (e.g. acme) is how the CLI and API address it. If a teammate already uses Comity, accept their invite instead.
2. Install the CLI
npm i -g https://api.comity.so/cli/comity-cli.tgz
comity --version3. Sign in
comity loginThe CLI shows a code and opens your browser. Check that the code matches, pick the org, and click Approve. The CLI stores a token for this machine in your user config folder:
On a machine without a browser, comity login still works: open the printed URL on any device where you are signed in to Comity and enter the code.
4. Set up a repository
cd ~/code/acme-api
comity initIn a terminal, init asks which agents to set up and pre-selects the ones it finds. It writes:
- Claude Code:
.claude/settings.json(hooks) and.mcp.json(MCP server) - Codex:
.codex/hooks.json(hooks) and.codex/config.toml(MCP server)
No token is written. Commit the files so every teammate's agents are coordinated as soon as they pull and have run comity login:
git add .claude/settings.json .mcp.json .codex/hooks.json .codex/config.toml
git commit -m "Set up Comity for coding agents"5. Check the setup
comity doctorFollow any › hint it prints. See Troubleshooting for each failure.
6. Start your agent
- Claude Code: start
claudein the repo, accept the folder trust prompt and approve thecomityMCP server. - Codex: start
codex, trust the project, then open/hooksand approve the comity hooks. Codex skips them until you do.
At session start the agent receives a Comity briefing, including the line Your Comity session: <uuid>. Ask the agent "What did Comity tell you at session start?" to see it. Your session now appears in the dashboard under Activity.
7. See your first conflict
Comity compares agents working in different checkouts: different developers, or one developer with two worktrees. To try it alone, make a second worktree:
git worktree add ../acme-api-b -b try-comity-b- In the original checkout, ask an agent to change a function, for example: "Add a
currencyparameter toformatPriceinsrc/money.ts." - In
../acme-api-b, start a second agent and ask it to change the same function differently: "RenameformatPricetoformatAmount."
After the second agent's edit, Comity adds context like this to that agent:
The conflict also appears in the dashboard under Conflicts, with both sides, what overlaps and a suggested next step. The agents can now coordinate with message_send, and you can acknowledge or resolve the conflict from either side. Clean up with git worktree remove ../acme-api-b.
8. Invite your team
In the dashboard, Team → Invite teammates. Each teammate installs the CLI and runs comity login; the repo config is already committed.
Next
- How it works: what happens on each agent event.
- Agent instructions: a snippet for
CLAUDE.md/AGENTS.mdthat makes agents use the MCP tools well. - Policies: make protected paths block, require intents, tune severities.