Skip to content

zt CLI

The CLI ships as one binary, zentri, also installed as zt. Both names run the same commands; this page uses zt.

Every command also takes -h or --help. Hidden commands that agents, hooks and sandboxes call are left out. So are cobra’s built-in zt help [command], which prints a command’s help, and zt completion, which prints a shell completion script (run zt completion --help).

Settings files and environment variables are on Configuration and Environment variables.

Code Meaning
0 The command succeeded.
1 The command failed. The error is on standard error.
2 The command needs a choice it could not ask for, off a terminal or with --json. The error names the flag to rerun with, such as --resolution, --option, --text or --yes.
3 zt done refused a session whose checkout holds work that no commit holds.

Coordinate parallel AI coding agents.

zentri (alias zt) talks to a Zentri coordinator to dedupe intents, claim files and launch sandboxed agent sessions.

zt [command]

Flags:

Flag Type Default Description
-v, --version bool false version for zt

Administer the coordinator.

zt admin [command]

Install or show the license that turns on ee/ features.

A license turns on the ee/ features it names on a self-hosted coordinator. The coordinator checks it offline and keeps one. Installing a new one replaces it. Only an admin can install or read it.

zt admin license [command]

Install a license file.

Send the license file to the coordinator, which checks its signature and replaces the installed license with it. A file that does not check out, or whose grace has ended, is refused and the installed license stays.

zt admin license install FILE [flags]

Flags:

Flag Type Default Description
--json bool false print the API’s license status as JSON

Show the installed license and its warnings.

zt admin license show [flags]

Flags:

Flag Type Default Description
--json bool false print the API’s license status as JSON

Attach your terminal to a session started on this machine.

Attach your terminal to an agent session started on this machine. SESSION is the full ID or its last 4 or more characters. Without SESSION, zt picks the only live session, or lists them when there are several.

zt attach [SESSION] [flags]

List and review the decisions agents proposed.

List the project’s decisions, newest first, or most similar first with –q. By default zt shows accepted and proposed decisions.

A low-risk decision is accepted when an agent proposes it. A high-risk one stays proposed until a lead who did not propose it approves or rejects it.

An ID argument to show, approve, and reject is a full ID or the end of one, as the list prints it.

zt decisions [flags]
zt decisions [command]

Flags:

Flag Type Default Description
--json bool false print the API’s decision list as JSON
--limit int 0 show at most N decisions, 1-50 (default 10)
--project string project name or ID (default $ZENTRI_PROJECT, then the config)
--q string rank decisions by similarity to QUERY
--status stringSlice show only these comma-separated STATUSES: proposed, accepted, rejected, superseded (default “accepted,proposed”)

Approve a proposed decision.

Approve a proposed high-risk decision, so it no longer holds back its session’s branch at the merge check.

Only a person with role lead or above who did not propose the decision may review it. zt asks before it changes anything; –yes skips the question. With no terminal, or with –json, pass –yes.

zt decisions approve ID [flags]

Flags:

Flag Type Default Description
--comment string say why, in at most 1024 bytes
--json bool false print the reviewed decision as JSON and never ask
--yes bool false approve without asking

Inherited flags:

Flag Type Default Description
--project string project name or ID (default $ZENTRI_PROJECT, then the config)

Reject a proposed decision.

Reject a proposed high-risk decision. Its session’s branch fails the merge check until an accepted decision of that session supersedes it.

Only a person with role lead or above who did not propose the decision may review it. zt asks before it changes anything; –yes skips the question. With no terminal, or with –json, pass –yes.

zt decisions reject ID [flags]

Flags:

Flag Type Default Description
--comment string say why, in at most 1024 bytes
--json bool false print the reviewed decision as JSON and never ask
--yes bool false reject without asking

Inherited flags:

Flag Type Default Description
--project string project name or ID (default $ZENTRI_PROJECT, then the config)

Show a decision record and its review.

zt decisions show ID [flags]

Flags:

Flag Type Default Description
--json bool false print the API’s decision as JSON

Inherited flags:

Flag Type Default Description
--project string project name or ID (default $ZENTRI_PROJECT, then the config)

Check this machine’s Zentri setup.

Check the config, the modes of the files that hold tokens, the coordinator and the stored user token, and the programs zt runs: git, tmux, the agent CLIs, docker and openshell.

Each line says ok, warn or fail, with a hint after a warning or a failure. zt doctor exits 1 when a check fails. A warning does not fail it. A missing agent CLI warns, and so do docker and openshell, which only the openshell launcher needs.

No output carries a token.

zt doctor [flags]

