cluttry 1.0.3 → 1.5.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 (91) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/README.md +203 -300
  3. package/dist/commands/completions.d.ts +16 -0
  4. package/dist/commands/completions.d.ts.map +1 -0
  5. package/dist/commands/completions.js +46 -0
  6. package/dist/commands/completions.js.map +1 -0
  7. package/dist/commands/explain-copy.d.ts +11 -0
  8. package/dist/commands/explain-copy.d.ts.map +1 -0
  9. package/dist/commands/explain-copy.js +34 -0
  10. package/dist/commands/explain-copy.js.map +1 -0
  11. package/dist/commands/finish.d.ts +20 -0
  12. package/dist/commands/finish.d.ts.map +1 -0
  13. package/dist/commands/finish.js +817 -0
  14. package/dist/commands/finish.js.map +1 -0
  15. package/dist/commands/gc.d.ts +22 -0
  16. package/dist/commands/gc.d.ts.map +1 -0
  17. package/dist/commands/gc.js +163 -0
  18. package/dist/commands/gc.js.map +1 -0
  19. package/dist/commands/init.d.ts.map +1 -1
  20. package/dist/commands/init.js +1 -0
  21. package/dist/commands/init.js.map +1 -1
  22. package/dist/commands/open.d.ts +15 -1
  23. package/dist/commands/open.d.ts.map +1 -1
  24. package/dist/commands/open.js +96 -17
  25. package/dist/commands/open.js.map +1 -1
  26. package/dist/commands/resume.d.ts +21 -0
  27. package/dist/commands/resume.d.ts.map +1 -0
  28. package/dist/commands/resume.js +106 -0
  29. package/dist/commands/resume.js.map +1 -0
  30. package/dist/commands/rm.d.ts.map +1 -1
  31. package/dist/commands/rm.js +6 -14
  32. package/dist/commands/rm.js.map +1 -1
  33. package/dist/commands/spawn.d.ts +3 -0
  34. package/dist/commands/spawn.d.ts.map +1 -1
  35. package/dist/commands/spawn.js +182 -19
  36. package/dist/commands/spawn.js.map +1 -1
  37. package/dist/index.d.ts +4 -0
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +198 -9
  40. package/dist/index.js.map +1 -1
  41. package/dist/lib/completions.d.ts +35 -0
  42. package/dist/lib/completions.d.ts.map +1 -0
  43. package/dist/lib/completions.js +368 -0
  44. package/dist/lib/completions.js.map +1 -0
  45. package/dist/lib/config.d.ts.map +1 -1
  46. package/dist/lib/config.js +2 -0
  47. package/dist/lib/config.js.map +1 -1
  48. package/dist/lib/errors.d.ts +43 -0
  49. package/dist/lib/errors.d.ts.map +1 -0
  50. package/dist/lib/errors.js +251 -0
  51. package/dist/lib/errors.js.map +1 -0
  52. package/dist/lib/git.d.ts +17 -0
  53. package/dist/lib/git.d.ts.map +1 -1
  54. package/dist/lib/git.js +78 -10
  55. package/dist/lib/git.js.map +1 -1
  56. package/dist/lib/safety.d.ts +79 -0
  57. package/dist/lib/safety.d.ts.map +1 -0
  58. package/dist/lib/safety.js +133 -0
  59. package/dist/lib/safety.js.map +1 -0
  60. package/dist/lib/secrets.d.ts +29 -0
  61. package/dist/lib/secrets.d.ts.map +1 -1
  62. package/dist/lib/secrets.js +115 -0
  63. package/dist/lib/secrets.js.map +1 -1
  64. package/dist/lib/session.d.ts +93 -0
  65. package/dist/lib/session.d.ts.map +1 -0
  66. package/dist/lib/session.js +254 -0
  67. package/dist/lib/session.js.map +1 -0
  68. package/dist/lib/types.d.ts +6 -1
  69. package/dist/lib/types.d.ts.map +1 -1
  70. package/package.json +1 -1
  71. package/.claude/settings.local.json +0 -7
  72. package/src/commands/doctor.ts +0 -222
  73. package/src/commands/init.ts +0 -120
  74. package/src/commands/list.ts +0 -133
  75. package/src/commands/open.ts +0 -78
  76. package/src/commands/prune.ts +0 -36
  77. package/src/commands/rm.ts +0 -125
  78. package/src/commands/shell.ts +0 -99
  79. package/src/commands/spawn.ts +0 -169
  80. package/src/index.ts +0 -123
  81. package/src/lib/config.ts +0 -120
  82. package/src/lib/git.ts +0 -243
  83. package/src/lib/output.ts +0 -102
  84. package/src/lib/paths.ts +0 -108
  85. package/src/lib/secrets.ts +0 -193
  86. package/src/lib/types.ts +0 -69
  87. package/tests/config.test.ts +0 -102
  88. package/tests/paths.test.ts +0 -155
  89. package/tests/secrets.test.ts +0 -150
  90. package/tsconfig.json +0 -20
  91. package/vitest.config.ts +0 -15
