Quickstart
This quickstart takes about ten minutes on one machine. On 2026-11-30, the commands alone, from git clone to ben’s caught duplicate in step 6, ran in 30 seconds on a MacBook with the Docker base images already pulled. The rest is reading and the first downloads. You run the coordinator with Docker Compose, log in as two engineers, start a task with Claude Code, and watch Zentri catch the second engineer’s duplicate before a second agent starts.
Before you start
Section titled “Before you start”You need these on your machine:
| Tool | Version | Used for |
|---|---|---|
| Go | 1.27 or later | building zt and the coordinator |
| Docker with Compose v2 | any current | running Postgres and the coordinator |
make, git, curl, jq |
git 2.31 or later |
the build and the setup commands |
| tmux | 3.2 or later | running the agent in a detached session |
Claude Code (claude) |
2.1.295 or later | the agent, logged in with your own account |
Ports 8080 and 5432 on 127.0.0.1 must be free. To use other ports, set ZENTRI_PORT and POSTGRES_PORT in deploy/.env.
Claude Code uses your own login. Zentri never sees your credential or your model traffic. To use another agent, pass --agent "codex" or any command to zt start. zt passes the task as the agent’s last argument.
1. Build the binaries
Section titled “1. Build the binaries”From a clone of the Zentri repository:
make build-goexport PATH=$PWD/bin:$PATHmake build-go builds bin/zentri, bin/zentri-server, and bin/zt, a symlink to bin/zentri.
2. Start the coordinator
Section titled “2. Start the coordinator”make devmake dev runs docker compose -f deploy/docker-compose.yml up --build. It starts Postgres 16 with pgvector, applies the schema with a one-shot migrate service, then starts the coordinator. Every port binds to 127.0.0.1. The database passwords are development defaults.
The first start prints a bootstrap admin token once, in the server output:
Zentri bootstrap admin token (shown once, store it now):zt_a_...Copy it now. The coordinator prints it only on the start that creates the first admin, and never through its structured log. If it scrolled away, docker compose -f deploy/docker-compose.yml logs server shows that start’s output while the container exists.
Leave make dev running and open a second terminal for the next steps.
3. Create a project and two engineers
Section titled “3. Create a project and two engineers”An admin creates users and invites over the HTTP API. zt has no command for it. This script creates a project named demo and two engineers, ana and ben, and saves each invite to a private file:
ADMIN=zt_a_... # the token from the server outputAPI=http://127.0.0.1:8080umask 077
curl -s -H "Authorization: Bearer $ADMIN" -d '{"name":"demo"}' $API/v1/projects | jq -r .idfor u in ana ben; do id=$(curl -s -H "Authorization: Bearer $ADMIN" -d "{\"handle\":\"$u\",\"role\":\"engineer\"}" $API/v1/users | jq -r .id) curl -s -H "Authorization: Bearer $ADMIN" -X POST $API/v1/users/$id/invites | jq -r .code > ~/$u.invitedoneEach invite works once and expires after 15 minutes. Run the next steps within that time, or create a new invite.
4. Log in as ana
Section titled “4. Log in as ana”zt login --server $API --project demo --invite - < ~/ana.invitezt reads the invite from stdin, so it stays out of your shell history. It saves the user token in the OS keychain, or in a 0600 config file where there is none, and prints who you are. No command prints a token. Plain http:// works only for a loopback host.
Check your setup:
zt doctorzt doctor checks the config, the token file modes, the coordinator, the token, git, tmux, each agent CLI, docker, and openshell. Each line says ok, warn, or fail, with a hint after a warning or a failure. Part of the output looks like this:
ok git 2.50.1 (want 2.31 or later)warn openshell openshell is not on PATH; install openshell 0.1.10 or later; only the openshell launcher needs itA missing codex, opencode, or openshell only warns. zt doctor exits 1 when a check fails. It takes --json for scripts.
5. Start a task as ana
Section titled “5. Start a task as ana”Go to any git repository with at least one commit, and start a task:
$ cd ~/src/myapp$ zt start "ENG-101: add CSV export to the reports page"INSECURE: local-dev runs the agent directly on this machine with your user's permissions. There is no sandbox and no egress policy, ...Started session 8d918b06 for intent f4414369 (new). branch zentri/eng-101-8d918b06 worktree ~/.local/share/zentri/worktrees/myapp/eng-101-8d918b06Attach with: zt attach 8d918b06zt registered the task as an intent, checked it against existing work, made a worktree on a new branch, and started claude in a detached tmux session. It also wrote the Claude Code kit into the worktree, so the agent claims each file before it edits it.
To watch the agent, run zt attach 8d918b06. A session ID is the full ID or its last 4 or more characters. zt status shows your sessions and notices, and zt ls lists the project’s intents.
6. Start the same task as ben
Section titled “6. Start the same task as ben”To play ben on the same machine, give him his own config and state with a shell function. Then log him in and start the same ticket:
$ ben() { ZENTRI_CONFIG=~/.config/zentri-ben/config.json XDG_STATE_HOME=~/.local/state/zentri-ben "$@"; }$ ben zt login --server $API --project demo --invite - < ~/ben.invite$ ben zt start "ENG-101: add CSV export to the reports page" < /dev/nullThis task matches existing work (active_duplicate). intent f4414369 active @ana score 1.00 ticket ENG-101 session 8d918b06 eng 101 add csv export reports pageChoices: 1) join_as_watcher watch the owner's work; the owner is told (default) 2) escalate ask the project leads to decideerror: a decision is needed; rerun with --resolution set to one of join_as_watcher, escalate, or --yes to take join_as_watcher$ echo $?2This is the first catch. No second agent started. Because the work belongs to another user, ben can watch it or escalate to the project’s leads.
< /dev/null takes away the terminal. On a terminal, zt start asks instead, and Enter takes the default. Without one it exits 2, so a script passes --resolution or --yes. Take the default:
$ ben zt start --yes "ENG-101: add CSV export to the reports page"You now watch @ana's work on intent f4414369. @ana was notified.7. See the choices for your own work
Section titled “7. See the choices for your own work”When ana repeats her own task, she gets four choices and no default:
$ zt start "ENG-101: add CSV export to the reports page" < /dev/nullThis task matches existing work (active_duplicate). intent f4414369 active @ana (you) score 1.00 ticket ENG-101 session 8d918b06 eng 101 add csv export reports pageChoices: 1) merge join the matching work instead of starting new work 2) queue wait until the matching work ends 3) run_anyway start a separate session anyway 4) fork start a competing attempt next to iterror: a decision is needed; rerun with --resolution set to one of merge, queue, run_anyway, forkIntents and dedup explains each choice.
8. Finish the session
Section titled “8. Finish the session”When the agent is done, end the session:
zt done 8d918b06zt done stops the agent, deletes the session token, and keeps the worktree and the branch. It refuses while the worktree holds modified, staged, or untracked files. It lists them, changes nothing, and exits 3. Commit or remove them, then run it again.
zt done --push also pushes the branch to origin with your own git. zt done --pr pushes and opens a pull request on github.com. Without either flag, you push and open the pull request yourself.
A third start of ENG-101 after this matches the finished work as already_done.
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error, or a failed zt doctor check |
| 2 | A decision is needed, such as a match that zt start could not resolve without a terminal |
| 3 | zt done refused because the session holds uncommitted work |
Clean up
Section titled “Clean up”Stop make dev with Ctrl-C. To delete the database as well:
docker compose -f deploy/docker-compose.yml down -vA data volume created before milestone M1 lacks the coordinator’s database role. If the coordinator fails to start on an old volume, run the same command once.
Limitations
Section titled “Limitations”local-devis not sandboxed. See the warning at the top of this page.- Matching runs offline by default. It catches the same ticket and near-identical wording, but no paraphrase. A reworded task starts a second agent. Intents and dedup covers the optional LLM judge that catches some rewording.
- File claims work through the kits for
claude,codex, andopencode. Any other agent command gets only the git hooks, which warn at commit time. - This quickstart does not set up the merge check. See the GitHub check.
- The Compose defaults are for local development only. Do not expose this stack to a network as it is.
Related pages
Section titled “Related pages”- What Zentri is describes the parts you just ran.
- Production setup runs Zentri for a team.
- The three catches explains what each catch stops.
- Two engineers, same task goes further with the duplicate catch.
- Two sessions shows a refused edit between two sessions.
- CLI reference lists every
ztcommand and flag. - Troubleshooting helps when a step fails.