Flags:

Flag Type Default Description
--json bool false print {“checks”:[{“name”,“status”,“detail”,“hint”}],“ok”:bool}

Mark a session done and stop its agent, keeping its branch.

Mark a session done, stop its agent, and delete its session token. The worktree and the branch stay.

zt done refuses, and changes nothing, while the session’s worktree or sandbox holds work that no commit holds: modified, staged or untracked files that .gitignore does not ignore. It lists them, and exits 3.

Once the agent in a sandbox has exited, nothing can commit that work. –discard then drops it with the sandbox, after zt brings the branch’s commits home. zt lists the files and asks first; –yes skips the question. With no terminal, pass –yes. –discard never drops work in a local worktree or in a sandbox whose agent still runs.

For an openshell session, zt first brings the sandbox’s branch home: it bundles the branch in the sandbox, downloads the bundle and fast-forwards the host branch to it. Then it deletes the sandbox. When the branch cannot come home, zt keeps the sandbox and the session, so you can rerun zt done.

zt done pushes nothing unless you ask. With –push, it then pushes the branch to the remote (origin unless –remote names another) with your own git and its credentials, setting the branch’s upstream. It never forces a push. With –pr, it also opens a pull request into the branch the session started from, or the default branch, through the forge that serves the remote. On GitHub that is your gh login, or else GH_TOKEN or GITHUB_TOKEN with the REST API; the token goes to GitHub and never to the coordinator. –pr opens pull requests on github.com only. Support for GitHub Enterprise Server waits for a user to ask for it. When a push or the pull request fails after the session is done, rerun zt done with the same flags and the session ID.

zt done [SESSION] [flags]

Flags:

Flag Type Default Description
--discard bool false drop the uncommitted work of a sandbox whose agent has exited
--pr bool false push, then open a pull request on github.com (implies –push)
--push bool false push the branch to the remote once the session is done
--remote string origin the git remote that –push pushes to
--yes bool false discard without asking

Redeem an invite and save your user token.

Redeem a single-use invite code, save the user token it returns, and print who you are.

The server URL must use https. Plain http is allowed only for a loopback host (127.0.0.0/8, ::1, localhost), because the token would otherwise cross the network in clear text.

The invite comes from –invite CODE, from stdin with –invite -, or from ZENTRI_INVITE. Reading it from stdin or the environment keeps it out of your shell history and the process list.

The token is never printed. It goes to the OS keychain (macOS Keychain, Windows Credential Manager, or the Secret Service on Linux) under service zentri and account HANDLE@SERVER. When no keychain answers, as in an SSH session, a container or CI, it goes to the config file instead. ZENTRI_TOKEN_STORE picks the store: auto (the default) tries the keychain first, file never touches it, and keychain fails rather than use the file.

The config file holds your other settings. It is $ZENTRI_CONFIG, else $XDG_CONFIG_HOME/zentri/config.json, else config.json in the zentri folder of your OS config dir. It is written with mode 0600 in a 0700 folder, and zt refuses to read it if others can.

zt login --server URL --invite CODE [flags]

Flags:

Flag Type Default Description
--invite string invite code, or “-” to read it from stdin
--label string name for this token in zt’s token list (default zt@HOSTNAME)
--project string default project for later commands, by name or ID
--server string coordinator URL, such as https://zentri.example.com

Remove your user token from this machine.

Delete the OS keychain entry that holds your user token, and the token in the config file if it is there. Your other settings, such as the default project, stay. ZENTRI_TOKEN_STORE=file leaves the keychain alone.

The coordinator still accepts the token until someone revokes it. Running zt logout again, or when you are not logged in, is no error.

zt logout [flags]

List the project’s intents.

List the project’s intents, newest first. By default zt shows active, queued and watching intents; –all shows every status.

A * in the LOCAL column marks an intent whose session runs from this machine.

Below the list, zt names each queued intent of yours whose wait ended, with the zt start –queued command that starts it.

zt ls [flags]

Flags:

Flag Type Default Description
--all bool false show every status, finished work included
--json bool false print the API’s intent list as JSON
--mine bool false show only your intents
--project string project name or ID (default $ZENTRI_PROJECT, then the config)

Serve the coordinator’s MCP tools on stdio (agent kits run this).

mcp is an MCP server on stdin and stdout. It forwards every tool call to the coordinator’s /mcp endpoint with the session token, which comes from ZENTRI_SESSION_TOKEN or the file named by ZENTRI_SESSION_TOKEN_FILE. ZENTRI_SERVER names the coordinator. Logs go to stderr.