package/README.md CHANGED
@@ -1,444 +1,347 @@
1
1
  # cluttry
2
2
 
3
- Git worktrees made painless for **vibecoders** running parallel AI-agent sessions.
3
+ AI session lifecycle in git worktrees.
4
4
 
5
5
  **CLI command:** `cry`
6
6
 
7
- ## Why This Exists
8
-
9
- When working with AI coding assistants like Claude, you often want to run multiple parallel sessions on different branches. Git worktrees are perfect for this—each worktree is a separate checkout where an agent can work independently.
10
-
11
- But managing worktrees manually is tedious:
12
- - You have to remember the `git worktree` commands
13
- - You need to copy your `.env` files and secrets to each worktree
14
- - You want to run setup commands like `npm install` automatically
15
- - You want to launch your AI agent in the new worktree
16
-
17
- **cry** solves all of this with one command.
18
-
19
- ## Installation
20
-
21
- ### Using Bun (recommended)
22
-
23
- ```bash
24
- # Install globally with Bun
25
- bun add -g cluttry
26
-
27
- # Or clone and link
28
- git clone https://github.com/your-username/cluttry.git
29
- cd cluttry
30
- bun install
31
- bun link
32
- ```
33
-
34
- ### Using npm
7
+ ## 60-Second Quickstart
35
8
 
36
9
  ```bash
37
- # Install globally with npm
10
+ # Install
38
11
  npm install -g cluttry
39
12
 
40
- # Or clone and link
41
- git clone https://github.com/your-username/cluttry.git
42
- cd cluttry
43
- npm install
44
- npm link
45
- ```
46
-
47
- **Requirements:** Bun 1.0+ or Node.js 18+, Git 2.5+
48
-
49
- ## Quick Start
50
-
51
- ```bash
52
- # Initialize cry in your repository
13
+ # Initialize in your repo
53
14
  cd your-repo
54
15
  cry init
55
16
 
56
- # Spawn a new worktree for a feature branch
57
- cry spawn feature-auth --new
58
-
59
- # List all worktrees
60
- cry list
61
-
62
- # Remove a worktree when done
63
- cry rm feature-auth --with-branch
17
+ # One command: create worktree launch Claude → finish when done
18
+ cry feat-login claude --finish-on-exit
64
19
  ```
65
20
 
66
- ## Commands
21
+ That's it. When Claude exits, you'll see a menu to commit, create a PR, and clean up.
67
22
 
68
- ### `cry init`
23
+ ## The Lifecycle
69
24
 
70
- Initialize cry configuration in your repository.
25
+ Every AI coding session follows four phases:
71
26
 
72
- ```bash
73
- cry init [--force]
74
27
  ```
75
-
76
- Creates:
77
- - `.cry.json` — tracked config with defaults
78
- - `.cry.local.json` gitignored local overrides
79
- - Updates `.gitignore` to ignore local config and `.worktrees/`
80
-
81
- ### `cry spawn <branch>`
82
-
83
- Create a worktree for a branch with automatic secrets handling.
84
-
85
- ```bash
86
- cry spawn <branch> [options]
87
-
88
- Options:
89
- -n, --new Create a new branch
90
- -p, --path <dir> Explicit worktree path
91
- -b, --base <dir> Base directory for worktrees
92
- -m, --mode <mode> Secret handling: copy, symlink, or none (default: copy)
93
- -r, --run <cmd> Command to run after creation
94
- -a, --agent <agent> Launch agent: claude or none (default: none)
28
+ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
29
+ │ START │ → │ WORK │ → │ FINISH │ → │ CLEANUP │
30
+ └─────────┘ └─────────┘ └─────────┘ └─────────┘
31
+ cry spawn (agent works) cry finish (automatic)
95
32
  ```
