craig-cli
v0.16.0
Published
Craig local control plane CLI
Maintainers
Readme
An agnostic orchestrator TUI, for the people.
Website · Documentation · CLI reference
Craig gives every task its own Git branch, isolated worktree, and live PTY, then keeps the agents, changes, pull requests, and checks together in one keyboard-driven workspace.
Bring the agent CLIs you already use—Claude Code, Codex, or Cursor. Craig is not another coding agent; it is the heads-up display and controls around them.
It's like a game, except the PRs are real.
Why Craig?
- Run agents in parallel. Each task works in an isolated Git worktree, so one agent does not overwrite another.
- Keep the native agent experience. Every runner opens in a real PTY instead of a lowest-common-denominator chat wrapper.
- Stay in flow. Launch agents, move between tasks, inspect changes, and watch PR checks without leaving the keyboard.
- Work across repositories. Treat one repo or a directory of repos as a workspace while preserving real repository boundaries.
- Let agents operate the workspace. The same task model backs the TUI and CLI, so agents and scripts can inspect context and perform Craig actions directly.
- Leave and come back. A local daemon keeps agent sessions and PR synchronization alive when the foreground TUI closes.
Install
npm install -g craig-cliCraig requires Node.js 22+ and git. Install and authenticate at least one supported runner: Claude Code, Codex, or Cursor. Pull request discovery and review status also require an authenticated gh CLI.
The Pi coding agent is available as an opt-in feature preview under Options > Feature Previews.
The Agent file opening preview lets an attached agent run craig file open <path> to display any readable text file directly in the active Craig TUI.
Quick start
Run craig in a full-screen terminal, then work through the TUI:
- Select + New Workspace and choose a Git repository. You can also choose a parent directory to work across its direct-child repositories.
- Press
n, name the task, and useCtrl+Rto choose Claude Code, Codex, or Cursor. PressEnterto create it. - Craig creates an isolated branch and worktree, starts the runner there, and takes you directly into its live PTY. Tell the agent what you want it to do.
- Press
Ctrl+]to return to Craig's control mode. Move between panels withTab, navigate with the arrow keys orhjkl, and pressEnteron a task to reattach to its agent. - Press
nagain to start more tasks while the first agent keeps working. Each task remains isolated in its own worktree. - Use Files to inspect the worktree and Review to follow diffs, pull requests, checks, and review state. Ask the agent to commit, push, create the PR, or merge from its PTY; Craig keeps the status in sync.
See the TUI reference for every panel and keyboard shortcut.
Local by default
Craig stores workspace state, task records, worktrees, and runtime metadata under .craig/ at the workspace root. Do not commit this directory; ignore .craig/ when the workspace root is itself a Git repository. Craig does not require an account or hosted control plane. Your agent CLIs still use their own authentication and network services.
Go deeper
- TUI reference — layout, controls, and task navigation
- Runners — Claude Code, Codex, and Cursor setup
- CLI reference — commands for humans, scripts, and agents
- Configuration — runners, checks, GitHub polling, and previews
- Agent orchestration — delegation, durable prompts, events, and Fury workflows
Contributing
Craig is open source under the MIT License, but it is not a community-maintained project. Bug reports and focused questions are welcome. Please read the contribution guide before proposing a change and report security issues through the security policy.
Development
pnpm install
pnpm test
pnpm typecheck
pnpm lint
pnpm build
pnpm build:npm
pnpm package:audit
pnpm package:smokeThe npm package is published as craig-cli from packages/cli.
