Get started
Quickstart
Install the CLI, sign in, set up a repo, verify it, and watch Comity catch your first conflict.
On this page
Before you start
You need Node.js 22 or newer, a git repository, and Claude Code or Codex. The repository doesn't need a remote: a brand-new local repo works from its first commit (see Repos without a remote). 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 comity-cliThe macOS / Linux and Windows scripts (install, install.ps1) check for Node.js 22 or newer and run the same npm install; they never install Node.js or use sudo. Set COMITY_CLI_VERSION (for example next) to pick a version. Then check it's on your PATH:
comity --version3. Sign in
comity loginThe CLI shows a code and opens comity.so/cli in your browser. Type the code from your terminal, check that the device, time and IP address shown are this machine's, pick the org, and click Approve. Never approve a code someone else sent you. The CLI stores a token for this machine in your user config folder:
✔ Logged in as diego@acme.com · org acme · role ownerOn a machine without a browser, comity login still works: open comity.so/cli on any device where you are signed in to Comity and type the code.
4. Set up a repository
cd ~/code/acme-api
comity initComity works on git repositories. In a folder that isn't one yet, init writes nothing and offers to run git init for you (outside a terminal it prints the commands instead).
In a terminal, init asks which agents to set up: the ones it finds on this machine are listed first and pre-selected; the others are listed below them, dimmed and unselected, under Not found on this machine. If you're logged in to several orgs, it first asks which org this repo belongs to. It writes:
comity.json: binds the repo to your org ({"org": "acme", "server": "https://api.comity.so"}; no secrets)- Claude Code:
.claude/settings.json(hooks) and.mcp.json(MCP server) - Codex:
.codex/hooks.json(hooks) and.codex/config.toml(MCP server)
Then it prints what's left to do for each agent:
✔ Repo acme/acme-api registered in org acme
✔ Claude Code set up · Hooks + MCP
1. Open Claude Code in this folder and accept the trust prompt
✔ Codex set up · Hooks + MCP
1. Trust this project in Codex, then approve the comity hooks in /hooks
wrote 5 files · --verbose lists them · comity init --explain <agent> shows an agent's full steps
Next: run comity doctor to check everything.
Commit comity.json and the agent files so every teammate's agents report to acme too (no secrets in them):
git add comity.json .claude/settings.json .mcp.json .codex/hooks.json .codex/config.toml
git commit -m "Set up Comity for coding agents"Commit the files
No token is written. Commit the files, comity.json included, so every teammate's agents report to the right org as soon as they pull and have run comity login. Agents that need a line of config in your user settings (Windsurf, Cline, Zed, goose, Augment) point to comity init --explain <agent>, which prints it ready to paste and copies it to your clipboard.
Repos without a remote
A repo with a remote (for example on GitHub) is identified by it. A repo without one, such as a fresh git init, is identified by its first commit, so Comity coordinates it as it is: init says i No git remote: Comity identifies this repo by its first commit (…). When you add a remote later (git remote add origin <url>), Comity links it to the same repo at the next agent action, and teammates' clones join it with all its history.
Before the first commit nothing identifies the repo yet: init warns ! No commits yet: …, agents get a one-time note at session start, and comity doctor shows git … has no commits and no remote yet. Committing the files above is enough.
5. Check the setup
comity doctor✔ config server https://api.comity.so [file], token [file], …/comity/config.json
✔ server reachable in 84 ms
✔ token valid for diego@acme.com (org acme)
✔ git /home/diego/code/acme-api → github.com/acme/acme-api
✔ claude_code hooks all 6 events installed
✔ claude_code mcp configured in /home/diego/code/acme-api/.mcp.json
✔ codex hooks all 6 events installed
✔ codex mcp configured in /home/diego/code/acme-api/.codex/config.toml
✔ codex hook trust all 6 comity hooks approved in /hooks
✔ round trip session_start → allow in 112 ms (session 0199…)
✔ CLI up to date 0.9.0 is the latest release
✔ All checks passed.Follow any › hint it prints. See Troubleshooting for each failure.
6. Start your agent
- Claude Code: start
claudeat the repo root, accept the folder trust prompt and approve thecomityMCP server. Claude Code reads.claude/settings.jsononly from the folder it starts in; for subfolders see Monorepos. - 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:
## Comity update — system-generated for `acme/acme-api`
Lines starting with "•" are facts generated by Comity.
### New conflicts from this change
• CF-1 symbol_overlap [warn] · open · with your other session (INT-1, Claude Code) · `sym:ts:src/money.ts#formatPrice` · detected just now
· …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.
Monorepos: starting agents in a subfolder
Run comity init once at the repo root; run from a subfolder, it still writes the files at the root. Workspace packages (npm, pnpm and yarn workspaces, Python packages) are found from the root, and briefings label paths with their package.
Where the agent starts matters
Claude Code reads .claude/settings.json, and omp reads .omp/extensions, only from the folder a session starts in. An agent started in apps/web runs none of the root's hooks, so Comity never sees its session or edits, even though its MCP tools may work. comity doctor run in the subfolder warns (claude_code subfolder, omp subfolder). Two fixes:
Start the agent at the repo root and point it at the package.
Or install user-level hooks once per machine, which load in every folder:
Terminalcomity init --global # Claude Code comity init --global --tools claude_code,omp # and ompThey act only in repos with a committed
comity.json, so personal and open-source repos stay out of Comity, and they stay quiet in sessions that also load the repo's own hooks, so no event is reported twice. See Claude Code and omp.
Other agents find their project config in their own ways; check each one's page under Agents, and run comity doctor in the folder you start it in.