96
33
 
97
- **Examples:**
34
+ ### 1. Start
98
35
 
99
- ```bash
100
- # Create worktree for existing branch
101
- cry spawn feature-auth
102
-
103
- # Create new branch and worktree
104
- cry spawn feature-oauth --new
36
+ Create an isolated worktree with secrets copied:
105
37
 
106
- # Spawn with npm install and launch Claude
107
- cry spawn feature-api --new --run "npm install" --agent claude
38
+ ```bash
39
+ # Shorthand (recommended)
40
+ cry feat-auth claude
108
41
 
109
- # Use symlinks instead of copying secrets
110
- cry spawn bugfix-123 --mode symlink
42
+ # Explicit
43
+ cry spawn feat-auth --new --agent claude
111
44
 
112
- # Custom worktree location
113
- cry spawn hotfix --path ~/worktrees/myrepo-hotfix
45
+ # Full lifecycle in one command
46
+ cry feat-auth claude --finish-on-exit
114
47
  ```
115
48
 
116
- ### `cry list`
49
+ ### 2. Work
117
50
 
118
- List all worktrees with their status.
51
+ Your AI agent works in the isolated worktree. Each worktree has:
52
+ - Its own branch
53
+ - Copy of your `.env` and secret files
54
+ - Independent git state
119
55
 
120
- ```bash
121
- cry list [--json]
122
- ```
123
-
124
- Shows: branch name, commit SHA, dirty status, last modified time, and path.
56
+ Run multiple sessions in parallel—each in its own terminal.
125
57
 
126
- ### `cry open <branch-or-path>`
58
+ ### 3. Finish (PR-first)
127
59
 
128
- Navigate to or run a command in a worktree.
60
+ From inside the worktree:
129
61
 
130
62
  ```bash
131
- cry open <branch-or-path> [--cmd <cmd>]
63
+ cry finish
132
64
  ```
133
65
 
134
- **Examples:**
66
+ Interactive flow:
67
+ 1. Shows session summary (branch, commits, diff stats)
68
+ 2. If dirty: offers to commit (with suggested message from branch name)
69
+ 3. Pushes branch and creates PR via `gh` CLI
70
+ 4. Offers cleanup prompt
135
71
 
72
+ Non-interactive:
136
73
  ```bash
137
- # Show path and cd instructions
138
- cry open feature-auth
139
-
140
- # Run a command in the worktree
141
- cry open feature-auth --cmd "npm test"
142
-
143
- # Open in VS Code
144
- cry open feature-auth --cmd "code ."
74
+ cry finish -m "Add user authentication" --cleanup
145
75
  ```
146
76
 
147
- ### `cry rm <branch-or-path>`
77
+ ### 4. Cleanup
148
78
 
149
- Remove a worktree safely.
79
+ Handled automatically by `cry finish`, or manually:
150
80
 
151
81
  ```bash
152
- cry rm <branch-or-path> [options]
153
-
154
- Options:
155
- -b, --with-branch Also delete the branch
156
- -f, --force Force removal even if dirty
157
- -y, --yes Skip confirmation prompts
82
+ cry rm feat-auth --with-branch
158
83
  ```
159
84
 
160
- **Examples:**
85
+ ## Installation
161
86
 
162
87
  ```bash
163
- # Remove worktree only
164
- cry rm feature-auth
165
-
166
- # Remove worktree and delete branch
167
- cry rm feature-auth --with-branch
168
-
169
- # Force remove dirty worktree
170
- cry rm feature-auth --force --yes
88
+ npm install -g cluttry
89
+ # or
90
+ bun add -g cluttry
171
91
  ```
172
92
 
173
- ### `cry prune`
93
+ **Requirements:** Node.js 18+ or Bun 1.0+, Git 2.5+
174
94
 
175
- Clean up stale worktree references.
95
+ ### Shell Completions
176
96
 
177
97
  ```bash
