craig-cli 0.2.0 → 0.3.0

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 +117 -15
  2. package/dist/cli.js +50 -50
  3. package/package.json +2 -1
package/README.md CHANGED
@@ -1,6 +1,23 @@
1
+ <div align="center">
2
+ <pre>
3
+ ▄████▄ ██▀███ ▄▄▄ ██▓ ▄████
4
+ ▒██▀ ▀█ ▓██ ▒ ██▒▒████▄ ▓██▒ ██▒ ▀█▒
5
+ ▒▓█ ▄ ▓██ ░▄█ ▒▒██ ▀█▄ ▒██▒▒██░▄▄▄░
6
+ ▒▓▓▄ ▄██▒▒██▀▀█▄ ░██▄▄▄▄██ ░██░░▓█ ██▓
7
+ ▒ ▓███▀ ░░██▓ ▒██▒ ▓█ ▓██▒░██░░▒▓███▀▒
8
+ ░ ░▒ ▒ ░░ ▒▓ ░▒▓░ ▒▒ ▓▒█░░▓ ░▒ ▒
9
+ ░ ▒ ░▒ ░ ▒░ ▒ ▒▒ ░ ▒ ░ ░ ░
10
+ ░ ░░ ░ ░ ▒ ▒ ░░ ░ ░
11
+ ░ ░ ░ ░ ░ ░ ░
12
+ ░
13
+
14
+ crAIg is that you?
15
+ </pre>
16
+ </div>
17
+
1
18
  # Craig
2
19
 
3
- Craig is a local terminal control plane for repo-backed agent work.
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.
4
21
 
5
22
  ## Install
6
23
 
@@ -10,42 +27,105 @@ npm install -g craig-cli
10
27
 
11
28
  Craig requires Node 22 or newer.
12
29
 
13
- ## Setup
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
14
37
 
15
- Run Craig from a git workspace:
38
+ Run Craig from the workspace where you want `.craig/` state to live:
16
39
 
17
40
  ```bash
18
- cd path/to/your/repo
41
+ cd path/to/your/workspace
19
42
  craig
20
43
  ```
21
44
 
22
- Craig stores local workspace state under `.craig/` in the workspace where you run it. That state includes task records, worktrees, runtime UI state, logs, and review metadata.
23
-
24
- ## External Tools
25
-
26
- Craig does not bundle agent CLIs. Install and authenticate the agent CLIs you want to use separately, such as Codex, Cursor, or Claude.
27
-
28
- Craig also expects:
45
+ The TUI opens with a boot overlay, then a workspace shell with task navigation, center work tabs, and an inspector panel.
46
+
47
+ Craig stores task records, worktrees, runtime UI state, logs, and review metadata under `.craig/`.
48
+
49
+ ## TUI Workflow
50
+
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.
59
+
60
+ ## TUI Keys
61
+
62
+ ```text
63
+ Global
64
+ ? help
65
+ Esc pause / back
66
+ Tab, ] next panel
67
+ Shift+Tab, [ previous panel
68
+ q quit
69
+
70
+ Navigation
71
+ Up/Down, j/k move selection
72
+ Left/Right,
73
+ h/l switch tabs or inspector mode
74
+
75
+ Tasks
76
+ n new task
77
+ Enter attach selected task PTY
78
+ X close selected task
79
+
80
+ Center panel
81
+ Enter attach PTY
82
+ + new tab
83
+ a new agent tab
84
+ t new terminal tab
85
+ x close tab
86
+ z zoom center panel
87
+
88
+ Review
89
+ R sync PR / refresh checks
90
+ X close task
91
+
92
+ Terminal mode
93
+ Ctrl+] return to control mode
94
+ Wheel,
95
+ PgUp/PgDn scroll terminal
96
+ ```
29
97
 
30
- - `git` for workspace, branch, and worktree operations
31
- - `gh` authenticated with GitHub for PR, check, and merge flows
98
+ ## Command Mode
32
99
 
33
- ## Commands
100
+ Use command mode when scripting, debugging, or working outside the TUI.
34
101
 
35
102
  ```bash
36
103
  craig
104
+
37
105
  craig repo add <path>
38
106
  craig repo list
39
107
  craig repo remove <repo-id>
108
+
40
109
  craig workspace list
41
- craig task new --repo <repo-id> "<task>"
110
+ craig workspace list --archived
111
+ craig workspace archive <workspace-id>
112
+ craig workspace restore <workspace-id>
113
+
114
+ craig task new --repo <repo-id> [--runner codex|cursor|claude] "<task>"
42
115
  craig task list
116
+ craig task list --repo <repo-id>
43
117
  craig task show <task-id>
118
+ craig task attach <task-id>
119
+ craig task open <task-id>
44
120
  craig task logs <task-id>
45
121
  craig task diff <task-id>
46
122
  craig task check <task-id>
123
+ craig task commit <task-id>
47
124
  craig task pr <task-id> [--watch]
48
125
  craig task merge <task-id> [--preserve-worktree]
126
+
127
+ craig link add <task-id> <repo-id>
128
+ craig link list <task-id>
49
129
  ```
50
130
 
51
131
  ## Configuration
@@ -68,3 +148,25 @@ Craig reads optional workspace-local config from `.craig/config.json`.
68
148
  }
69
149
  }
70
150
  ```
151
+
152
+ `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.
153
+
154
+ ## Local State
155
+
156
+ Craig writes local state under `.craig/`:
157
+
158
+ ```text
159
+ .craig/
160
+ artifacts/
161
+ logs/
162
+ runtime/
163
+ tasks/
164
+ workspaces/
165
+ worktrees/
166
+ ```
167
+
168
+ Treat `.craig/` as private developer state. It can contain task prompts, logs, local paths, PR metadata, and worktrees.
169
+
170
+ ## License
171
+
172
+ Craig is proprietary software. All rights reserved.