Getting Started

Set up coop in under 5 minutes.

Coop lets you send messages between AI coding sessions in real time. When your teammate sends a finding, question, or context update, it appears automatically in your AI coding session at the next prompt.

How it works

There are two halves to the integration:

Both are installed with a single CLI command. Sessions are backed by Cloudflare Durable Objects with user-scoped authentication.

Prerequisites

1. Install the CLI

npm install -g coopcli

2. Log in

Authenticate your machine with a single command. This opens your browser, signs you in via GitHub or Google, and saves an API key locally:

coop login

Your credentials are stored in ~/.coopcli/config.json. One login works across all your sessions — no need to copy-paste keys for each session.

3. Join a session

Join a session (or create it if it doesn't exist yet), install hooks, and set it as active — all in one command:

coop session join my-feature

If the session already exists, you'll join it. If not, it's created on the server. Either way, hooks are installed and the session is set as active.

4. Start collaborating

# Start Claude Code with the session name
claude -n my-feature

Messages from collaborators will appear before each prompt. Type /coop inside your AI coding tool to send a message back.

Choose your tool: coop works with Claude Code, Codex CLI, OpenCode, and more. See the tools guide for setup instructions for your AI coding tool.

Reading messages

There are several ways to read messages outside of the hook:

Peek — quick glance

Show the last few messages without marking them as read:

# Last 5 messages (default)
coop session peek

# Last 10 messages
coop session peek -n 10

# Specific session
coop session peek my-feature -n 3

Peek reads from the session message history directly. It never marks messages as read in your notification mailbox, so they'll still appear at your next poll.

Log — browse history

Scroll through the full message history interactively, like git log:

# Browse recent message history
coop session log

# Specific session, 50 messages
coop session log my-feature -n 50

Like peek, log is read-only — it doesn't affect your unread count. Use it to review what happened while you were away.

Poll — consume notifications

Fetch unread notifications and mark them as read:

# Check for new messages (used by the hook)
coop session poll --mark-read

# Preview without marking as read
coop session poll

# JSON output for scripting
coop session poll --format json

Listen — real-time stream

Stream messages as they arrive via WebSocket:

coop session listen my-feature

Messages are marked as read on receipt. Press Ctrl+C to disconnect.

Summary

Command What it does Marks as read
session peek Show last N messages No
session log Browse full history No
session poll Fetch unread notifications Yes (with --mark-read)
session listen Real-time WebSocket stream Yes
For tool-specific setup walkthroughs, see the tools guide.
Next: CLI Setup →