bonzai-burn 1.0.35 → 1.0.37

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,13 +1,13 @@
1
1
  {
2
2
  "name": "bonzai-burn",
3
- "version": "1.0.35",
3
+ "version": "1.0.37",
4
4
  "description": "Git branch-based cleanup tool with bburn, baccept, and brevert commands",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
7
7
  "bin": {
8
8
  "bonzai-burn": "./src/index.js",
9
9
  "bburn": "./src/bburn.js",
10
- "bgraph": "./src/bgraph.js",
10
+ "bconfig": "./src/bconfig.js",
11
11
  "bhook": "./src/bhook.js"
12
12
  },
13
13
  "keywords": [
@@ -196,7 +196,7 @@ async function main() {
196
196
  export { main };
197
197
 
198
198
  // Run directly if called as standalone command
199
- const isDirectRun = process.argv[1]?.endsWith('bgraph.js');
199
+ const isDirectRun = process.argv[1]?.endsWith('bconfig.js');
200
200
  if (isDirectRun) {
201
201
  main().catch(console.error);
202
202
  }
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
@@ -18,15 +18,22 @@ Usage: npx bonzai-burn [option]
18
18
  Options:
19
19
  (no option) Initialize bonzai in current directory
20
20
  -b, --burn Run code analysis (bburn)
21
- -g, --graph Launch visualization server (bgraph)
22
- -h, --hook Install Claude Code stop hook (bhook)
21
+ -c, --config Launch visualization server (bconfig)
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
- npx bonzai-burn -g # Start graph server
34
+ npx bonzai-burn -c # 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
 
@@ -47,7 +54,7 @@ function init() {
47
54
  console.log('');
48
55
  console.log('┌─────────────────────────────────────────────────────────────┐');
49
56
  console.log('│ │');
50
- console.log('│ 🌳 Run `npx bonzai-burn -g` to visualize your codebase │');
57
+ console.log('│ 🌳 Run `npx bonzai-burn -c` to visualize your codebase │');
51
58
  console.log('│ │');
52
59
  console.log('└─────────────────────────────────────────────────────────────┘');
53
60
  }
@@ -63,16 +70,18 @@ async function main() {
63
70
  if (burnMain) await burnMain();
64
71
  break;
65
72
  }
66
- case '-g':
67
- case '--graph': {
68
- const { main: graphMain } = await import('./bgraph.js');
69
- if (graphMain) await graphMain();
73
+ case '-c':
74
+ case '--config': {
75
+ const { main: configMain } = await import('./bconfig.js');
76
+ if (configMain) await configMain();
70
77
  break;
71
78
  }
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':