zt mcp [flags]

List and answer the questions agents asked.

List the project’s questions, newest first. By default zt shows the open questions your role may answer: a product question takes a requester or above, a technical one an engineer or above. –all also shows the ones it may not.

An ID argument to show and answer is a full ID or the end of one, as the list prints it.

zt questions [flags]
zt questions [command]

Flags:

Flag Type Default Description
--all bool false also show questions your role may not answer
--json bool false print the API’s question list as JSON
--mine bool false show only questions asked of you
--project string project name or ID (default $ZENTRI_PROJECT, then the config)
--status stringSlice show only these comma-separated STATUSES: open, answered, expired (default “open”)

Answer an open question.

Answer an open question with one of its options or with free text. The agent that asked gets the answer on its next tool call.

Without –option or –text, zt shows the question and reads one line from the terminal: a number picks that option, anything else is the free answer. With no terminal, or with –json, pass –option or –text.

zt questions answer ID [--option N | --text TEXT] [flags]

Flags:

Flag Type Default Description
--json bool false print the answered question as JSON and never ask
--option int 0 answer with option N, counted from 1
--text string answer with free TEXT

Inherited flags:

Flag Type Default Description
--project string project name or ID (default $ZENTRI_PROJECT, then the config)

Show a question, its options, and its answer.

Show a question: the agent’s own text, which is the record, and the rewrite the recipient reads first when it differs; the context; the numbered options; the deadlines; and the answer, if it has one.

zt questions show ID [flags]

Flags:

Flag Type Default Description
--json bool false print the API’s question as JSON

Inherited flags:

Flag Type Default Description
--project string project name or ID (default $ZENTRI_PROJECT, then the config)

Show or set the project’s model router.

The model router picks a cheap or a frontier model for each task zt start launches, by rules on the prompt, and zt passes it as the agent’s model flag. It is off until a lead turns it on, and it routes only sessions started with –credential api-key. Zentri never sees the agent’s model traffic.

zt router [command]

Flags:

Flag Type Default Description
--project string project name or ID (default $ZENTRI_PROJECT, then the config)

Replace the project’s router settings (leads only).

Replace the project’s router settings with the JSON in FILE, or on stdin with –file -. A field left out is off or empty, and an unknown one is refused:

{
"enabled": true,
"models": {
"claude": {"cheap": "claude-haiku-4-5", "frontier": "claude-opus-4-1"},
"codex": {"cheap": "gpt-5.1-codex-mini", "frontier": "gpt-5.1-codex"},
"opencode": {"cheap": "anthropic/claude-haiku-4-5", "frontier": "anthropic/claude-opus-4-1"}
},
"frontier_terms": ["billing"],
"cheap_terms": ["copy"],
"llm": false
}

An agent missing from models keeps its own model. The terms add to the built-in ones, which zt router show lists. With “llm”: true, a prompt no rule decides asks the coordinator’s LLM, when it has one. OpenCode models are provider/model.

zt router set --file FILE [flags]

Flags:

Flag Type Default Description
--file string read the settings from FILE, or stdin for -

Inherited flags:

Flag Type Default Description
--project string project name or ID (default $ZENTRI_PROJECT, then the config)

Show the project’s router settings.

zt router show [flags]

Flags:

Flag Type Default Description
--json bool false print the API’s router settings as JSON

Inherited flags:

Flag Type Default Description
--project string project name or ID (default $ZENTRI_PROJECT, then the config)

Link your Slack account, so you can answer and approve from Slack.

Link your Slack account to your Zentri user. Once linked, the Zentri bot sends you questions and decisions in Slack, and you can answer, approve, and ask for work there as yourself. Work asked for from Slack always waits in the queue, and you start it with zt start.

zt slack [command]

Mint a one-time code that links a Slack account.

Mint a link code and print it once. Type /zentri link <code> in Slack within 10 minutes to link the Slack account you type it from. The code works once. Linking again replaces the old link.

An admin can mint a code for someone with no CLI with –user, and hand it over privately, as with an invite.

zt slack link [flags]

Flags:

Flag Type Default Description
--user string mint the code for the user with this HANDLE (admins only)

Show your Slack link.

zt slack status [flags]

Remove a Slack link.

Remove your Slack link. The bot then acts for that Slack account no more, and notices waiting for it are dropped. An admin can unlink anyone with –user.

zt slack unlink [flags]

Flags:

Flag Type Default Description
--user string unlink the user with this HANDLE (admins only)

Register a task and launch an agent for it.

Register a task with the coordinator, which compares it with active, queued and finished work first.

