cluttry 1.0.1 → 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 (94) 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 +16 -1
  23. package/dist/commands/open.d.ts.map +1 -1
  24. package/dist/commands/open.js +104 -19
  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/shell.d.ts +11 -0
  34. package/dist/commands/shell.d.ts.map +1 -0
  35. package/dist/commands/shell.js +89 -0
  36. package/dist/commands/shell.js.map +1 -0
  37. package/dist/commands/spawn.d.ts +3 -0
  38. package/dist/commands/spawn.d.ts.map +1 -1
  39. package/dist/commands/spawn.js +182 -19
  40. package/dist/commands/spawn.js.map +1 -1
  41. package/dist/index.d.ts +4 -0
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +208 -9
  44. package/dist/index.js.map +1 -1
  45. package/dist/lib/completions.d.ts +35 -0
  46. package/dist/lib/completions.d.ts.map +1 -0
  47. package/dist/lib/completions.js +368 -0
  48. package/dist/lib/completions.js.map +1 -0
  49. package/dist/lib/config.d.ts.map +1 -1
  50. package/dist/lib/config.js +2 -0
  51. package/dist/lib/config.js.map +1 -1
  52. package/dist/lib/errors.d.ts +43 -0
  53. package/dist/lib/errors.d.ts.map +1 -0
  54. package/dist/lib/errors.js +251 -0
  55. package/dist/lib/errors.js.map +1 -0
  56. package/dist/lib/git.d.ts +17 -0
  57. package/dist/lib/git.d.ts.map +1 -1
  58. package/dist/lib/git.js +78 -10
  59. package/dist/lib/git.js.map +1 -1
  60. package/dist/lib/safety.d.ts +79 -0
  61. package/dist/lib/safety.d.ts.map +1 -0
  62. package/dist/lib/safety.js +133 -0
  63. package/dist/lib/safety.js.map +1 -0
  64. package/dist/lib/secrets.d.ts +29 -0
  65. package/dist/lib/secrets.d.ts.map +1 -1
  66. package/dist/lib/secrets.js +115 -0
  67. package/dist/lib/secrets.js.map +1 -1
  68. package/dist/lib/session.d.ts +93 -0
  69. package/dist/lib/session.d.ts.map +1 -0
  70. package/dist/lib/session.js +254 -0
  71. package/dist/lib/session.js.map +1 -0
  72. package/dist/lib/types.d.ts +6 -1
  73. package/dist/lib/types.d.ts.map +1 -1
  74. package/package.json +1 -1
  75. package/.claude/settings.local.json +0 -7
  76. package/src/commands/doctor.ts +0 -222
  77. package/src/commands/init.ts +0 -120
  78. package/src/commands/list.ts +0 -133
  79. package/src/commands/open.ts +0 -70
  80. package/src/commands/prune.ts +0 -36
  81. package/src/commands/rm.ts +0 -125
  82. package/src/commands/spawn.ts +0 -169
  83. package/src/index.ts +0 -112
  84. package/src/lib/config.ts +0 -120
  85. package/src/lib/git.ts +0 -243
  86. package/src/lib/output.ts +0 -102
  87. package/src/lib/paths.ts +0 -108
  88. package/src/lib/secrets.ts +0 -193
  89. package/src/lib/types.ts +0 -69
  90. package/tests/config.test.ts +0 -102
  91. package/tests/paths.test.ts +0 -155
  92. package/tests/secrets.test.ts +0 -150
  93. package/tsconfig.json +0 -20
  94. package/vitest.config.ts +0 -15
package/dist/index.js CHANGED
@@ -3,6 +3,10 @@
3
3
  * cry - Git worktrees made painless for vibecoders
4
4
  *
5
5
  * A CLI tool for managing git worktrees with parallel AI-agent sessions in mind.
6
+ *
7
+ * Shorthand syntax:
8
+ * cry <name> → cry spawn <name> --new
9
+ * cry <name> claude → cry spawn <name> --new --agent claude
6
10
  */
7
11
  import { Command } from 'commander';
8
12
  import { init } from './commands/init.js';
@@ -12,11 +16,112 @@ import { open } from './commands/open.js';
12
16
  import { rm } from './commands/rm.js';
13
17
  import { prune } from './commands/prune.js';
14
18
  import { doctor } from './commands/doctor.js';
