Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/xantorres/repokernel/llms.txt

Use this file to discover all available pages before exploring further.

The RepoKernel CLI ships as a single binary exposed under two names: rk (the short form used throughout this documentation) and repokernel (the full alias). Both names invoke identical code — choose whichever fits your shell scripts or muscle memory. Every command accepts --cwd <path> to run against a repo that is not your current directory, and --version / -v to print the installed version.

Global Flags

These flags are available on every command:
FlagDescription
--cwd <path>Run as if the working directory is <path> instead of the current directory
--version / -vPrint the installed version and exit

JSON Output Envelope

Commands that accept --json return a typed envelope rather than a bare array. The top-level key matches the entity type, which lets downstream scripts treat the output schema as stable even when new fields are added.
CommandTop-level keyjq accessor
rk ls epics --json"epics".epics[]
rk ls sprints --json"sprints".sprints[]
rk ls reviews --json"reviews".reviews[]
rk ls lanes --json"lanes".lanes[]
rk validate --json"findings".findings[]
rk registry --jsonroot objectjq '.'
rk task list --jsonbare array.[]
rk task status --jsonroot TaskAliasjq '.'
rk task inspect --json{ alias, paths }.alias, .paths
# Example: extract every epic id from JSON output
rk ls epics --json | jq '.epics[] | .id'

Exit Codes

RepoKernel uses a small set of distinct exit codes so agent shells and CI pipelines can respond precisely to each outcome. The values are defined verbatim in packages/cli/src/exitCodes.ts and cannot drift from this table without breaking the documentation-truth CI test.
CodeConstantMeaning
0EXIT_OKClean: no findings at or above threshold
1EXIT_FINDINGS / EXIT_BLOCKEDFindings at or above threshold; expected project-state error (lane already claimed, review pending, etc.)
2EXIT_RUNTIMETool or environment error not attributable to project state (IO failure, internal assertion, unhandled exception)
3EXIT_BUDGET_EXCEEDEDrk context payload exceeds the configured budget — increase budget or shrink scope
4EXIT_BUDGET_TOO_SMALLBudget is smaller than the essential capsule itself — raise the budget
64EXIT_USAGEBad command-line invocation (unknown enum value, mutually exclusive flags, malformed numeric option). Follows sysexits.h

Agent Shell Disambiguation

When writing scripts that need to distinguish between error categories, branch in this order:
  1. 64 first — fix the CLI arguments before retrying anything else
  2. 2 next — transient tool or environment crash; may be safe to retry
  3. 1 next — project state needs work (a review verdict, a missing queue slot, etc.)
  4. 3 / 4 last — context-budget gates; adjust budget or scope
rk run E-001 --agent claude
EXIT=$?
if [ $EXIT -eq 64 ]; then
  echo "Bad CLI invocation — fix arguments"
elif [ $EXIT -eq 2 ]; then
  echo "Runtime crash — may retry"
elif [ $EXIT -eq 1 ]; then
  echo "Project state blocked — inspect and unblock"
elif [ $EXIT -eq 3 ] || [ $EXIT -eq 4 ]; then
  echo "Context budget gate — adjust budget"
fi

Command Groups

Setup & Init

rk init, rk doctor, rk fix, rk recover, rk install-skill, rk validate, rk import, rk export

Sprint Lifecycle

rk start, rk close, rk ship, rk reopen, rk rebase-sprint, rk epic close, rk epic ship, queue and lane commands, hotfix

Run Orchestrator

rk run, rk runs, rk run inspect, rk run logs, rk run abort, fastpath task commands

Review & Gates

rk review, rk review-verdict, rk review-evidence, rk gates, rk gate, rk reject

Query & Inspect

rk status, rk next, rk report, rk ls, rk inspect, rk explain, rk registry, rk chain preview, rk team status, rk plan, rk wave, rk audit-trail, rk brief, rk board, rk blockers, rk context

Configuration

repokernel.config.yaml — agents, lanes, policies, automation, chaining

Build docs developers (and LLMs) love