178
- cry prune
179
- ```
180
-
181
- Runs `git worktree prune` and shows what was cleaned.
182
-
183
- ### `cry doctor`
98
+ # Fish
99
+ cry completions fish > ~/.config/fish/completions/cry.fish
184
100
 
185
- Check your cry configuration for issues.
101
+ # Bash
102
+ cry completions bash >> ~/.bashrc
186
103
 
187
- ```bash
188
- cry doctor
104
+ # Zsh
105
+ cry completions zsh > ~/.zsh/completions/_cry
189
106
  ```
190
107
 
191
- Checks:
192
- - Config file exists
193
- - Local config is gitignored
194
- - `.worktrees/` is gitignored
195
- - Include files are safely gitignored
196
- - Agent command is available
197
-
198
108
  ## Configuration
199
109
 
200
- ### `.cry.json` (tracked)
110
+ After `cry init`, edit `.cry.json`:
201
111
 
202
112
  ```json
203
113
  {
114
+ "include": [".env", ".env.*", "config/secrets.json"],
204
115
  "defaultMode": "copy",
205
- "include": [".env", ".env.*", ".env.local", "config/secrets/*.json"],
206
- "worktreeBaseDir": null,
207
- "hooks": {
208
- "postCreate": ["npm install"]
209
- },
116
+ "hooks": { "postCreate": ["npm install"] },
210
117
  "agentCommand": "claude"
211
118
  }
212
119
  ```
213
120
 
214
- | Option | Description |
215
- |--------|-------------|
216
- | `defaultMode` | How to handle secrets: `copy`, `symlink`, or `none` |
217
- | `include` | Glob patterns for files to copy/symlink |
218
- | `worktreeBaseDir` | Base directory for worktrees (default: `.worktrees/`) |
219
- | `hooks.postCreate` | Commands to run after spawning |
220
- | `agentCommand` | Command to launch AI agent |
221
-
222
- ### `.cry.local.json` (gitignored)
223
-
224
- Machine-specific overrides:
225
-
226
- ```json
227
- {
228
- "worktreeBaseDir": "/home/user/worktrees",
229
- "include": ["config/local-secrets.json"],
230
- "hooks": {
231
- "postCreate": ["npm install", "./setup-dev.sh"]
232
- },
233
- "agentCommand": "cursor"
234
- }
235
- ```
121
+ | Key | Description |
122
+ |-----|-------------|
123
+ | `include` | Glob patterns for files to copy to worktrees |
124
+ | `defaultMode` | `copy`, `symlink`, or `none` |
125
+ | `hooks.postCreate` | Commands to run after spawn |
126
+ | `agentCommand` | Agent CLI command (default: `claude`) |
127
+ | `editorCommand` | Editor command (default: `code`) |
236
128
 
237
- Local config merges with tracked config:
238
- - `include` arrays are concatenated
239
- - `hooks.postCreate` arrays are concatenated
240
- - Other values override
129
+ Machine-specific overrides go in `.cry.local.json` (gitignored).
241
130
 
242
131
  ## Security Model
243
132
 
244
- **cry is safe by default.** It enforces strict rules about which files can be copied or symlinked:
133
+ **Tracked files are never copied.** This is enforced, not optional.
245
134
 
246
- ### Rule 1: Never Copy Tracked Files
135
+ For a file to be copied to a worktree, it must pass both checks:
136
+ 1. **Not tracked** by git (`git ls-files` returns nothing)
137
+ 2. **Ignored** by git (listed in `.gitignore`)
247
138
 
248
- Files that are tracked by git are **never** copied or symlinked. This prevents accidentally exposing source code or committing secrets that should stay local.
139
+ This means:
140
+ - Your `.env` files copy automatically (they're gitignored)
141
+ - Your source code stays in git (tracked files can't be copied)
142
+ - Accidentally tracked secrets won't propagate
143
+
144
+ ### Verify before spawning
249
145
 
250
146
  ```bash