19
+ import { shell } from './commands/shell.js';
20
+ import { finish } from './commands/finish.js';
21
+ import { explainCopy } from './commands/explain-copy.js';
22
+ import { resume } from './commands/resume.js';
23
+ import { gc } from './commands/gc.js';
24
+ import { completions } from './commands/completions.js';
25
+ // Known subcommands - shorthand parsing must not interfere with these
26
+ const SUBCOMMANDS = new Set([
27
+ 'init',
28
+ 'spawn',
29
+ 'list', 'ls',
30
+ 'open',
31
+ 'rm', 'remove',
32
+ 'prune',
33
+ 'doctor',
34
+ 'explain-copy',
35
+ 'shell',
36
+ 'finish',
37
+ 'resume',
38
+ 'gc',
39
+ 'completions',
40
+ 'help',
41
+ ]);
42
+ // Known agent values for shorthand parsing
43
+ const KNOWN_AGENTS = new Set(['claude', 'cursor', 'none']);
44
+ /**
45
+ * Check if an argument looks like an option (starts with -)
46
+ */
47
+ function isOption(arg) {
48
+ return arg.startsWith('-');
49
+ }
50
+ /**
51
+ * Transform shorthand syntax into explicit spawn command
52
+ *
53
+ * cry feat-auth → cry spawn feat-auth --new
54
+ * cry feat-auth claude → cry spawn feat-auth --new --agent claude
55
+ */
56
+ function transformShorthand(args) {
57
+ // args[0] is 'node', args[1] is script path
58
+ // Real arguments start at index 2
59
+ const realArgs = args.slice(2);
60
+ // No arguments or first arg is an option → pass through
61
+ if (realArgs.length === 0 || isOption(realArgs[0])) {
62
+ return args;
63
+ }
64
+ const firstArg = realArgs[0];
65
+ // First arg is a known subcommand → pass through
66
+ if (SUBCOMMANDS.has(firstArg)) {
67
+ return args;
68
+ }
69
+ // First arg looks like a branch name → shorthand mode
70
+ const branchName = firstArg;
71
+ const remainingArgs = realArgs.slice(1);
72
+ // Build new args array
73
+ const newArgs = [args[0], args[1], 'spawn', branchName, '--new'];
74
+ // Check if second arg is a known agent
75
+ if (remainingArgs.length > 0 && KNOWN_AGENTS.has(remainingArgs[0])) {
76
+ const agent = remainingArgs[0];
77
+ newArgs.push('--agent', agent);
78
+ // Pass through any remaining args (options)
79
+ newArgs.push(...remainingArgs.slice(1));
80
+ }
81
+ else {
82
+ // Pass through all remaining args
83
+ newArgs.push(...remainingArgs);
84
+ }
85
+ return newArgs;
86
+ }
87
+ // Transform arguments before Commander parses them
88
+ const transformedArgs = transformShorthand(process.argv);
15
89
  const program = new Command();
16
90
  program
17
91
  .name('cry')
18
- .description('Git worktrees made painless for vibecoders running parallel AI-agent sessions')
19
- .version('1.0.0');
92
+ .description(`Git worktrees made painless for vibecoders running parallel AI-agent sessions
93
+
94
+ Shorthand syntax:
95
+ cry <name> Create worktree for new branch <name>
96
+ cry <name> claude Create worktree and launch Claude agent
97
+
98
+ Quick start:
99
+ cry init # Initialize in repo
100
+ cry feat-auth # Create worktree for new branch
101
+ cry feat-auth claude # Create and launch Claude agent
102
+
103
+ Workflow examples:
104
+ cry spawn feat-auth --new # Explicit: create new branch worktree
105
+ cry list # List all worktrees
106
+ cry open feat-auth # Open worktree in agent/editor
107
+ cry resume feat-auth # Resume session by name
108
+ cry finish # Commit, push, create PR, cleanup
109
+ cry rm feat-auth # Remove worktree
110
+
111
+ Finish flow (run from worktree):
112
+ cry finish # Interactive: commit → PR → cleanup
113
+ cry finish --dry-run # Preview what would happen
114
+ cry finish -m "Add auth" # Commit with message, create PR
115
+ cry finish --cleanup # Auto-cleanup after PR
116
+
117
+ Safety notes:
118
+ • Never auto-merges PRs
119
+ • Never deletes without confirmation (unless --yes)
120
+ • Only copies gitignored files to worktrees (secrets safety)
121
+
122
+ Shell completions:
123
+ cry completions fish > ~/.config/fish/completions/cry.fish`)
124
+ .version('1.5.0');
20
125
  // cry init
21
126
  program
22
127
  .command('init')
@@ -32,9 +137,12 @@ program
32
137
  .option('-n, --new', 'Create a new branch (equivalent to git worktree add -b)')
33
138
  .option('-p, --path <dir>', 'Explicit path for the worktree')
34
139
  .option('-b, --base <dir>', 'Base directory for worktrees')
140
+ .option('--base-branch <branch>', 'Base branch for PRs (default: current branch)')
35
141
  .option('-m, --mode <mode>', 'Secret handling mode: copy, symlink, or none', 'copy')
