CLI
kraft with no arguments starts the server. Every other command talks to a
running server. Verbs live in four groups: item acts, view reads, repo
manages repositories and their worktrees, and admin runs this machine's
server. Typing an old flat verb (kraft list) prints where it moved.
kraft console opens the terminal UI; kraft console --server URL opens it
against a Kraft on another machine.
kraft <group> <verb> --help prints every flag for one verb. Each group page
describes its verbs and the flags that change what they do. Wherever a
command takes a work item ID, you can omit it when you run the command from
inside that item's worktree, or from a repo's own checkout while an
in-place item's branch is checked out there.
You can also give the start of an ID instead of all of it: 4 characters or more, as long as no other item's ID starts the same way. A worker inside a network sandbox must still give its own item's whole ID.
A work item's ID is 8 characters, such as k7m2x9qa; an item filed before IDs
were shortened keeps its 32. A session's ID is 6 characters and unique only
within its item, so outside it a session is written <item>/<session>, such as
k7m2x9qa/p3n8w2; an older session keeps its 32.
Find a verb by what you want to do
Each command links to its entry.
Filing work
| I want to | Command |
|---|---|
| Connect a repo to Kraft | kraft repo connect |
| Check that a repo's setup and test commands work | kraft repo connect --verify |
| Stop tracking a repo | kraft repo disconnect |
| File a work item | kraft item create "title" |
| File it with a spec or plan I wrote | kraft item create "title" --spec PATH --plan PATH |
| File it and start it at once | kraft item create "title" --autostart |
| Revise a spec or plan before the item starts | kraft item set-attachments |
| Switch the chain of an item that hasn't started | kraft item set-chain |
| Start an item that was filed paused | kraft item resume |
Watching
| I want to | Command |
|---|---|
| See the board | kraft view list |
| See where one item stands | kraft view show |
| Find a spec, plan or summary | kraft view search "query" |
| List an item's specs, plans and summaries, or read one | kraft view docs, kraft view doc ID |
| Follow the agent's log | kraft view logs -f |
| See what happened to an item, in order | kraft view events |
| Watch the board live | kraft view watch |
| Watch the board and act on it in a terminal UI | kraft console |
| See the repos Kraft knows | kraft repo list |
| Go to an item's worktree | kraft repo path or kraft repo open |
| See what the worktrees use, item by item | kraft view storage |
At a gate
| I want to | Command |
|---|---|
| Read the document the gate is about | kraft view artifact |
| Read the change | kraft view diff |
| Compare two attempts, or the change since my last review | kraft view compare |
| Approve | kraft item approve |
| Reject, and say why | kraft item reject --note "why" |
| Comment on a line of the change | kraft item comment |
| Send my comments with an outcome | kraft item review |
| Read the item's merge request, pipelines, job logs, merged requests or labels | kraft view mr, pipelines, jobs, job-log, merged, labels Added in 2.5 |
| List review threads | kraft view threads |
| Mark a thread resolved, or reopen it | kraft item resolve, kraft item reopen |
| Pass a gate without running it | kraft item skip |
| Label an item's merge request | kraft item mr-label |
When it stops
| I want to | Command |
|---|---|
| See why it stopped | kraft view show, then kraft view logs |
| Run the stopped node again | kraft item retry |
| Redo one step or task, or the whole chain | kraft item retry --path PATH, --restart |
| Give it more budget | kraft item raise-budget --usd N |
| Raise a time or token cap | kraft item set-policy |
| Steer an agent that is paused | kraft item resume --steer "..." |
| Pause a running item | kraft item pause |
| Ask an agent to help with the stop | kraft item escalate --message "..." |
| Skip the node it stopped on | kraft item skip |
| Pick another model or effort for it | kraft item set-overrides, or kraft item set-node-override |
| End it as done, or as cancelled | kraft item complete, kraft item cancel |
| Drop it and delete its worktree | kraft item abandon --reason "..." --yes |
Housekeeping
| I want to | Command |
|---|---|
| Archive finished items and free their worktrees | kraft item archive |
| Bring an archived item back under Done | kraft item restore |
| Check that the server is up | kraft admin health |
| Check the whole install | kraft admin doctor |
| Start, stop or restart the server | kraft admin start, stop, restart |
| Run Kraft as a service | kraft admin install-service |
| Install the newest release | kraft admin update |
| Reread the templates and policy after editing them | kraft admin reload |
| Check my chains | kraft admin templates lint |
| Read a chain or a library component | kraft admin templates show, templates library |
| See the harness profiles and what selects each | kraft admin harnesses |
| Rescan documents into the search index | kraft admin reindex |
| Register Kraft with an agent | kraft admin init |
kraft item progress and kraft item reply are called by a worker, not by you.
Output format
Every read and action verb accepts --json, which prints the raw API payload.
It is the same call the matching MCP tool makes, but not
always the same value:
kraft view show --jsonprints the item's full detail (its effective chain, worker sessions and stop), where theget_work_itemtool hands an agent a trimmed item.kraft item create --jsonprints a trimmed object, not the raw payload:id,statusandtitle, plusslots(when--autostartqueued the item),repo_warning,bead_warningorduplicate_warningwhen one applies.kraft view list --jsonis scoped to the repo you are in unless you pass--allor--repo;list_work_itemsis never scoped.
Each verb prints this without --json, and this with it:
| Verb | Without --json | With --json |
|---|---|---|
console | A terminal UI. | Not accepted. |
view watch | A board it redraws rather than returning a value. | Not accepted. Use kraft view events --json. |
repo path | One plain line meant for cd. | Not accepted. Use kraft view show --json. |
admin start, stop, restart, update | Status lines. | Not accepted. |
admin install-service, uninstall-service | Status lines. | Not accepted. |
admin mcp, admin permission-hook | A protocol on stdio. | Not accepted. |
admin worker serve, attach, local | Status lines on stderr, or a protocol on stdio. | Not accepted. |
admin addon enable, disable | One line. | Not accepted. Use kraft admin addon list --json. |
admin init | It reports an existing MCP registration before printing one kraft: wrote PATH line per file. | Accepted and ignored. |
kraft item approve, reject, pause, unblock, resume, retry, raise-budget, skip, complete, cancel, escalate | One line saying what they did, most of them with where the item stands now, such as approved spec_approval on 4f2c…; the item is now running. | The API payload. |
kraft item review approve or request-changes at a pending gate | The same one line. | The API payload. |
kraft item review request-changes or comment, with no gate pending | The review's fields as key value lines. | The API payload. |
kraft item abandon, and every set-* verb except set-chain | The same key value lines. | The API payload. |
kraft item set-chain | The chain the item now runs. | The API payload. |
kraft item archive | The preview as a table with a total, then one line per item. | The preview, or the bulk results with --yes. |
kraft item restore | One line saying what was restored. | The API payload. |
kraft item comment, resolve, reopen | The thread and where it sits. | The API payload; resolve and reopen print the thread. |
The item itself is in --json, or in kraft view show.
The reads you script against print as follows: view list, view show, repo list, admin health, admin doctor and item create. With --json, all but item create print the API's own answer: see the HTTP API pages.
kraft view logs --json and kraft view events -f --json print NDJSON, one
object per line, because a stream has no end on which to close an array.
kraft view events --json without -f prints one JSON array.
Calls from a coding agent's shell
Added in 2.6
A kraft command run from a coding agent's shell is recorded as an assistant's, as an
MCP call is: a gate it decides reads as an assistant's decision, and it is
refused the calls that are a person's, such as a node's extra_prompt. The command detects the
shell from its environment and sends X-Kraft-Client: agent-shell with the call.
Claude Code is the only agent detected, through the CLAUDE_CODE_CHILD_SESSION variable it sets
in the commands it runs. That needs Claude Code 2.1.172 or later: an older version isn't detected,
and its calls are recorded as a person's. Claude Code's IDE extensions don't set it, so a call you
type in an IDE's integrated terminal stays yours.
Nothing else is detected yet: a harness is added only when its own documentation says it sets a variable, and only in the agent's commands.
To be recorded as yourself in such a shell, set KRAFT_CLIENT=cli for the command:
KRAFT_CLIENT=cli kraft item approve
A value in KRAFT_CLIENT always wins over detection. This is attribution, not a credential: it
records who made a call and doesn't stop a caller that sets the variable.
Shell completion
kraft completes verbs with argcomplete,
in any shell argcomplete supports. Register it by adding
eval "$(register-python-argcomplete kraft)" to your shell's rc file.
In this section
- Item verbs: file, approve, reject, pause, unblock, resume, retry, skip, escalate and set policy on a work item.
- View verbs: read the board, follow a running item, and review its diff and documents.
- Repo verbs: connect repositories and reach their worktrees.
- Server verbs: start, stop, restart, update, reload, check and inspect the server.
- Add-on verbs: collections, install, update, validate.
- Machine verbs: register and run machines.
- Forge verbs: name, edit, test forge accounts.