CLI

Every kraft verb, grouped by what it does, and found by what you want to do.

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 toCommand
Connect a repo to Kraftkraft repo connect
Check that a repo's setup and test commands workkraft repo connect --verify
Stop tracking a repokraft repo disconnect
File a work itemkraft item create "title"
File it with a spec or plan I wrotekraft item create "title" --spec PATH --plan PATH
File it and start it at oncekraft item create "title" --autostart
Revise a spec or plan before the item startskraft item set-attachments
Switch the chain of an item that hasn't startedkraft item set-chain
Start an item that was filed pausedkraft item resume

Watching

I want toCommand
See the boardkraft view list
See where one item standskraft view show
Find a spec, plan or summarykraft view search "query"
List an item's specs, plans and summaries, or read onekraft view docs, kraft view doc ID
Follow the agent's logkraft view logs -f
See what happened to an item, in orderkraft view events
Watch the board livekraft view watch
Watch the board and act on it in a terminal UIkraft console
See the repos Kraft knowskraft repo list
Go to an item's worktreekraft repo path or kraft repo open
See what the worktrees use, item by itemkraft view storage

At a gate

I want toCommand
Read the document the gate is aboutkraft view artifact
Read the changekraft view diff
Compare two attempts, or the change since my last reviewkraft view compare
Approvekraft item approve
Reject, and say whykraft item reject --note "why"
Comment on a line of the changekraft item comment
Send my comments with an outcomekraft item review
Read the item's merge request, pipelines, job logs, merged requests or labelskraft view mr, pipelines, jobs, job-log, merged, labels Added in 2.5
List review threadskraft view threads
Mark a thread resolved, or reopen itkraft item resolve, kraft item reopen
Pass a gate without running itkraft item skip
Label an item's merge requestkraft item mr-label

When it stops

I want toCommand
See why it stoppedkraft view show, then kraft view logs
Run the stopped node againkraft item retry
Redo one step or task, or the whole chainkraft item retry --path PATH, --restart
Give it more budgetkraft item raise-budget --usd N
Raise a time or token capkraft item set-policy
Steer an agent that is pausedkraft item resume --steer "..."
Pause a running itemkraft item pause
Ask an agent to help with the stopkraft item escalate --message "..."
Skip the node it stopped onkraft item skip
Pick another model or effort for itkraft item set-overrides, or kraft item set-node-override
End it as done, or as cancelledkraft item complete, kraft item cancel
Drop it and delete its worktreekraft item abandon --reason "..." --yes

Housekeeping

I want toCommand
Archive finished items and free their worktreeskraft item archive
Bring an archived item back under Donekraft item restore
Check that the server is upkraft admin health
Check the whole installkraft admin doctor
Start, stop or restart the serverkraft admin start, stop, restart
Run Kraft as a servicekraft admin install-service
Install the newest releasekraft admin update
Reread the templates and policy after editing themkraft admin reload
Check my chainskraft admin templates lint
Read a chain or a library componentkraft admin templates show, templates library
See the harness profiles and what selects eachkraft admin harnesses
Rescan documents into the search indexkraft admin reindex
Register Kraft with an agentkraft 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 --json prints the item's full detail (its effective chain, worker sessions and stop), where the get_work_item tool hands an agent a trimmed item.
  • kraft item create --json prints a trimmed object, not the raw payload: id, status and title, plus slots (when --autostart queued the item), repo_warning, bead_warning or duplicate_warning when one applies.
  • kraft view list --json is scoped to the repo you are in unless you pass --all or --repo; list_work_items is never scoped.

Each verb prints this without --json, and this with it:

VerbWithout --jsonWith --json
consoleA terminal UI.Not accepted.
view watchA board it redraws rather than returning a value.Not accepted. Use kraft view events --json.
repo pathOne plain line meant for cd.Not accepted. Use kraft view show --json.
admin start, stop, restart, updateStatus lines.Not accepted.
admin install-service, uninstall-serviceStatus lines.Not accepted.
admin mcp, admin permission-hookA protocol on stdio.Not accepted.
admin worker serve, attach, localStatus lines on stderr, or a protocol on stdio.Not accepted.
admin addon enable, disableOne line.Not accepted. Use kraft admin addon list --json.
admin initIt 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, escalateOne 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 gateThe same one line.The API payload.
kraft item review request-changes or comment, with no gate pendingThe review's fields as key value lines.The API payload.
kraft item abandon, and every set-* verb except set-chainThe same key value lines.The API payload.
kraft item set-chainThe chain the item now runs.The API payload.
kraft item archiveThe preview as a table with a total, then one line per item.The preview, or the bulk results with --yes.
kraft item restoreOne line saying what was restored.The API payload.
kraft item comment, resolve, reopenThe 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.
Copyright © 2026