@claude-code-hooks/cli 0.1.4 → 0.1.6

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 (2) hide show
  1. package/package.json +3 -2
  2. package/src/cli.js +13 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-code-hooks/cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Wizard CLI to set up and manage @claude-code-hooks packages for Claude Code.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/beefiker/claude-code-hooks/tree/main/packages/cli",
@@ -30,7 +30,8 @@
30
30
  "@claude-code-hooks/core": "0.1.2",
31
31
  "@claude-code-hooks/security": "0.1.4",
32
32
  "@claude-code-hooks/secrets": "0.1.5",
33
- "@claude-code-hooks/sound": "0.2.8"
33
+ "@claude-code-hooks/sound": "0.2.8",
34
+ "@claude-code-hooks/notification": "0.1.2"
34
35
  },
35
36
  "keywords": [
36
37
  "claude",
package/src/cli.js CHANGED
@@ -34,6 +34,7 @@ import { buildSettingsSnippet } from './snippet.js';
34
34
  import { planInteractiveSetup as planSecuritySetup } from '@claude-code-hooks/security/src/plan.js';
35
35
  import { planInteractiveSetup as planSecretsSetup } from '@claude-code-hooks/secrets/src/plan.js';
36
36
  import { planInteractiveSetup as planSoundSetup } from '@claude-code-hooks/sound/src/plan.js';
37
+ import { planInteractiveSetup as planNotificationSetup } from '@claude-code-hooks/notification/src/plan.js';
37
38
 
38
39
  function dieCancelled(msg = 'Cancelled') {
39
40
  cancel(msg);
@@ -57,6 +58,7 @@ async function ensureProjectOnlyConfig(projectDir, selected, perPackageConfig) {
57
58
  if (selected.includes('security') && perPackageConfig.security) out.security = perPackageConfig.security;
58
59
  if (selected.includes('secrets') && perPackageConfig.secrets) out.secrets = perPackageConfig.secrets;
59
60
  if (selected.includes('sound') && perPackageConfig.sound) out.sound = perPackageConfig.sound;
61
+ if (selected.includes('notification') && perPackageConfig.notification) out.notification = perPackageConfig.notification;
60
62
 
61
63
  await writeProjectConfig(out, projectDir);
62
64
  return out;
@@ -115,7 +117,8 @@ async function main() {
115
117
  options: [
116
118
  { value: 'security', label: '@claude-code-hooks/security', hint: 'Warn/block risky commands' },
117
119
  { value: 'secrets', label: '@claude-code-hooks/secrets', hint: 'Detect secret-like tokens' },
118
- { value: 'sound', label: '@claude-code-hooks/sound', hint: 'Play sounds on events' }
120
+ { value: 'sound', label: '@claude-code-hooks/sound', hint: 'Play sounds on events' },
121
+ { value: 'notification', label: '@claude-code-hooks/notification', hint: 'OS notifications on events' }
119
122
  ],
120
123
  required: true
121
124
  });
@@ -129,17 +132,18 @@ async function main() {
129
132
  }
130
133
 
131
134
  // Build per-package plan/config
132
- const perPackage = { security: null, secrets: null, sound: null };
135
+ const perPackage = { security: null, secrets: null, sound: null, notification: null };
133
136
 
134
137
  // ── Step 4/5: configure ──
135
138
  note(
136
- selected.map((k) => `${pc.bold(k)}: ${pc.dim({ security: 'Warn/block risky commands', secrets: 'Detect secret-like tokens', sound: 'Play sounds on events' }[k] || '')}`).join('\n'),
139
+ selected.map((k) => `${pc.bold(k)}: ${pc.dim({ security: 'Warn/block risky commands', secrets: 'Detect secret-like tokens', sound: 'Play sounds on events', notification: 'OS notifications on events' }[k] || '')}`).join('\n'),
137
140
  `${pc.dim('Step 4/5')} Configure`
138
141
  );
139
142
 
140
143
  if (selected.includes('security')) perPackage.security = await planSecuritySetup({ action, projectDir, ui: 'umbrella' });
141
144
  if (selected.includes('secrets')) perPackage.secrets = await planSecretsSetup({ action, projectDir, ui: 'umbrella' });
142
145
  if (selected.includes('sound')) perPackage.sound = await planSoundSetup({ action, projectDir, ui: 'umbrella' });
146
+ if (selected.includes('notification')) perPackage.notification = await planNotificationSetup({ action, projectDir, ui: 'umbrella' });
143
147
 
144
148
  // ── Step 5/5: review ──
145
149
  const files = [];
@@ -187,7 +191,8 @@ async function main() {
187
191
  const projectCfg = await ensureProjectOnlyConfig(projectDir, selected, {
188
192
  security: perPackage.security?.projectConfigSection,
189
193
  secrets: perPackage.secrets?.projectConfigSection,
190
- sound: perPackage.sound?.projectConfigSection
194
+ sound: perPackage.sound?.projectConfigSection,
195
+ notification: perPackage.notification?.projectConfigSection
191
196
  });
192
197
 
193
198
  // Print snippet for user to paste into global settings.
@@ -197,7 +202,8 @@ async function main() {
197
202
  packagePlans: {
198
203
  security: perPackage.security,
199
204
  secrets: perPackage.secrets,
200
- sound: perPackage.sound
205
+ sound: perPackage.sound,
206
+ notification: perPackage.notification
201
207
  }
202
208
  });
203
209
 
@@ -236,7 +242,8 @@ async function main() {
236
242
  await ensureProjectOnlyConfig(projectDir, selected, {
237
243
  security: perPackage.security?.projectConfigSection,
238
244
  secrets: perPackage.secrets?.projectConfigSection,
239
- sound: perPackage.sound?.projectConfigSection
245
+ sound: perPackage.sound?.projectConfigSection,
246
+ notification: perPackage.notification?.projectConfigSection
240
247
  });
241
248
  }
242
249