251
- # Checked with: git ls-files --error-unmatch <file>
252
- # If file is tracked → REFUSED
147
+ # See exactly what will be copied
148
+ cry explain-copy
149
+
150
+ # Preview spawn without changes
151
+ cry spawn feat-test --new --dry-run
253
152
  ```
254
153
 
255
- ### Rule 2: Only Copy Ignored Files
154
+ ### Copy vs Symlink
256
155
 
257
- Files must be explicitly ignored by git (in `.gitignore`) to be eligible for copy/symlink.
156
+ | Mode | Behavior |
157
+ |------|----------|
158
+ | `copy` | Independent copies. Safe default. |
159
+ | `symlink` | Linked to original. Changes sync everywhere. |
160
+ | `none` | Nothing copied. Set up secrets manually. |
258
161
 
259
- ```bash
260
- # Checked with: git check-ignore -q <file>
261
- # If file is NOT ignored → REFUSED
262
- ```
162
+ ## Commands
263
163
 
264
- ### Implications
164
+ ### Session Lifecycle
265
165
 
266
- - Your `.env` files must be in `.gitignore` ✓
267
- - Your OAuth JSON files must be in `.gitignore` ✓
268
- - Source files can never be in `include` patterns ✗
166
+ | Command | Purpose |
167
+ |---------|---------|
168
+ | `cry spawn <branch>` | Create worktree |
169
+ | `cry finish` | Commit → PR → cleanup |
170
+ | `cry rm <branch>` | Remove worktree |
269
171
 
270
- ### Copy vs Symlink Tradeoffs
172
+ ### Navigation
271
173
 
272
- | Mode | Pros | Cons |
273
- |------|------|------|
274
- | `copy` | Independent copies, safe if original changes | Takes disk space, copies can drift |
275
- | `symlink` | Always in sync, saves space | Changes affect all worktrees |
276
- | `none` | No secrets copied | Must set up secrets manually |
174
+ | Command | Purpose |
175
+ |---------|---------|
176
+ | `cry list` | List all worktrees |
177
+ | `cry open <branch>` | Open in agent/editor |
178
+ | `cry resume <branch>` | Resume session |
277
179
 
278
- **Recommendation:** Use `copy` (default) for most cases. Use `symlink` if you frequently update secrets and want all worktrees to stay in sync.
180
+ ### Maintenance
279
181
 
280
- ## Using with AI Agents
182
+ | Command | Purpose |
183
+ |---------|---------|
184
+ | `cry gc` | Clean stale sessions |
185
+ | `cry prune` | Clean git worktree refs |
186
+ | `cry doctor` | Check configuration |
281
187
 
282
- ### Recommended Pattern
188
+ ## Key Flags
283
189
 
284
- 1. **Initialize once per repo:**
285
- ```bash
286
- cry init
287
- ```
190
+ ### `cry spawn`
288
191
 
289
- 2. **Configure your secrets:**
290
- Edit `.cry.json` to include your secret files:
291
- ```json
292
- {
293
- "include": [".env", ".env.local", "config/oauth*.json"]
294
- }
295
- ```
192
+ ```
193
+ -n, --new Create new branch
194
+ -a, --agent <agent> Launch agent (claude, cursor, none)
195
+ --finish-on-exit Show finish menu when agent exits
196
+ --base-branch <branch> PR target branch
197
+ -m, --mode <mode> Secret handling (copy, symlink, none)
198
+ -r, --run <cmd> Run command after spawn
199
+ --dry-run Preview without creating
200
+ ```
296
201
 
297
- 3. **Spawn a worktree for each task:**
298
- ```bash
299
- cry spawn fix-auth-bug --new --run "npm install" --agent claude
300
- ```
202
+ ### `cry finish`
301
203
 
302
- 4. **Work with your AI agent in the worktree**
204
+ ```
205
+ -m, --message <msg> Commit with message (non-interactive)
206
+ --cleanup Auto-cleanup after PR
207
+ --skip-commit Skip commit step
208
+ --non-interactive Never prompt
209
+ --dry-run Preview without executing
210
+ ```
303
211
 
304
- 5. **Clean up when done:**
305
- ```bash
306
- cry rm fix-auth-bug --with-branch
307
- ```
212
+ ### `cry rm`
308
213
 
309
- ### Denying AI Access to Secrets
214
+ ```
215
+ -b, --with-branch Also delete the branch
216
+ -f, --force Force remove dirty worktree
217
+ -y, --yes Skip confirmation
218
+ ```
310
219
 
311
- If you want to prevent AI agents from reading your secret files:
220
+ ## FAQ
312
221
 
313
- **For Claude Code:** Add to your `.clauderc`:
314
- ```json
315
- {
316
- "deny": [".env", ".env.*", "config/secrets/**"]
317
- }
318
- ```
222
+ ### Why not just `git worktree`?
319
223
 
320
- **For other agents:** Check their documentation for file access controls.
224
+ | Task | git worktree | cry |
225
+ |------|--------------|-----|
226
+ | Create worktree | `git worktree add -b feat ../feat` | `cry feat` |
227
+ | Copy secrets | Manual copy | Automatic |
228
+ | Run setup | `cd ../feat && npm install` | `--run "npm install"` |
229
+ | Launch agent | `cd ../feat && claude` | `--agent claude` |
230
+ | Create PR | Switch context, push, open browser | `cry finish` |
231
+ | Cleanup | `git worktree remove`, `git branch -d` | `cry rm --with-branch` |
321
232
 
322
- ### Multiple Parallel Sessions
233
+ cry handles the lifecycle. git worktree is just step 1.
323
234
 
324
- Run multiple agents on different features simultaneously:
235
+ ### Can I use this without AI agents?
236
+
237
+ Yes. Skip `--agent` and use worktrees for any parallel work:
325
238
 
326
239
  ```bash