36
142
  .option('-r, --run <cmd>', 'Command to run after creating worktree')
37
143
  .option('-a, --agent <agent>', 'Launch agent after setup: claude or none', 'none')
144
+ .option('--finish-on-exit', 'After agent exits, show finish menu (commit, PR, cleanup)')
145
+ .option('--dry-run', 'Show what would happen without creating the worktree')
38
146
  .action(async (branch, options) => {
39
147
  const mode = options.mode;
40
148
  if (!['copy', 'symlink', 'none'].includes(mode)) {
@@ -45,9 +153,12 @@ program
45
153
  new: options.new,
46
154
  path: options.path,
47
155
  base: options.base,
156
+ baseBranch: options.baseBranch,
48
157
  mode,
49
158
  run: options.run,
50
159
  agent: options.agent,
160
+ finishOnExit: options.finishOnExit,
161
+ dryRun: options.dryRun,
51
162
  });
52
163
  });
53
164
  // cry list
@@ -59,13 +170,21 @@ program
59
170
  .action(async (options) => {
60
171
  await list({ json: options.json });
61
172
  });
62
- // cry open <branch-or-path>
173
+ // cry open [branch-or-path]
63
174
  program
64
- .command('open <branch-or-path>')
65
- .description('Open or navigate to a worktree by branch name or path')
66
- .option('-c, --cmd <cmd>', 'Command to execute in the worktree directory')
175
+ .command('open [branch-or-path]')
176
+ .description('Open a worktree in agent (Claude) or editor (VS Code)')
177
+ .option('-c, --cmd <cmd>', 'Custom command to execute in the worktree directory')
178
+ .option('-p, --path-only', 'Only print the path (for scripting)')
179
+ .option('-a, --agent', 'Open in agent (Claude Code)')
180
+ .option('-e, --editor', 'Open in editor (VS Code)')
67
181
  .action(async (branchOrPath, options) => {
68
- await open(branchOrPath, { cmd: options.cmd });
182
+ await open(branchOrPath, {
183
+ cmd: options.cmd,
184
+ pathOnly: options.pathOnly,
185
+ agent: options.agent,
186
+ editor: options.editor,
187
+ });
69
188
  });
70
189
  // cry rm <branch-or-path>
71
190
  program
@@ -96,6 +215,86 @@ program
96
215
  .action(async () => {
97
216
  await doctor();
98
217
  });
