bonzai-burn 1.0.35 → 1.0.36

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bonzai-burn",
3
- "version": "1.0.35",
3
+ "version": "1.0.36",
4
4
  "description": "Git branch-based cleanup tool with bburn, baccept, and brevert commands",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/bhook.js CHANGED
@@ -152,19 +152,23 @@ function showStatus() {
152
152
  }
153
153
  }
154
154
 
155
- async function main() {
156
- const args = process.argv.slice(2);
155
+ async function main(subArgs = []) {
156
+ // Use passed args or fall back to process.argv
157
+ const args = subArgs.length > 0 ? subArgs : process.argv.slice(2);
157
158
  const command = args[0];
158
159
 
159
160
  switch (command) {
160
161
  case 'uninstall':
161
162
  case 'remove':
163
+ case '-u':
162
164
  uninstallHook();
163
165
  break;
164
166
  case 'status':
167
+ case '-s':
165
168
  showStatus();
166
169
  break;
167
170
  case 'install':
171
+ case '-i':
168
172
  default:
169
173
  // Default action is to install (like bburn runs analysis by default)
170
174
  installHook();
package/src/index.js CHANGED
@@ -19,14 +19,21 @@ Options:
19
19
  (no option) Initialize bonzai in current directory
20
20
  -b, --burn Run code analysis (bburn)
21
21
  -g, --graph Launch visualization server (bgraph)
22
- -h, --hook Install Claude Code stop hook (bhook)
22
+ -h, --hook Manage Claude Code stop hook (bhook)
23
23
  --help Show this help message
24
24
 
25
+ Hook subcommands (-h):
26
+ -h Install hook (default)
27
+ -h -i Install hook
28
+ -h -s Show hook status
29
+ -h -u Uninstall hook
30
+
25
31
  Examples:
26
32
  npx bonzai-burn # Initialize bonzai folder
27
33
  npx bonzai-burn -b # Run burn analysis
28
34
  npx bonzai-burn -g # Start graph server
29
35
  npx bonzai-burn -h # Install hook
36
+ npx bonzai-burn -h -s # Check hook status
30
37
  `);
31
38
  }
32
39
 
@@ -72,7 +79,9 @@ async function main() {
72
79
  case '-h':
73
80
  case '--hook': {
74
81
  const { main: hookMain } = await import('./bhook.js');
75
- if (hookMain) await hookMain();
82
+ // Pass remaining args as subcommands (e.g., -h -s → ['-s'])
83
+ const subArgs = args.slice(1);
84
+ if (hookMain) await hookMain(subArgs);
76
85
  break;
77
86
  }
78
87
  case '--help':