327
- # Terminal 1
328
- cry spawn feature-auth --new --agent claude
240
+ cry hotfix-123
241
+ # ... work manually ...
242
+ cry finish
243
+ ```
329
244
 
330
- # Terminal 2
331
- cry spawn feature-payments --new --agent claude
245
+ ### What if `gh` isn't installed?
332
246
 
333
- # Terminal 3
334
- cry spawn bugfix-123 --agent claude
335
- ```
247
+ `cry finish` prints manual PR instructions and exits cleanly (exit 0). Install `gh` for automatic PR creation:
336
248
 
337
- Each agent works in an isolated worktree with its own copy of secrets.
249
+ ```bash
250
+ brew install gh && gh auth login
251
+ ```
338
252
 
339
- ## Project Structure
253
+ ### How do I prevent AI from reading secrets?
340
254
 
255
+ For Claude Code, add to `.clauderc`:
256
+ ```json
257
+ { "deny": [".env", ".env.*"] }
341
258
  ```
342
- .worktrees/ # Default worktree location (gitignored)
343
- ├── feature-auth/ # Worktree for feature-auth branch
344
- ├── feature-payments/ # Worktree for feature-payments branch
345
- └── bugfix-123/ # Worktree for bugfix-123 branch
346
259
 
347
- .cry.json # Tracked config
348
- .cry.local.json # Local overrides (gitignored)
260
+ ### Can I change the worktree location?
261
+
262
+ Default is `.worktrees/` in your repo. Override:
263
+
264
+ ```bash
265
+ # Per-spawn
266
+ cry spawn feat --path ~/worktrees/myrepo-feat
267
+
268
+ # Globally in .cry.local.json
269
+ { "worktreeBaseDir": "/home/user/worktrees" }
349
270
  ```
350
271
 
351
272
  ## Troubleshooting
352
273
 
353
274
  ### "Not a git repository"
354
275
 
355
- Run cry commands from within a git repository.
276
+ Run cry from inside a git repo.
277
+
278
+ ### "Destination already exists"
356
279
 
357
- ### "Worktree already exists for branch"
280
+ The worktree path exists. Remove it or use `--path`:
358
281
 
359
- A worktree already exists for that branch. Remove it first:
360
282
  ```bash
361
- cry rm <branch>
283
+ rm -rf .worktrees/feat-auth
284
+ # or
285
+ cry spawn feat-auth --path .worktrees/feat-auth-v2
362
286
  ```
363
287
 
364
- ### "Destination already exists"
288
+ ### "A worktree already exists for branch"
289
+
290
+ Remove the existing worktree first:
365
291
 