99
- // Parse and execute
100
- program.parse();
218
+ // cry explain-copy
219
+ program
220
+ .command('explain-copy')
221
+ .description('Explain which files will be copied/symlinked and which are blocked')
222
+ .option('-j, --json', 'Output as JSON')
223
+ .action(async (options) => {
224
+ await explainCopy({ json: options.json });
225
+ });
226
+ // cry shell
227
+ program
228
+ .command('shell')
229
+ .description('Output shell integration code for crycd navigation function')
230
+ .option('-s, --shell <shell>', 'Shell type: bash, zsh, or fish (auto-detected)')
231
+ .action(async (options) => {
232
+ await shell({ shell: options.shell });
233
+ });
234
+ // cry finish
235
+ program
236
+ .command('finish')
237
+ .description('Complete session: show summary, optionally create PR, and cleanup')
238
+ .option('-j, --json', 'Output as JSON (summary only, no actions)')
239
+ .option('-m, --message <msg>', 'Commit message (stages all, commits, non-interactive)')
240
+ .option('--skip-commit', 'Skip commit step entirely (still safe)')
241
+ .option('--dry-run', 'Show what would happen without executing')
242
+ .option('--pr', 'Force PR creation path')
243
+ .option('--cleanup', 'Auto-cleanup after successful PR (skip prompt)')
244
+ .option('--skip-cleanup', 'Skip cleanup prompt entirely')
245
+ .option('--non-interactive', 'Never prompt; errors on dirty unless --allow-dirty')
246
+ .option('--allow-dirty', 'Allow proceeding with dirty working tree in non-interactive mode')
247
+ .option('--delete-branch', 'Delete branch during cleanup (with --cleanup)')
248
+ .action(async (options) => {
249
+ await finish({
250
+ json: options.json,
251
+ message: options.message,
252
+ skipCommit: options.skipCommit,
253
+ dryRun: options.dryRun,
254
+ pr: options.pr,
255
+ cleanup: options.cleanup,
256
+ noCleanup: options.skipCleanup,
257
+ nonInteractive: options.nonInteractive,
258
+ allowDirty: options.allowDirty,
259
+ deleteBranch: options.deleteBranch,
260
+ });
261
+ });
262
+ // cry resume <nameOrId>
263
+ program
264
+ .command('resume <nameOrId>')
265
+ .description('Resume an existing session by branch name or session ID')
266
+ .option('-a, --agent <agent>', 'Launch agent in the session (e.g., claude)')
267
+ .option('--cd', 'Print cd command for shell copy/paste')
268
+ .action(async (nameOrId, options) => {
269
+ await resume(nameOrId, {
270
+ agent: options.agent,
271
+ cd: options.cd,
272
+ });
273
+ });
274
+ // cry gc
275
+ program
276
+ .command('gc')
277
+ .description('Clean up stale session manifests and git worktree references')
278
+ .option('--dry-run', 'Show what would be cleaned without making changes')
279
+ .option('-y, --yes', 'Skip confirmation prompts')
280
+ .option('--manifests-only', 'Only remove stale manifests, skip git worktree prune')
281
+ .action(async (options) => {
282
+ await gc({
283
+ dryRun: options.dryRun,
284
+ yes: options.yes,
285
+ manifestsOnly: options.manifestsOnly,
286
+ });
287
+ });
288
+ // cry completions [shell]
289
+ program
290
+ .command('completions [shell]')
291
+ .description('Generate shell completions (bash, zsh, fish)')
292
+ .option('-s, --shell <shell>', 'Shell type (bash, zsh, fish)')
293
+ .action(async (shell, options) => {
294
+ await completions(shell, {
295
+ shell: options.shell,
296
+ });
297
+ });
298
+ // Parse with transformed arguments
299
+ program.parse(transformedArgs);
101
300
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EA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CAAC,qBAAqB,EAAE,4CAA4C,CAAC;KAC3E,MAAM,CAAC,MAAM,EAAE,uCAAuC,CAAC;KACvD,MAAM,CAAC,KAAK,EAAE,QAAgB,EAAE,OAAO,EAAE,EAAE;IAC1C,MAAM,MAAM,CAAC,QAAQ,EAAE;QACrB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,EAAE,EAAE,OAAO,CAAC,EAAE;KACf,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEL,SAAS;AACT,OAAO;KACJ,OAAO,CAAC,IAAI,CAAC;KACb,WAAW,CAAC,8DAA8D,CAAC;KAC3E,MAAM,CAAC,WAAW,EAAE,mDAAmD,CAAC;KACxE,MAAM,CAAC,WAAW,EAAE,2BAA2B,CAAC;KAChD,MAAM,CAAC,kBAAkB,EAAE,sDAAsD,CAAC;KAClF,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;IACxB,MAAM,EAAE,CAAC;QACP,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,aAAa,EAAE,OAAO,CAAC,aAAa;KACrC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEL,0BAA0B;AAC1B,OAAO;KACJ,OAAO,CAAC,qBAAqB,CAAC;KAC9B,WAAW,CAAC,8CAA8C,CAAC;KAC3D,MAAM,CAAC,qBAAqB,EAAE,8BAA8B,CAAC;KAC7D,MAAM,CAAC,KAAK,EAAE,KAAyB,EAAE,OAAO,EAAE,EAAE;IACnD,MAAM,WAAW,CAAC,KAAK,EAAE;QACvB,KAAK,EAAE,OAAO,CAAC,KAAK;KACrB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEL,mCAAmC;AACnC,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Shell completion generators for cry CLI
3
+ *
4
+ * Generates completion scripts for bash, zsh, and fish shells.
5
+ */
6
+ export declare const COMMANDS: {
7
+ name: string;
8
+ description: string;
9
+ }[];
10
+ export declare const COMMAND_OPTIONS: Record<string, Array<{
11
+ flag: string;
12
+ short?: string;
13
+ description: string;
14
+ }>>;
15
+ /**
16
+ * Generate Fish shell completions
17
+ */
18
+ export declare function generateFishCompletions(): string;
19
+ /**
20
+ * Generate Bash shell completions
21
+ */
22
+ export declare function generateBashCompletions(): string;
23
+ /**
24
+ * Generate Zsh shell completions
25
+ */
26
+ export declare function generateZshCompletions(): string;
27
+ /**
28
+ * Get completions for a specific shell
29
+ */
30
+ export declare function getCompletions(shell: 'bash' | 'zsh' | 'fish'): string;
31
+ /**
32
+ * Get install instructions for a shell
33
+ */
34
+ export declare function getInstallInstructions(shell: 'bash' | 'zsh' | 'fish'): string;
35
+ //# sourceMappingURL=completions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"completions.d.ts","sourceRoot":"","sources":["../../src/lib/completions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,eAAO,MAAM,QAAQ;;;GAepB,CAAC;AAQF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,CAqDxG,CAAC;AAEF;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CA6ChD;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CA6FhD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CA6G/C;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAWrE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAkB7E"}