New work launches an agent in its own git worktree and tmux session. When the task matches existing work, zt shows the match and the choices. On a terminal it asks, and Enter takes the marked default. Elsewhere it exits 2 so a script can rerun with –resolution or –yes.

The agent command comes from –agent, then ZENTRI_AGENT, then the config’s “agent”, then “claude”. zt passes the prompt as its last argument.

The launcher comes from –launcher, then ZENTRI_LAUNCHER, then the config’s “launcher”, then local-dev. local-dev runs the agent on this machine with your permissions. openshell runs it in an OpenShell sandbox, through the openshell CLI and a gateway you run, from a zentri-agent image you built. The sandbox clones the branch, and zt done brings the branch home and deletes the sandbox.

Every worktree gets a git pre-commit hook that warns when a staged file is held by another session. When the agent is claude, codex or opencode, zt also gives it the Zentri MCP server and hooks that claim each file before the agent edits it. Codex reads the shared “zentri” profile, which zt keeps in $CODEX_HOME (default ~/.codex).

When a lead turns on the project’s model router, the coordinator picks a cheap or a frontier model for the task and zt passes it as the agent’s model flag. It routes only an agent that runs on an API key: pass –credential api-key, or set ZENTRI_CREDENTIAL. The default, subscription, keeps the agent’s own model. zt reads no credential, only what you declare.

–queued starts an intent of yours that waits in the queue, once zt ls says the work it waited for ended. It launches the same way; the agent gets the prompt you pass, else the intent’s summary.

zt start <prompt> | start --queued <intent-id> [prompt] [flags]

Examples:

zt start "add CSV export to the reports page"
zt start --resolution run_anyway "fix the flaky login test"
zt start --fork 1a2b3c4d "try the export with streaming instead"
zt start --queued 01900000-0000-7000-8000-00000000cc01

Flags:

Flag Type Default Description
--agent string agent command line (default “claude”)
--credential string what the agent authenticates with: “api-key” or “subscription” (default $ZENTRI_CREDENTIAL, then “subscription”)
--fork string start a competing attempt at this intent, or at this session’s intent (full ID)
--json bool false print the registration result as JSON and never ask
--launcher string where the agent runs: “local-dev” or “openshell” (default “local-dev”)
--project string project name or ID (default $ZENTRI_PROJECT, then the config)
--queued string start this queued intent of yours (full ID) instead of registering a new task
--repo string git repository to branch the worktree from (default the current directory)
--resolution string answer to a match: merge, queue, run_anyway, fork, join_as_watcher, escalate
--yes bool false take the coordinator’s default answer to a match without asking

Show what coordination saved the project.

Show the project’s value metrics over the last N days: duplicate work prevented, file conflicts avoided, answers reused, how fast people answer, and where questions and decisions stand. Each counts events in the window.

zt stats [flags]

Flags:

Flag Type Default Description
--days int 0 count the last N days, 1-365 (default 30)
--json bool false print the API’s stats as JSON
--project string project name or ID (default $ZENTRI_PROJECT, then the config)

Show who you are, your sessions on this machine, and your notices.

zt status [SESSION] [flags]

Flags:

Flag Type Default Description
--json bool false print everything as one JSON object

Copy a file into a session’s worktree for its agent to read.

Copy FILE into .zentri/uploads in the worktree of a session on this machine, and print the copy’s absolute path to give to the agent. git ignores .zentri, so the copy is never committed.

The session is –session, else $ZENTRI_SESSION_ID, else the only live session on this machine. FILE must be a regular file of at most 50 MiB, not a symlink. The copy keeps FILE’s name with anything but letters, digits, ‘.’, ‘-’ and ‘_’ replaced; a name already taken gets -1, -2 and so on.

For an openshell session, zt copies FILE into the sandbox’s .zentri/uploads instead and prints the path the agent sees there. A file of the same name there is replaced.

zt upload FILE [flags]

Examples:

zt upload ~/Downloads/mockup.png
zt upload --session 1a2b3c4d spec.pdf

Flags:

Flag Type Default Description
--session string session ID or its last 4 or more characters (default $ZENTRI_SESSION_ID, then the only live session)

Manage the org’s users.

zt users [command]

Set how plainly agents’ questions are phrased for a user.

Set a user’s skill level, which decides how agents’ questions are phrased for them. LEVEL is plain, technical, or default. default clears the level, so the user’s role decides again: plain below engineer, technical from engineer up.

You may set your own level. Only an admin may set another user’s.

zt users set-skill HANDLE LEVEL [flags]

Print version information.

zt version [flags]