366
- The target directory exists. Either remove it or specify a different path:
367
292
  ```bash
368
- cry spawn feature --path ./different-path
293
+ cry rm feat-auth
369
294
  ```
370
295
 
371
- ### "File is tracked by git"
296
+ ### "File is tracked by git" / "File is not ignored"
297
+
298
+ Files in `include` must be gitignored and untracked:
372
299
 
373
- A file in your `include` patterns is tracked by git. Remove it from tracking:
374
300
  ```bash
375
- git rm --cached <file>
376
- echo "<file>" >> .gitignore
301
+ # Add to .gitignore
302
+ echo "secrets.json" >> .gitignore
303
+
304
+ # If already tracked, untrack it
305
+ git rm --cached secrets.json
377
306
  ```
378
307
 
379
- ### "File is not ignored by git"
308
+ ### "Worktree has uncommitted changes"
309
+
310
+ Commit or discard changes before removing:
380
311
 
381
- A file in your `include` patterns isn't in `.gitignore`. Add it:
382
312
  ```bash
383
- echo "<file>" >> .gitignore
313
+ cry rm feat-auth --force # discards changes
384
314
  ```
385
315
 
386
316
  ### Agent command not found
387
317
 
388
- Install the AI agent CLI or update `agentCommand` in your config:
318
+ Install the agent CLI:
319
+
389
320
  ```bash
390
- # For Claude
321
+ # Claude
391
322
  npm install -g @anthropic-ai/claude-code
392
323
 
393
- # Or override in .cry.local.json
394
- {
395
- "agentCommand": "your-agent-command"
396
- }
324
+ # Or set custom command
325
+ echo '{"agentCommand": "your-agent"}' > .cry.local.json
326
+ ```
327
+
328
+ ### PR creation failed
329
+
330
+ Check GitHub CLI auth:
331
+
332
+ ```bash
333
+ gh auth status
334
+ gh auth login # if needed
397
335
  ```
398
336
 
399
337
  ## Development
400
338
 
401
339
  ```bash
402
- # Install dependencies
403
340
  npm install
404
-
405
- # Build
406
341
  npm run build
407
-
408
- # Run tests
409
342
  npm test
410
-
411
- # Watch mode
412
- npm run dev
413
343
  ```
414
344
 
415
- ## Tech Stack
416
-
417
- - **Language:** TypeScript (Node.js)
418
- - **CLI Framework:** Commander.js
419
- - **Testing:** Vitest
420
- - **Dependencies:** Minimal (commander, glob)
421
-
422
- ### Why TypeScript/Node.js?
423
-
424
- 1. **Accessible:** Most developers working with web projects have Node.js installed
425
- 2. **Cross-platform:** Works on macOS, Linux, and Windows
426
- 3. **Contribution-friendly:** TypeScript is widely known and well-typed
427
- 4. **Rich ecosystem:** Excellent CLI tooling available
428
-
429
345
  ## License
430
346
 
431
347
  MIT
432
-
433
- ## Contributing
434
-
435
- Contributions welcome! Please:
436
-
437
- 1. Fork the repository
438
- 2. Create a feature branch
439
- 3. Write tests for new functionality
440
- 4. Submit a pull request
441
-
442
- ## Acknowledgments
443
-
444
- Inspired by the need to run parallel AI coding sessions efficiently. Built for vibecoders everywhere.
@@ -0,0 +1,16 @@
1
+ /**
2
+ * cry completions command
3
+ *
4
+ * Generate shell completions for bash, zsh, and fish.
5
+ */
6
+ type ShellType = 'bash' | 'zsh' | 'fish';
7
+ interface CompletionsOptions {
8
+ shell?: ShellType;
9
+ }
10
+ export declare function completions(shell: string | undefined, options: CompletionsOptions): Promise<void>;
11
+ /**
12
+ * Get list of subcommands (for testing)
13
+ */
14
+ export declare function getSubcommands(): string[];
15
+ export {};
16
+ //# sourceMappingURL=completions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"completions.d.ts","sourceRoot":"","sources":["../../src/commands/completions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,KAAK,SAAS,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;AAEzC,UAAU,kBAAkB;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAQD,wBAAsB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgCvG;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAEzC"}