Several Claude Code agents and one person, working as a group on one repository. The members share a message stream and a task board: they split the work, claim tasks, review each other's changes and merge what was approved. You follow all of it on one screen and take part as one more member of the group.
collab is not a coding agent. The members are Claude Code; collab is the room
they meet in. Each member runs headless (claude -p) in its own git worktree
on its own branch (collab/<name>), and reaches the group through collab's
MCP server, so any MCP client can join it too: under collab serve by any
name, under the screen only by a member's name (/spawn it first).
A member has your and the project's MCP servers but not your claude.ai
connectors; ENABLE_CLAUDEAI_MCP_SERVERS=true collab gives them those too.
One member's own environment, a KEY=VALUE a line, goes in env/<name>
in the project's data (see Data below) and holds from its next start: a
trial on one member, such as CLAUDE_CODE_PROMPT_CACHE_TTL=5m.
In tern, the stream is a chat:
In any other terminal, the same group:
- Linux, macOS or Windows
- Rust 1.99 or newer, only to build it yourself
- git; on Windows Git for Windows, whose bash
runs the check and
$commands - Claude Code, logged in:
the
claudecommand onPATH - Optional:
gh, logged in, for the titles and states of the pull requests members open
The latest release, into ~/.local/bin:
curl -fsSL https://raw.githubusercontent.com/stoolap/collab/main/install.sh | shOn Windows, into %LOCALAPPDATA%\Programs\collab, from PowerShell:
irm https://raw.githubusercontent.com/stoolap/collab/main/install.ps1 | iexEach script checks the download's sha256 against the release's and installs nothing on a mismatch. Releases are built for Linux, macOS and Windows, on x86_64 and arm64. To build it yourself:
cargo install --git https://github.com/stoolap/collabor from a checkout:
cargo build --release # target/release/collabAn installed collab keeps itself up to date: while it runs it looks for a
newer release (a vX.Y.Z tag) every hour, downloads its build in the
background, puts it in place of its own file and offers the restart in the
corner of the screen. collab update does it at once; COLLAB_NO_UPDATE=1
turns the background update off, and a build in a checkout never does it.
The first start on a new release shows what it brings: the highlights
written for it in .github/highlights/vX.Y.Z.md before its tag, else its
first five changes since the one before and a link to the rest.
collab doctor checks what collab needs in a directory, a line each with
the fix for what is missing: Claude Code and its sign-in, git and whether the
directory is a repository, gh and its sign-in, the release, and whether
collab runs there.
In the repository the group works on:
collabThe group is alice, bob and carol; collab --members ann,ben names
others. Run again there, collab goes on with the members it last ran
with, each in its own Claude Code session, and the group's messages and
tasks. The repository needs
at least one commit: each member branches from it. In a directory that is
not a git repository, or has no commit yet, every member works in the
directory itself.
Members start on their first message. Write to the group; @name writes to
one member only, !@name interrupts its turn first. $ cargo test runs a
command yourself in the main checkout: its output shows in the stream as a
member's would, no member spends on it, and /stop $ ends it. /help lists
the commands and keys:
| Command | What it does |
|---|---|
/task title |
add a task to the board |
/assign 4 @bob |
give task 4 to bob and wake him |
/poll q | a | b |
ask everyone to vote; votes stay hidden until all members voted (/poll close 3 ends it) |
/vote 3 a why |
vote on poll 3: an option's number or its text, then why |
/review 3 ok note |
approve task 3 in review, or back to send it back |
/keep 12 |
keep message 12 as a standing decision every member reads (again: no longer) |
/export 12 |
write task 12's thread to a markdown file in the data directory; /export alone, every message |
/merge @name |
fast-forward the main checkout to a member's branch, at the commit it marked ready |
/stop @name |
interrupt a member (@all: everyone; $: your own running commands) |
/compact @name |
compact a member's context (collab does it after a member's merge past 100k tokens, and at the end of a turn with no task under way past 150k) |
/context @name |
what fills a member's context, by category |
/rewind @name |
take a member's conversation back to before one of its messages; its files stay |
/model @name M |
switch a member's model: opus, sonnet, haiku, fable or default |
/effort @name L |
set how hard a member thinks: low, medium, high, xhigh, max or default |
/btw @name Q |
ask a member aside, even mid-turn: a fork of its conversation answers, unseen by the group |
/spawn name, /kill @name |
add a member, or stop one and take it out (its claimed tasks reopen) |
/rename name |
name this session; /rename - takes the name away |
/restart |
rebuild collab (in its own repo), then stop every member and start again |
/pause, /resume |
let members end their turns and send them nothing new; then let what waited go |
/clear |
clear the stream back to the welcome; spend, activity and the board stay |
/copy |
copy a recent message, or a code block, command, sha or link in it |
/uses |
how often you used each command and button, kept on this machine only |
/spend |
what the group spent: in all, a merge and a task on average, the limits, each day, each member |
/tape |
the Work Tape: each member's calls and each task's stages in time |
/help |
the commands and keys |
/quit |
stop every member and leave (Ctrl+D too) |
| Key | What it does |
|---|---|
| Enter | send; Alt+Enter or Ctrl+J a new line |
| ↑ ↓ | what you sent before |
| Shift+↑ ↓ | in a terminal, select a line (Enter opens it) |
| Ctrl+R | search what you sent |
| Alt+↑ | take back your newest message no member has yet, to edit |
| Tab | take the / command or @ name picked |
| Esc | close a panel; else clear the message |
| Ctrl+T | the task board, with the last tasks finished |
| Ctrl+B | the branches: each member's, the last commits and the pull requests, with the change picked |
| Ctrl+O | the members: what each does, its context, spend and tasks, and its model and effort to switch |
| Ctrl+P | My Messages: the posts to you, each thread with a reply box; a plan read there is reviewed with Ctrl+R (Review in tern) |
| Ctrl+G | the oldest message for you in the stream |
| Ctrl+F | show everything, only the group, or one member |
| Ctrl+Y, Ctrl+A, Ctrl+N | answer a member's permission request: allow, always allow, deny |
| Ctrl+D | stop every member and leave |
collab help lists the commands, and collab help COMMAND shows one's options
and examples: collab help up the other options (--model, --permission-mode,
--resume NAME=SESSION). collab serve runs the group without a screen,
and merges a branch marked ready as the screen does. It runs no members
itself: each joins from its own session, which collab
cannot compact, so only Claude Code's own limit does (lower it with
CLAUDE_CODE_AUTO_COMPACT_WINDOW, e.g. 200000, when you start the member).
From another shell, in the same directory or one below it, you work with the running group as yourself:
collab status # who is online and doing what, your unread, the board
collab say @bob the build is green again
collab read -n 50 # the latest messages, oldest first
collab tasks # the open and claimed tasks and pollscollab status also works while collab does not run: it shows the members
it last ran with and the board, from its database.
Members run Claude Code in its auto permission mode, or the one
--permission-mode gives. A tool call that needs your permission waits on
the screen: Ctrl+Y allows it, Ctrl+A allows it always, for every member,
and Ctrl+N denies it. Always holds for what Claude Code suggests (a command
prefix, a domain), or else the exact command, or the whole tool: one Ctrl+A
on an edit allows every edit. collab also refuses some calls itself, such as
sed -i in place of an edit, with a message the member reads; /help says
where these rules and what you allowed always are kept, to change them.
The rules remind a member of how the group works; they are no security
boundary, as a member that means to can write a file some other way. The
boundary is Claude Code's permission mode.
The screen is a terminal UI. A click takes the button under it, as in
tern; Shift+drag selects text, and COLLAB_MOUSE=0 leaves the mouse to the
terminal. Its panels are tern's: the board, the members with their model and
effort, My Messages, the branches, a task's change to review (Diff), a plan
to note row by row (Plan), Spend and the Work Tape. In the tern terminal
(TERM_PROGRAM=tern) collab draws through tern's surface protocol instead,
with tern-sdk: the stream as a
chat, the same panels as tern's windows.
- Shared context. Members see the group's posts and the task board through
the tools
read,query,post,task,claim,done,review,ready,pollandvote; they do not see each other's conversations. - Tasks. A member claims a task before working on it, commits on its own
branch and calls
done. collab picks another member to review it; with no other member, you review it, from My Messages. - Check. One shell line in the file
checkin the project's data (see Data below; for examplecargo fmt --check && cargo test -q) runs on eachdonein a worktree of its own; the reviewer is woken once it passes. - Merging. An approved branch that fast-forwards the main one merges at
once. One the main branch moved past, collab rebases itself when that has
no conflict and keeps the approved lines, runs the check on it and merges
it; else the owner rebases, resolves its conflicts and calls
ready. - Data. A project's messages, tasks and worktrees live in
~/.collab/<project>/<id>/(%USERPROFILE%\.collabon Windows;COLLAB_HOMEmoves it), in a Stoolap database. In the repository collab adds only each member's branch,collab/<name>, and its worktree; the main checkout changes only when a branch is merged.
cargo fmt --check && cargo test -q && cargo clippy --all-targets -- -D warningscollab screen [group|commands|tasks|members|messages|message|spend|tape|markdown|welcome|help] draws the screen with
made-up data, with no member and no model running. tests/shots/run.sh
takes screenshots of the tern screen from scripted scenarios; it needs the
tern command. tests/tui.sh STEPS drives the live terminal UI in tmux
with the same made-up members: a step a line (type @ann hi, keys Enter,
click 40 12, scroll up 40 12, wait 1, shot NAME), each shot written to
tui-shots/NAME.txt and, with its colours, NAME.ansi.
The screenshots above are tests/shots/readme.txt, taken with
REPO=acme/parser, SCALE=2 and THEME=dark or light; add UI=terminal for the
terminal ones.
Apache License 2.0; see LICENSE.