craig-cli 0.6.4 → 0.6.6

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.
Files changed (3) hide show
  1. package/README.md +56 -90
  2. package/dist/cli.js +65 -91
  3. package/package.json +3 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <div align="center">
2
2
  <pre>
3
- ▄████▄ ██▀███ ▄▄▄ ██▓ ▄████
3
+ ▄████▄ ██▀███ ▄▄▄ ██▓ ▄████
4
4
  ▒██▀ ▀█ ▓██ ▒ ██▒▒████▄ ▓██▒ ██▒ ▀█▒
5
5
  ▒▓█ ▄ ▓██ ░▄█ ▒▒██ ▀█▄ ▒██▒▒██░▄▄▄░
6
6
  ▒▓▓▄ ▄██▒▒██▀▀█▄ ░██▄▄▄▄██ ░██░░▓█ ██▓
@@ -9,15 +9,26 @@
9
9
  ░ ▒ ░▒ ░ ▒░ ▒ ▒▒ ░ ▒ ░ ░ ░
10
10
  ░ ░░ ░ ░ ▒ ▒ ░░ ░ ░
11
11
  ░ ░ ░ ░ ░ ░ ░
12
- ░
13
12
 
14
13
  crAIg is that you?
14
+
15
15
  </pre>
16
+
17
+ **An agnostic agent orchestrator. For the people.**
18
+
19
+ [![npm](https://img.shields.io/npm/v/craig-cli)](https://www.npmjs.com/package/craig-cli)
20
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
21
+ [![Node 22+](https://img.shields.io/badge/node-22%2B-brightgreen)](https://nodejs.org)
22
+
23
+ [craig.beer](https://craig.beer) · [Docs](https://craig.beer/docs) · [Quickstart](https://craig.beer/docs/quickstart)
24
+
16
25
  </div>
17
26
 
18
- # Craig
27
+ ---
19
28
 
20
- Craig is a local terminal control plane for repo-backed agent work. The primary interface is the full-screen terminal UI launched with `craig`; command-mode entry points are available for automation and debugging.
29
+ Craig is a full-screen TUI that lets you run multiple AI agents across multiple repos at the same time — each in its own isolated git worktree, each with a live PTY, all from one terminal. Spin up Claude, Codex, and Cursor simultaneously. Watch them cook. Review diffs, run checks, and merge PRs without ever leaving Craig.
30
+
31
+ it's like a game, except the PRs are real.
21
32
 
22
33
  ## Install
23
34
 
@@ -25,41 +36,39 @@ Craig is a local terminal control plane for repo-backed agent work. The primary
25
36
  npm install -g craig-cli
26
37
  ```
27
38
 
28
- Craig requires Node 22 or newer.
29
-
30
- External tools:
31
-
32
- - `git` for repo, branch, and worktree operations
33
- - `gh` authenticated with GitHub for PR, check, and merge flows
34
- - an agent CLI such as Codex, Cursor, or Claude
35
-
36
- ## Start Craig
39
+ Requires Node 22+, `git`, and `gh` (authenticated). Bring your own agent CLI — Claude Code, Codex, or Cursor.
37
40
 
38
- Run Craig from the workspace where you want `.craig/` state to live:
41
+ ## Start
39
42
 
40
43
  ```bash
41
44
  cd path/to/your/workspace
42
45
  craig
43
46
  ```
44
47
 
45
- The TUI opens with a boot overlay, then a workspace shell with task navigation, center work tabs, and an inspector panel.
48
+ The TUI opens with a boot overlay, then a three-panel workspace: task navigation on the left, live agent PTY in the center, file/diff/review inspector on the right.
46
49
 
47
- Craig stores task records, worktrees, runtime UI state, logs, and review metadata under `.craig/`.
50
+ Craig writes all local state under `.craig/` — worktrees, logs, task records, PR metadata. Don't commit it.
48
51
 
49
- ## TUI Workflow
52
+ ## Workflow
50
53
 
51
- 1. Launch `craig`.
52
- 2. Add or select a workspace/repo from the left side. You can also pre-register one with `craig repo add <path>`.
53
- 3. Press `n` to create a task from the TUI.
54
- 4. Type the task prompt and press `Enter`.
55
- 5. Craig creates the branch, task worktree, and agent tab.
56
- 6. Press `Enter` on an agent or terminal tab to attach the live PTY.
57
- 7. Use `Ctrl+]` to return from terminal mode to Craig control mode.
58
- 8. Use the Files, Changes, and Review inspector modes to inspect work without leaving Craig.
54
+ 1. Press `n` to create a task — type a prompt, pick a runner, press `Enter`.
55
+ 2. Craig creates the 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. Use the **Files**, **Changes**, and **Review** inspector panels to check the diff and CI status.
58
+ 5. `craig task pr <task-id> --watch` — creates the PR and waits for checks before merging.
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
+ ```
59
68
 
60
69
  ## TUI Keys
61
70
 
62
- ```text
71
+ ```
63
72
  Global
64
73
  ? help
65
74
  Esc pause / back
@@ -69,17 +78,13 @@ Global
69
78
 
70
79
  Navigation
71
80
  Up/Down, j/k move selection
72
- Left/Right,
73
- h/l switch tabs or inspector mode
81
+ Left/Right, h/l switch tabs or inspector mode
74
82
 
75
83
  Tasks
76
84
  n new task
77
85
  Enter attach selected task PTY
78
86
  X close selected task
79
87
 
80
- Workspaces
81
- X remove selected empty workspace
82
-
83
88
  Center panel
84
89
  Enter attach PTY
85
90
  + new tab
@@ -94,33 +99,25 @@ Review
94
99
 
95
100
  Terminal mode
96
101
  Ctrl+] return to control mode
97
- Wheel,
98
- PgUp/PgDn scroll terminal
102
+ Wheel, PgUp/PgDn scroll terminal
99
103
  ```
100
104
 
101
- ## Command Mode
102
-
103
- Use command mode when scripting, debugging, or working outside the TUI.
105
+ ## Command mode
104
106
 
105
107
  ```bash
106
- craig
107
-
108
108
  craig repo add <path>
109
109
  craig repo list
110
110
  craig repo remove <repo-id>
111
111
 
112
112
  craig workspace list
113
- craig workspace list --archived
114
113
  craig workspace archive <workspace-id>
115
114
  craig workspace restore <workspace-id>
116
115
  craig workspace remove <workspace-id>
117
116
 
118
117
  craig task new --repo <repo-id> [--runner codex|cursor|claude] "<task>"
119
118
  craig task list
120
- craig task list --repo <repo-id>
121
119
  craig task show <task-id>
122
120
  craig task attach <task-id>
123
- craig task open <task-id>
124
121
  craig task logs <task-id>
125
122
  craig task diff <task-id>
126
123
  craig task check <task-id>
@@ -132,9 +129,9 @@ craig link add <task-id> <repo-id>
132
129
  craig link list <task-id>
133
130
  ```
134
131
 
135
- ## Configuration
132
+ ## Config
136
133
 
137
- Craig reads optional workspace-local config from `.craig/config.json`.
134
+ Optional workspace-local config at `.craig/config.json`:
138
135
 
139
136
  ```json
140
137
  {
@@ -148,59 +145,28 @@ Craig reads optional workspace-local config from `.craig/config.json`.
148
145
  },
149
146
  "github": {
150
147
  "mergeMethod": "squash",
151
- "watchIntervalSeconds": 10
148
+ "watchIntervalSeconds": 5
152
149
  }
153
150
  }
154
151
  ```
155
152
 
156
- `checks.commands` defines commands for `craig task check`. `runners.<id>` controls whether Codex, Cursor, or Claude appears as a task runner and can override that runner's executable path. Runner path changes apply to newly created task sessions.
157
-
158
- ## Local State
159
-
160
- Craig writes local state under `.craig/`:
161
-
162
- ```text
163
- .craig/
164
- artifacts/
165
- logs/
166
- runtime/
167
- tasks/
168
- workspaces/
169
- worktrees/
170
- ```
171
-
172
- Treat `.craig/` as private developer state. It can contain task prompts, terminal logs, local paths, branch names, PR metadata, runtime state, and worktrees. Do not commit `.craig/` or share it in public issues.
153
+ ## Contributing
173
154
 
174
- Craig does not run a hosted service or upload `.craig/` state by itself. Commands that use external tools, such as `gh` or an agent CLI, follow the behavior and authentication model of those tools.
155
+ Craig is open source under MIT, but not a community-maintained project. Bug reports and focused questions are welcome. PRs should be discussed with the maintainer first — unsolicited PRs may be closed without review.
175
156
 
176
- ## Open Source and Contributions
157
+ See [CONTRIBUTING.md](CONTRIBUTING.md) and [SECURITY.md](SECURITY.md).
177
158
 
178
- Craig is open source under the MIT license, but it is not currently a community-maintained project.
159
+ ## Development
179
160
 
180
- Issues are welcome for reproducible bugs, installation problems, and focused questions. Pull requests are not generally accepted unless they were discussed with the maintainer first, and unsolicited PRs may be closed without review.
181
-
182
- See the GitHub repository for the contribution policy and private vulnerability reporting guidance.
183
-
184
- ## License
185
-
186
- MIT License
187
-
188
- Copyright (c) 2026 Sam Hall
189
-
190
- Permission is hereby granted, free of charge, to any person obtaining a copy
191
- of this software and associated documentation files (the "Software"), to deal
192
- in the Software without restriction, including without limitation the rights
193
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
194
- copies of the Software, and to permit persons to whom the Software is
195
- furnished to do so, subject to the following conditions:
196
-
197
- The above copyright notice and this permission notice shall be included in all
198
- copies or substantial portions of the Software.
161
+ ```bash
162
+ pnpm install
163
+ pnpm test
164
+ pnpm typecheck
165
+ pnpm lint
166
+ pnpm build
167
+ pnpm build:npm
168
+ pnpm package:audit
169
+ pnpm package:smoke
170
+ ```
199
171
 
200
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
201
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
202
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
203
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
204
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
205
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
206
- SOFTWARE.
172
+ The npm package is published as `craig-cli` from `packages/cli`.