craig-cli 0.14.1 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -215
- package/dist/cli.js +107 -107
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,250 +10,73 @@
|
|
|
10
10
|
░ ░░ ░ ░ ▒ ▒ ░░ ░ ░
|
|
11
11
|
░ ░ ░ ░ ░ ░ ░
|
|
12
12
|
|
|
13
|
-
crAIg is that you?
|
|
14
|
-
|
|
15
13
|
</pre>
|
|
16
14
|
|
|
17
|
-
**An agnostic
|
|
15
|
+
**An agnostic orchestrator TUI, for the people.**
|
|
18
16
|
|
|
19
17
|
[](https://www.npmjs.com/package/craig-cli)
|
|
20
|
-
[](LICENSE)
|
|
18
|
+
[](https://github.com/hallsamuel90/craig/blob/main/LICENSE)
|
|
21
19
|
[](https://nodejs.org)
|
|
22
20
|
|
|
23
|
-
[
|
|
21
|
+
[Website](https://craig-cli.com) · [Documentation](https://craig-cli.com/docs/) · [CLI reference](https://craig-cli.com/docs/cli/)
|
|
24
22
|
|
|
25
23
|
</div>
|
|
26
24
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
it's like a game, except the PRs are real.
|
|
32
|
-
|
|
33
|
-
## Install
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
npm install -g craig-cli
|
|
37
|
-
```
|
|
25
|
+
<a href="https://craig-cli.com">
|
|
26
|
+
<img src="https://craig-cli.com/craig-agent.gif" alt="Craig running parallel coding agents in its terminal UI">
|
|
27
|
+
</a>
|
|
38
28
|
|
|
39
|
-
|
|
29
|
+
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.
|
|
40
30
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
cd path/to/your/workspace
|
|
45
|
-
craig
|
|
46
|
-
```
|
|
31
|
+
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.
|
|
47
32
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
Craig writes all local state under `.craig/` — worktrees, logs, task records, PR metadata. Don't commit it.
|
|
51
|
-
|
|
52
|
-
## Workflow
|
|
53
|
-
|
|
54
|
-
1. Press `n` to create a task — type a short task description, pick a runner, press `Enter`.
|
|
55
|
-
2. Craig creates the task record, branch, worktree, and agent tab automatically.
|
|
56
|
-
3. Press `Enter` on the task to attach its live PTY. `Ctrl+]` to return to control mode.
|
|
57
|
-
4. Give the runner its instructions in the agent PTY. The task description is Craig metadata; it is not pasted into the runner automatically.
|
|
58
|
-
5. Use the **Files**, **Changes**, and read-only **Review** inspector panels to check the diff, PR state, checks, and comments.
|
|
59
|
-
|
|
60
|
-
## Polyrepo support
|
|
61
|
-
|
|
62
|
-
Point Craig at a directory containing multiple repos and it treats them as a single workspace. Create a task once — Craig provisions a worktree for each repo and runs the agent across all of them in one pass.
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
cd path/to/your/projects # contains repo-a/, repo-b/, repo-c/
|
|
66
|
-
craig
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## TUI Keys
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
Global
|
|
73
|
-
? help
|
|
74
|
-
Esc pause
|
|
75
|
-
Tab, ] next panel
|
|
76
|
-
Shift+Tab, [ previous panel
|
|
77
|
-
Up/Down, j/k move selection
|
|
78
|
-
PgUp/PgDn, Wheel scroll focused inspection or terminal view
|
|
79
|
-
z zoom center panel
|
|
80
|
-
n new task
|
|
81
|
-
q quit
|
|
33
|
+
_It's like a game, except the PRs are real._
|
|
82
34
|
|
|
83
|
-
|
|
84
|
-
Left/Right, h/l switch tabs or inspector mode
|
|
35
|
+
## Why Craig?
|
|
85
36
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
X on workspace remove selected workspace
|
|
37
|
+
- **Run agents in parallel.** Each task works in an isolated Git worktree, so one agent does not overwrite another.
|
|
38
|
+
- **Keep the native agent experience.** Every runner opens in a real PTY instead of a lowest-common-denominator chat wrapper.
|
|
39
|
+
- **Stay in flow.** Launch agents, move between tasks, inspect changes, and watch PR checks without leaving the keyboard.
|
|
40
|
+
- **Work across repositories.** Treat one repo or a directory of repos as a workspace while preserving real repository boundaries.
|
|
41
|
+
- **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.
|
|
42
|
+
- **Leave and come back.** A local daemon keeps agent sessions and PR synchronization alive when the foreground TUI closes.
|
|
93
43
|
|
|
94
|
-
|
|
95
|
-
Enter attach PTY
|
|
96
|
-
+ create preferred tab kind
|
|
97
|
-
a new agent tab
|
|
98
|
-
t new terminal tab
|
|
99
|
-
r cycle runner for next agent tab
|
|
100
|
-
x close tab
|
|
101
|
-
|
|
102
|
-
Review
|
|
103
|
-
Enter refresh status or close task, depending on selected action
|
|
104
|
-
R refresh read-only PR/check state
|
|
105
|
-
o open tracked PR URL
|
|
106
|
-
X close task record
|
|
107
|
-
|
|
108
|
-
Task prompt
|
|
109
|
-
Ctrl+R cycle runner
|
|
110
|
-
Enter create task
|
|
111
|
-
Esc cancel
|
|
112
|
-
|
|
113
|
-
Workspace browser
|
|
114
|
-
Up/Down, j/k move selection
|
|
115
|
-
Right, l open directory
|
|
116
|
-
Left, h parent directory
|
|
117
|
-
Enter add selected path
|
|
118
|
-
Esc cancel
|
|
119
|
-
|
|
120
|
-
Terminal mode
|
|
121
|
-
Ctrl+] return to control mode
|
|
122
|
-
Wheel, PgUp/PgDn scroll terminal
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
## Command mode
|
|
44
|
+
## Install
|
|
126
45
|
|
|
127
46
|
```bash
|
|
128
|
-
|
|
129
|
-
craig repo list
|
|
130
|
-
craig repo remove <repo-id>
|
|
131
|
-
|
|
132
|
-
craig workspace add <path>
|
|
133
|
-
craig workspace list
|
|
134
|
-
craig workspace list --archived
|
|
135
|
-
craig workspace archive <workspace-id>
|
|
136
|
-
craig workspace restore <workspace-id>
|
|
137
|
-
craig workspace remove <workspace-id>
|
|
138
|
-
|
|
139
|
-
craig task new --repo <repo-id> [--runner codex|cursor|claude] "<task>"
|
|
140
|
-
craig task new --workspace <workspace-id> [--runner codex|cursor|claude] "<task>"
|
|
141
|
-
craig task list
|
|
142
|
-
craig task list --repo <repo-id>
|
|
143
|
-
craig task show <task-id>
|
|
144
|
-
craig task open <task-id>
|
|
145
|
-
craig task logs <task-id>
|
|
146
|
-
craig task diff <task-id>
|
|
147
|
-
craig task check <task-id>
|
|
148
|
-
craig task commit <task-id>
|
|
149
|
-
craig task create-child --parent <task-id> [--repo <repo-id> | --workspace <workspace-id>] [--runner codex|cursor|claude] \
|
|
150
|
-
[--idempotency-key <key>] "<task>" --json
|
|
151
|
-
craig task children [<task-id>] --json
|
|
152
|
-
craig task cancel-tree [<task-id>] --json
|
|
153
|
-
|
|
154
|
-
craig agent list [--task <task-id>] --json
|
|
155
|
-
craig agent status [--task <task-id>] [--tab <tab-id>] --json
|
|
156
|
-
craig agent send --task <task-id> [--tab <tab-id>] (--prompt <text> | --prompt-file <path> | --stdin) \
|
|
157
|
-
[--delivery when-ready|immediate] [--timeout <duration>] [--idempotency-key <key>] --json
|
|
158
|
-
craig task wait [<task-id>] --state <states> [--tab <tab-id>] [--timeout <duration>] --json
|
|
159
|
-
|
|
160
|
-
craig events list [--task <task-id>] [--type <glob>] [--after <cursor>] --json
|
|
161
|
-
craig events watch [--task <task-id>] [--type <glob>] [--after <cursor>] [--format jsonl]
|
|
162
|
-
|
|
163
|
-
craig fury validate <file> --json
|
|
164
|
-
craig fury plan <file> [--root-task <task-id>] [--input key=value] --json
|
|
165
|
-
craig fury approve <plan-id> --json
|
|
166
|
-
craig fury run <plan-id> --json
|
|
167
|
-
craig fury status <run-id> --json
|
|
168
|
-
craig fury watch <run-id> [--after <cursor>] [--format jsonl]
|
|
169
|
-
craig fury cancel <run-id> --json
|
|
170
|
-
craig fury resume <run-id> --json
|
|
171
|
-
craig fury step complete --run <run-id> --step <step-id> [--output <json> | --output-file <path> | --stdin] --json
|
|
172
|
-
craig fury step fail --run <run-id> --step <step-id> --reason <text> --json
|
|
173
|
-
craig fury reviews list [--run <run-id>] [--state <state>] --json
|
|
174
|
-
craig fury review show|approve|reject|request-changes|resubmit <review-id> --json
|
|
175
|
-
|
|
176
|
-
craig command show <command-id> --json
|
|
177
|
-
craig command list [--task <task-id>] --json
|
|
178
|
-
craig command cancel <command-id> --json
|
|
179
|
-
craig command wait <command-id> [--state <states>] [--timeout <duration>] --json
|
|
180
|
-
|
|
181
|
-
craig link add <task-id> <repo-id>
|
|
182
|
-
craig link list <task-id>
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
## Config
|
|
186
|
-
|
|
187
|
-
Optional workspace-local config at `.craig/config.json`:
|
|
188
|
-
|
|
189
|
-
```json
|
|
190
|
-
{
|
|
191
|
-
"runners": {
|
|
192
|
-
"codex": { "enabled": true },
|
|
193
|
-
"cursor": { "enabled": true },
|
|
194
|
-
"claude": { "enabled": false }
|
|
195
|
-
},
|
|
196
|
-
"checks": {
|
|
197
|
-
"commands": ["pnpm test", "pnpm typecheck", "pnpm lint"]
|
|
198
|
-
},
|
|
199
|
-
"github": {
|
|
200
|
-
"mergeMethod": "squash",
|
|
201
|
-
"watchIntervalSeconds": 5
|
|
202
|
-
},
|
|
203
|
-
"previews": {
|
|
204
|
-
"agentActivityIndicators": false,
|
|
205
|
-
"agentOrchestration": false
|
|
206
|
-
}
|
|
207
|
-
}
|
|
47
|
+
npm install -g craig-cli
|
|
208
48
|
```
|
|
209
49
|
|
|
210
|
-
|
|
50
|
+
Craig 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.
|
|
211
51
|
|
|
212
|
-
|
|
52
|
+
## Quick start
|
|
213
53
|
|
|
214
|
-
|
|
54
|
+
Run `craig` in a full-screen terminal, then work through the TUI:
|
|
215
55
|
|
|
216
|
-
|
|
56
|
+
1. Select **+ New Workspace** and choose a Git repository. You can also choose a parent directory to work across its direct-child repositories.
|
|
57
|
+
2. Press `n`, name the task, and use `Ctrl+R` to choose Claude Code, Codex, or Cursor. Press `Enter` to create it.
|
|
58
|
+
3. 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.
|
|
59
|
+
4. Press `Ctrl+]` to return to Craig's control mode. Move between panels with `Tab`, navigate with the arrow keys or `hjkl`, and press `Enter` on a task to reattach to its agent.
|
|
60
|
+
5. Press `n` again to start more tasks while the first agent keeps working. Each task remains isolated in its own worktree.
|
|
61
|
+
6. 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.
|
|
217
62
|
|
|
218
|
-
|
|
63
|
+
See the [TUI reference](https://craig-cli.com/docs/tui/) for every panel and keyboard shortcut.
|
|
219
64
|
|
|
220
|
-
|
|
65
|
+
## Local by default
|
|
221
66
|
|
|
222
|
-
|
|
67
|
+
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.
|
|
223
68
|
|
|
224
|
-
|
|
225
|
-
version: 1
|
|
226
|
-
name: inspect-and-review
|
|
227
|
-
limits: { max_concurrency: 2, max_tasks: 4, timeout: 2h }
|
|
228
|
-
inputs:
|
|
229
|
-
task_id: { type: string, required: true }
|
|
230
|
-
steps:
|
|
231
|
-
inspect:
|
|
232
|
-
task: "${{ inputs.task_id }}"
|
|
233
|
-
prompt: Inspect the task and submit structured findings.
|
|
234
|
-
output:
|
|
235
|
-
schema: { type: object, required: [findings] }
|
|
236
|
-
review:
|
|
237
|
-
needs: [inspect]
|
|
238
|
-
human_review:
|
|
239
|
-
title: Review findings
|
|
240
|
-
summary: Review the submitted findings before execution continues.
|
|
241
|
-
feedback_target: { task: "${{ steps.inspect.task_id }}" }
|
|
242
|
-
timeout: 1h
|
|
243
|
-
```
|
|
69
|
+
## Go deeper
|
|
244
70
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
reacts to task and agent completion events for faster refreshes.
|
|
71
|
+
- [TUI reference](https://craig-cli.com/docs/tui/) — layout, controls, and task navigation
|
|
72
|
+
- [Runners](https://craig-cli.com/docs/runners/) — Claude Code, Codex, and Cursor setup
|
|
73
|
+
- [CLI reference](https://craig-cli.com/docs/cli/) — commands for humans, scripts, and agents
|
|
74
|
+
- [Configuration](https://craig-cli.com/docs/config/) — runners, checks, GitHub polling, and previews
|
|
75
|
+
- [Agent orchestration](https://craig-cli.com/docs/orchestration/) — delegation, durable prompts, events, and Fury workflows
|
|
251
76
|
|
|
252
77
|
## Contributing
|
|
253
78
|
|
|
254
|
-
Craig is open source under MIT, but not a community-maintained project. Bug reports and focused questions are welcome.
|
|
255
|
-
|
|
256
|
-
See [CONTRIBUTING.md](CONTRIBUTING.md) and [SECURITY.md](SECURITY.md).
|
|
79
|
+
Craig is open source under the [MIT License](https://github.com/hallsamuel90/craig/blob/main/LICENSE), but it is not a community-maintained project. Bug reports and focused questions are welcome. Please read the [contribution guide](https://github.com/hallsamuel90/craig/blob/main/CONTRIBUTING.md) before proposing a change and report security issues through the [security policy](https://github.com/hallsamuel90/craig/blob/main/SECURITY.md).
|
|
257
80
|
|
|
258
81
|
## Development
|
|
259
82
|
|
|
@@ -268,4 +91,4 @@ pnpm package:audit
|
|
|
268
91
|
pnpm package:smoke
|
|
269
92
|
```
|
|
270
93
|
|
|
271
|
-
The npm package is published as `craig-cli` from `packages/cli`.
|
|
94
|
+
The npm package is published as [`craig-cli`](https://www.npmjs.com/package/craig-cli) from `packages/cli`.
|