gaitro CLI reference
Every gaitro command: logging in, opening projects, the draft workflow, checks, Knowledge and secrets. Every command accepts --json.
Install it with npm i -g --allow-remote=root https://app.gaitro.com/cli.tgz. To check the download first, its SHA-256 is at https://app.gaitro.com/cli.tgz.sha256 (Get started shows the steps). Every command accepts --json. gaitro --help prints this list.
Getting set up
| Command | What it does |
|---|---|
gaitro login [--server url] | Sign in through your browser. |
gaitro login --device | No browser here (SSH, servers): enter a code on another device. |
gaitro login --with-token | For CI and scripts: reads a token made in Settings › Agents from what you paste or pipe in, so it never sits in your shell history. In CI, store the token as a secret named GAITRO_TOKEN and skip logging in. (--token <token> still works, but the token shows up in history and process lists.) |
gaitro projects | The projects in your company. |
gaitro open <company>/<project> | A working copy under ~/gaitro/, made once and reused (prints its folder). Reusing it brings it up to date. |
gaitro clone <company>/<project> [dir] | Get a working copy where you choose. |
gaitro pull | Download the published version as gaitro/main. Main follows it when nothing would be lost; an open draft never moves. Use it to deploy, or to copy the published version somewhere else. |
gaitro init [--name <name>] [--tenant <tenant>] | Bring an existing git repo in (its HEAD becomes trunk). |
gaitro update | Install the newest CLI. Updates are signed: the CLI checks the signature and that the download matches it before installing anything, and installs nothing if either doesn't. |
gaitro doctor | Check the setup here, changing nothing: the CLI's version, the login, the server, the project, the agent instruction files, git, the edit watcher and the draft's checks, each with what to do when it isn't right. |
Already building? Bring it to Gaitro
| Command | What it does |
|---|---|
gaitro overlap | Is anyone else working on what you've changed? Changes nothing. |
gaitro push [-m "<what you were asked to do>"] [--check <sentence>]… | Open a draft from this work, or save the next checkpoint. |
The workflow
| Command | What it does |
|---|---|
gaitro start "<request>" [--project <company>/<project>] [--plan <step>]… [--check <sentence>]… [--claim <symbol>[:read|body|shape]]… | Open a draft for a request, before editing, and move this working copy onto it. Plans and checks are optional. It says which project the draft is on ("Draft #12 on farnor-labs/website"). Outside a working copy, --project says which one (needed when the company has more than one); in a working copy of another project, it refuses rather than open the draft on the wrong one. gaitro intent is the same. When this copy has another open draft's unsaved changes, it stops and suggests --worktree; --here starts it here anyway. |
gaitro start --take <n> | Take a request someone made in the app. |
gaitro start "<request>" --worktree [--scratch-db] | The draft gets a working copy of its own at <repo>.drafts/<number>-<slug> beside the repo, on its branch, so other agents on this machine never switch it. The checkout you ran it in isn't touched. The copy gets node_modules (an APFS clone on macOS; elsewhere it says what to install), the untracked .env and .env.local, and a .gaitro-draft.env with a PORT of its own and GAITRO_DRAFT. When DATABASE_URL is a Postgres database on this machine, it names <db>_draft_<n> for the copy; --scratch-db creates it (and removing the copy drops it). A database on another machine is never touched. Set the folder with git config gaitro.worktrees <folder>, and other files to copy with git config --add gaitro.worktreeCopy <path>. |
gaitro worktree list | The drafts with a working copy of their own, and what became of each. |
gaitro worktree remove [<n>] [--force] | Remove a shipped or discarded draft's working copy (this one, with no number) and its scratch database. --force removes one whose draft is still open. |
gaitro requests | Requests waiting for an agent. |
gaitro attach <n> | Work on an existing draft from this working copy. |
gaitro skills | The skills added to this project (playbooks its agent can use; added in the app). |
gaitro skill <name> | One added skill's full text, to use it now. |
gaitro symbols [search] [--file <path or folder/>] [--all] | Find symbols to claim. Shows 40 and says when there are more: narrow it to a file or folder, or see up to 1000 with --all. |
gaitro claim <symbol>… [--wait | --ask "<why>" | --narrow] | Reserve symbols ahead of editing. What you edit is reserved as you save anyway. |
gaitro release [<symbol>…] | Give claims back. |
gaitro status [--full] | Checks, blockers and the next step (--full: every claim). With no draft open (none started, or the last one shipped or was discarded), what became of that draft and where the project stands: the published version, production, requests waiting. |
gaitro wait [--timeout <seconds>] | Return when this draft's checks have finished. If they haven't by the timeout (15 minutes unless you say), it answers "Still waiting: … Call again to keep waiting." instead of failing. |
gaitro sync [-m "<message>"] [--done <step>]… | Checkpoint, safety checks, then the affected checks. It starts "Saved draft #12, checkpoint 3." --done ticks a plan step by its number or its words, and says so if it matches none. It warns when the files look like another project's (a remote here is a different Gaitro project's repository), and stops when the repository doesn't have the draft's starting point. |
gaitro ready [--summary "<for someone who doesn't read code>"] | Mark the draft done, which runs the full suite. |
gaitro ship [--summary "..."] | The person said ship it: saves the work, then publishes it once checks pass. A draft that changes nothing is closed instead of publishing an empty version, and shipping one that already shipped says which version it became. Publishing isn't deploying: see Deploys. |
gaitro safety ok <id> --reason "..." [--confirmed] | Answer a safety finding (logged). The answer holds while the flagged line reads the same, even when a replay moves it. |
gaitro replay [--continue | --abort] | Re-apply this draft onto the latest version. |
gaitro choice ["<question>"] | Hand a conflict you can't resolve to a person. |
gaitro watch [--until <event,…>] | Stream events for this draft. |
gaitro discard [--reason "<why>"] | Drop this draft without publishing it; its claims go back. The reason goes in the project's log. |
Backlog
What to build next, one list per project: people add to it in one line, and an agent told to "pull from the backlog" takes the next Ready item. Items are BL-<n>. Their status is Not ready (still being shaped; agents skip it), Ready, Completed or Closed. An agent working on a Ready item shows as its run name, for example parcetta-delete-key.
| Command | What it does |
|---|---|
gaitro backlog | Open items in the Backlog's order (the top Ready one is next): BL-n, status (or the run working on it), title. |
gaitro backlog list [ready|not-ready|completed|closed|all] [--kind feature|bug|speed|agents] | Items with one status, or all of them; --kind for one kind, or what agents suggested. |
gaitro backlog add "<text>" [--kind feature|bug|speed] | Add one item, marked agent suggested. It's Not ready, so agents leave it alone until a person writes its details and makes it Ready in the app. The kind is guessed from the words unless given. |
gaitro backlog add --split | One item per line of stdin: paste a notepad. List markers are dropped. |
gaitro backlog next [--kind <kind>] | The top Ready item nobody has claimed, in the Backlog's order. |
gaitro backlog claim [BL-n | --count <n> [--kind <kind>]] | Claim it, or the next free Ready items: --count 3 --kind feature grabs the next 3 features. Only one agent holds an item, and each gets its own run name. The claimed items queue up in this working copy: each draft started here is linked to the next one, and the terminal window takes its run's name. A claim lasts as long as the project's claim time, and as long as its draft's agent keeps working. |
gaitro backlog link BL-n [<draft>] | Tie an item to a draft (the one open here when none is named). Shipping a linked draft marks the item Completed. |
gaitro backlog show BL-n | The item's details (Markdown: what to build and how to tell it's done), its version, open questions and the latest verification. If a person changed the details since you claimed the item, it starts with the changed lines. |
gaitro backlog ask BL-n "<question>" [--timeout <seconds>] [--no-wait] | Ask a person one question about the item you're building. It's posted in the item's discussion, the item shows Needs input, and the command waits for the answer (15 minutes by default, or --timeout; --no-wait to ask and return) and prints it. |
gaitro backlog wait BL-n <question-id> [--timeout <seconds>] | Keep waiting for the answer to a question. |
gaitro backlog verify BL-n --result passed|failed|not-checked --how "<what you did and saw>" | Say once, for the whole item, how you checked it. People see it on the item; the newest report counts. |
gaitro backlog release BL-n --note "<why>" | Let the item go, so another agent can take it. Say why: the next agent and the people following the item read it. |
gaitro backlog complete BL-n [--summary "<text>"] | Confirm a claimed item is Completed. --summary says what shipped in a sentence or two for the customers who asked, when a connected app sent the item (optional: the ship summary is used otherwise). Refused until its draft has merged with its checks passing; merging does this on its own. |
Making an item Ready, Not ready or Closed, writing its details, ordering the Backlog and answering an agent's question are a person's calls, made in the project's Backlog in the app. The command line always acts as an agent, so it can't make them.
Deploys
Shipping publishes a change. Deploying puts a published version in production. An owner sets up how a project deploys in Settings › Deploys: Gaitro runs the deploy, or it happens elsewhere and is recorded. Either way the project's health URL confirms which version production runs.
| Command | What it does |
|---|---|
gaitro deploy --status [--version <n>] | Which version production runs, how many versions behind it is, how this project deploys, and what deploying the latest (or v<n>) adds: each published draft with its number, title and risk. When production's health URL reports a version the record doesn't have, it says so (Production reports v105 but the last recorded deploy is v104. Record it?). |
gaitro deploy [<version>] [--note "..."] [--wait] | The person said deploy: Gaitro deploys the latest published version, or the one named (--version <n> works too; an earlier one rolls back). It answers with the drafts the deploy adds, the same list the person sees when they approve it. Asked for here, it waits for a person to approve it in Gaitro, unless the project says otherwise. |
gaitro deploy --record [<version>] | It was deployed outside Gaitro: record it. With no version, it's the one production's health URL reports (when that differs from the record), so a deploy made by hand is recorded in one step; otherwise the latest. The health URL is checked to confirm it. If a person asked for that version (the Deploy button), this completes their request. |
gaitro deploy --watch [--once] | Wait for deploys people ask an agent for with the Deploy button, on a project deployed outside Gaitro. One line each, as they arrive. |
gaitro deploy --take [<n>] | Take one of those requests: the version, its commit and the project's deploy instructions. Deploy it that way, then --record. |
gaitro deploy setup [--mode external|gaitro|off] [--health-url <url>] [--instructions "..." | --instructions-file <path>] [--command "..."] [--before "..."] [--agents-need-approval yes|no] [--owners-only yes|no] [--note "..."] | Propose how the project deploys. It's saved as a draft: nothing changes until an owner reviews it in Settings → Deploys and presses Approve, which saves and enables it. Proposing again revises the draft; with no options it shows the setup and any draft; --discard withdraws yours. Secrets never go here: the person adds them in Settings → Vault. |
Checks
| Command | What it does |
|---|---|
gaitro check add "<sentence>" [--run "<cmd>"] [--file <test file>] [--keep] [--service postgres] [--allow-unrunnable] | Add a check, with its test if it's written. --keep makes it one of the project's checks when the draft ships. --service postgres gives its run an empty database (DATABASE_URL). A command the runners can't run is refused with the reason; --allow-unrunnable adds it as a manual check Gaitro doesn't run. |
gaitro check compile <handle> --run "<cmd>" [--file <test file>] [--service postgres] [--allow-unrunnable] | Link a check to the command that runs its test. |
gaitro check logs <handle> | A check's latest full output. |
gaitro check history <handle> [--limit 30] | A check's recent runs, newest first: what each said, how long it took, which sandbox ran it, and when it came near its time limit. A check that ran out of time shows "at least" its limit. Inside a draft it reads the draft's project; elsewhere, the linked project, with your own login. --json for the rows. |
gaitro check sandboxes [--kind ready|manual|sync] | How many sandboxes suit this project's runs, worked out from its last 30 recorded runs of that kind: a recommendation with its basis and confidence, what 1 to 4 sandboxes would have taken, and checks worth splitting or watching. Read only: an owner changes the count in Settings › Review. ready covers the publish queue too. |
gaitro check edit <handle> [--sentence] [--run] [--service postgres | none] | Reword or re-point a check this draft added, or change the services its run starts. |
gaitro check remove <handle> | Drop a check this draft added. |
gaitro check keep <handle> [--undo] | Keep a draft's check: it joins the project's checks when the draft ships, instead of retiring. |
gaitro check alone <handle> [--off] | Make a check run on its own, never alongside another check in the same sandbox. Use it for a check that writes files other checks read, such as a build. It can only make a run slower. --off lets a check this draft added share again; for one of the project's checks, a person changes that in Checks. |
gaitro check archive <handle>… --reason "<why>" | Owners: retire project checks. They stay readable on the drafts that added them. |
gaitro check setup "<command>" [--service postgres | none] | Runs once before each run's checks (npm ci, a build). A new command waits for an owner to approve it in the project's Settings. --service postgres gives the setup and every check an empty database; on its own, it leaves the command as it is. |
gaitro check env | What checks run in: OS, Node, tools, network, env vars. |
gaitro check run <handle> [--setup] | Run a check here, the way the server does. |
Knowledge
Answers other drafts already proved, looked up when a check fails. See Knowledge.
| Command | What it does |
|---|---|
gaitro knowledge search "<error or package>" [--package <name> --from <v> --to <v>] | Ranked answers. |
gaitro knowledge show <answer-id> | The full answer; a public one counts as a lookup. |
gaitro knowledge questions | This project's open questions. |
gaitro knowledge ask --package <name> --error "<message>" [--from <v> --to <v>] | Ask before a check has failed. |
gaitro knowledge claim <symbol> | What's known about the packages behind a claim. |
gaitro knowledge share <lesson-id> | Share a kept lesson (owners; safety checks still apply). |
Secrets
| Command | What it does |
|---|---|
gaitro secret set <NAME> [--env preview|production] | Store a secret; the value is read from stdin and never printed back. |
gaitro secret list | The names of this project's secrets, with or without a draft open. |
Anything that needs a secret runs as a check, where the server injects it.
News and outages
Every command that works on a draft hears what happened to it since the last one: blocked or unblocked, queued, checks failed or passed, shipped, a choice opened, a wait untangled. It's printed after the answer as one line, "Since your last command: …" (with --json, as news), and each event is said once.
When Gaitro isn't answering (a deploy, an outage), commands say so in a sentence, never with an error page: "Gaitro isn't answering right now (Cloudflare 1101)." Commands that only read try again first, after 1, 3 and 9 seconds, or later if the server asks. Commands that change something don't: they say "Nothing was changed" when the request never got there, and otherwise that it may or may not have gone through, so check gaitro status before running it again. With --json, the error has code: "unavailable" and retryAfter (seconds).
MCP
| Command | What it does |
|---|---|
gaitro mcp | Start the MCP server (stdio). See the MCP reference. |
Help
| Command | What it does |
|---|---|
gaitro help [<topic>] | The workflow, claims, checks, Knowledge, secrets, or every command. |
gaitro version | This CLI's version. When a newer one is out, the CLI says so once a day, with the command to update. |
This page as markdown, for your agent: /docs/cli.md. Every page at once: /llms-full.txt.