CLI Reference

The command surface behind Craig's TUI.

The TUI and CLI use the same task model. Humans, scripts, and Craig-launched agents can inspect context and operate tasks without automating the screen. Add --json for machine-readable commands and --no-input when interactive input must be rejected.

Runner values are codex, cursor, claude, and the preview-gated pi. Duration values use ms, s, m, or h, such as 30s or 10m. Agent states are idle, working, ready, and error. Durable prompt-command states are queued, delivering, delivered, failed, and cancelled.

Run craig --help for every option. Preview-gated orchestration commands are explained in Agent Orchestration.

Launch and context

craig Open the TUI
craig [--workspace-root <path>] [--task <id>] [--json] [--no-input] <command> Run a command with explicit context and output controls
craig context show Show the resolved workspace, task, and agent tab

Repositories and workspaces

craig repo add <path> Register a repository
craig repo list List registered repositories
craig repo remove <id> Unregister a repository
craig workspace add <path> Register a repo or parent-directory workspace
craig workspace list [--archived] List workspaces
craig workspace archive <id> Archive an active workspace
craig workspace restore <id> Restore an archived workspace
craig workspace remove <id> Remove an archived workspace with no task records

Tasks

craig task new --repo <id> [--runner <runner>] "<task>" Create a repository task
craig task new --workspace <id> [--runner <runner>] "<task>" Create a workspace task
craig task list [--repo <id>] List tasks
craig task current Show the task resolved from context
craig task show [<id>] Show task details
craig task open <id> Open the task worktree or print its path
craig task logs <id> Stream Craig-managed task logs
craig task diff <id> Show the current worktree diff
craig task check <id> Run configured check commands
craig task commit <id> Commit all current worktree changes

Pull requests

craig task pr show [<id>] [--repo <id>] Show the associated pull request
craig task pr discover [<id>] [--repo <id>] Discover a PR by task branch
craig task pr link [<id>] --pr <url|number> [--repo <id>] Associate an existing PR
craig task pr refresh [<id>] [--repo <id>] Refresh PR, review, and check state
craig task pr unlink [<id>] --pr <url|number> [--repo <id>] Remove a PR association

Agent status

craig agent list [--task <id>] --json List agent-tab and task roll-up states
craig agent status [--task <id>] [--tab <id>] --json Inspect one agent runtime
craig task wait [<id>] --state <states> [--tab <id>] [--timeout <duration>] Wait for task or agent state

Agent orchestration · preview

craig agent send --task <id> [--tab <id>] (--prompt <text> | --prompt-file <path> | --stdin) [--delivery when-ready|immediate] [--timeout <duration>] [--idempotency-key <key>] Queue a durable prompt
craig events list [--task <id>] [--type <glob>] [--after <cursor>] --json List workspace events
craig events watch [--task <id>] [--type <glob>] [--after <cursor>] [--format jsonl] Watch workspace events

Durable prompt recovery

craig command show <command-id> --json Show a durable prompt command
craig command list [--task <id>] --json List durable prompt commands
craig command cancel <command-id> --json Cancel a queued prompt command
craig command wait <command-id> [--state <states>] [--timeout <duration>] --json Wait for command state

Delegation · preview

craig task create-child [--parent <id>] [--repo <id> | --workspace <id>] [--runner <runner>] [--idempotency-key <key>] "<task>" --json Create a capability-scoped child task

Task lineage and cancellation

craig task children [<id>] --json List direct child tasks
craig task cancel-tree [<id>] --json Cancel a task and its descendants

Fury workflows · preview

craig fury validate <file> --json Validate a Fury definition
craig fury plan <file> [--root-task <id>] [--input key=value] --json Create an immutable plan
craig fury approve <plan-id> --json Approve an exact plan as a human
craig fury run <plan-id> --json Start an approved plan
craig fury status <run-id> --json Show run state
craig fury watch <run-id> [--after <cursor>] [--format jsonl] Watch run events
craig fury cancel <run-id> --json Cancel a run
craig fury resume <run-id> --json Resume reconciliation for a run
craig fury step complete --run <id> --step <id> [--output <json> | --output-file <path> | --stdin] --json Complete an agent step
craig fury step fail --run <id> --step <id> --reason <text> --json Fail an agent step
craig fury reviews list [--run <id>] [--state <state>] --json List human-review checkpoints
craig fury review show <review-id> --json Show a review checkpoint
craig fury review approve <review-id> [--note <text>] --json Approve a checkpoint as a human
craig fury review reject <review-id> --reason <text> --json Reject a checkpoint as a human
craig fury review request-changes <review-id> --reason <text> --json Return feedback to the target agent
craig fury review resubmit <review-id> [--summary <text>] --json Resubmit a changes-requested checkpoint

Links

craig link add <task-id> <repo-id> Link an additional repository to a task
craig link list <task-id> List linked repositories