@paulduvall/claude-dev-toolkit 0.0.1-alpha.2 → 0.0.1-alpha.21

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 (143) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +88 -37
  3. package/bin/claude-commands +307 -65
  4. package/commands/active/xarchitecture.md +393 -0
  5. package/commands/active/xconfig.md +127 -0
  6. package/commands/active/xcontinue.md +92 -0
  7. package/commands/active/xdebug.md +130 -0
  8. package/commands/active/xdocs.md +178 -0
  9. package/commands/active/xexplore.md +94 -0
  10. package/commands/active/xgit.md +149 -0
  11. package/commands/active/xpipeline.md +152 -0
  12. package/commands/active/xquality.md +96 -0
  13. package/commands/active/xrefactor.md +198 -0
  14. package/commands/active/xrelease.md +142 -0
  15. package/commands/active/xsecurity.md +92 -0
  16. package/commands/active/xspec.md +174 -0
  17. package/commands/active/xtdd.md +151 -0
  18. package/commands/active/xtest.md +89 -0
  19. package/commands/active/xverify.md +80 -0
  20. package/commands/experiments/xact.md +742 -0
  21. package/commands/experiments/xanalytics.md +113 -0
  22. package/commands/experiments/xanalyze.md +70 -0
  23. package/commands/experiments/xapi.md +161 -0
  24. package/commands/experiments/xatomic.md +112 -0
  25. package/commands/experiments/xaws.md +85 -0
  26. package/commands/experiments/xcicd.md +337 -0
  27. package/commands/experiments/xcommit.md +122 -0
  28. package/commands/experiments/xcompliance.md +182 -0
  29. package/commands/experiments/xconstraints.md +89 -0
  30. package/commands/experiments/xcoverage.md +90 -0
  31. package/commands/experiments/xdb.md +102 -0
  32. package/commands/experiments/xdesign.md +121 -0
  33. package/commands/experiments/xdevcontainer.md +238 -0
  34. package/commands/experiments/xevaluate.md +111 -0
  35. package/commands/experiments/xfootnote.md +12 -0
  36. package/commands/experiments/xgenerate.md +117 -0
  37. package/commands/experiments/xgovernance.md +149 -0
  38. package/commands/experiments/xgreen.md +66 -0
  39. package/commands/experiments/xiac.md +118 -0
  40. package/commands/experiments/xincident.md +137 -0
  41. package/commands/experiments/xinfra.md +115 -0
  42. package/commands/experiments/xknowledge.md +115 -0
  43. package/commands/experiments/xmaturity.md +120 -0
  44. package/commands/experiments/xmetrics.md +118 -0
  45. package/commands/experiments/xmonitoring.md +128 -0
  46. package/commands/experiments/xnew.md +903 -0
  47. package/commands/experiments/xobservable.md +114 -0
  48. package/commands/experiments/xoidc.md +165 -0
  49. package/commands/experiments/xoptimize.md +115 -0
  50. package/commands/experiments/xperformance.md +112 -0
  51. package/commands/experiments/xplanning.md +131 -0
  52. package/commands/experiments/xpolicy.md +115 -0
  53. package/commands/experiments/xproduct.md +98 -0
  54. package/commands/experiments/xreadiness.md +75 -0
  55. package/commands/experiments/xred.md +55 -0
  56. package/commands/experiments/xrisk.md +128 -0
  57. package/commands/experiments/xrules.md +124 -0
  58. package/commands/experiments/xsandbox.md +120 -0
  59. package/commands/experiments/xscan.md +102 -0
  60. package/commands/experiments/xsetup.md +123 -0
  61. package/commands/experiments/xtemplate.md +116 -0
  62. package/commands/experiments/xtrace.md +212 -0
  63. package/commands/experiments/xux.md +171 -0
  64. package/commands/experiments/xvalidate.md +104 -0
  65. package/commands/experiments/xworkflow.md +113 -0
  66. package/hooks/.smellrc.example.json +19 -0
  67. package/hooks/README.md +263 -0
  68. package/hooks/check-commit-signing.py +127 -0
  69. package/hooks/check-complexity.py +38 -0
  70. package/hooks/check-security.py +37 -0
  71. package/hooks/claude-wrapper.sh +29 -0
  72. package/hooks/config.py +110 -0
  73. package/hooks/file-logger.sh +100 -0
  74. package/hooks/lib/argument-parser.sh +427 -0
  75. package/hooks/lib/config-constants.sh +230 -0
  76. package/hooks/lib/context-manager.sh +560 -0
  77. package/hooks/lib/error-handler.sh +423 -0
  78. package/hooks/lib/execution-engine.sh +444 -0
  79. package/hooks/lib/execution-results.sh +113 -0
  80. package/hooks/lib/execution-simulation.sh +114 -0
  81. package/hooks/lib/field-validators.sh +104 -0
  82. package/hooks/lib/file-utils.sh +398 -0
  83. package/hooks/lib/subagent-discovery.sh +468 -0
  84. package/hooks/lib/subagent-validator.sh +407 -0
  85. package/hooks/lib/validation-reporter.sh +134 -0
  86. package/hooks/on-error-debug.sh +226 -0
  87. package/hooks/pre-commit-quality.sh +204 -0
  88. package/hooks/pre-commit-test-runner.sh +132 -0
  89. package/hooks/pre-write-security.sh +115 -0
  90. package/hooks/prevent-credential-exposure.sh +279 -0
  91. package/hooks/security_bandit.py +177 -0
  92. package/hooks/security_checks.py +97 -0
  93. package/hooks/security_secrets.py +81 -0
  94. package/hooks/security_trojan.py +61 -0
  95. package/hooks/settings.example.json +52 -0
  96. package/hooks/smell_checks.py +238 -0
  97. package/hooks/smell_javascript.py +231 -0
  98. package/hooks/smell_python.py +110 -0
  99. package/hooks/smell_ruff.py +70 -0
  100. package/hooks/smell_types.py +72 -0
  101. package/hooks/subagent-trigger-simple.sh +202 -0
  102. package/hooks/subagent-trigger.sh +253 -0
  103. package/hooks/suppression.py +82 -0
  104. package/hooks/tab-color.sh +70 -0
  105. package/hooks/verify-before-edit.sh +135 -0
  106. package/lib/backup-restore-command.js +140 -0
  107. package/lib/base/base-command.js +252 -0
  108. package/lib/base/command-result.js +184 -0
  109. package/lib/config/constants.js +255 -0
  110. package/lib/config.js +48 -6
  111. package/lib/configure-command.js +428 -0
  112. package/lib/dependency-validator.js +64 -5
  113. package/lib/hook-installer-core.js +2 -2
  114. package/lib/installation-instruction-generator.js +213 -495
  115. package/lib/installer.js +134 -56
  116. package/lib/oidc-command.js +740 -0
  117. package/lib/services/backup-list-service.js +226 -0
  118. package/lib/services/backup-service.js +230 -0
  119. package/lib/services/command-installer-service.js +217 -0
  120. package/lib/services/logger-service.js +201 -0
  121. package/lib/services/package-manager-service.js +319 -0
  122. package/lib/services/platform-instruction-service.js +294 -0
  123. package/lib/services/recovery-instruction-service.js +348 -0
  124. package/lib/services/restore-service.js +221 -0
  125. package/lib/setup-command.js +359 -0
  126. package/lib/setup-wizard.js +155 -262
  127. package/lib/uninstall-command.js +100 -0
  128. package/lib/utils/claude-path-config.js +184 -0
  129. package/lib/utils/file-system-utils.js +152 -0
  130. package/lib/utils.js +8 -4
  131. package/lib/verify-command.js +430 -0
  132. package/package.json +7 -3
  133. package/scripts/postinstall.js +172 -157
  134. package/subagents/debug-specialist.md +7 -0
  135. package/templates/README.md +115 -0
  136. package/templates/basic-settings.json +30 -0
  137. package/templates/comprehensive-settings.json +57 -0
  138. package/templates/global-claude.md +344 -0
  139. package/templates/hybrid-hook-config.yaml +132 -0
  140. package/templates/security-focused-settings.json +62 -0
  141. package/templates/subagent-hooks.yaml +188 -0
  142. package/lib/package-manager-service.js +0 -270
  143. package/subagents/debug-context.md +0 -197
@@ -19,65 +19,93 @@ program
19
19
  program
20
20
  .command('list')
21
21
  .description('List all available commands')
22
+ .addHelpText('after', `
23
+ Examples:
24
+ $ claude-commands list # List all installed commands
25
+ $ claude-commands list --active # Show only production commands
26
+ $ claude-commands list --experiments # Show only experimental commands`)
22
27
  .option('-a, --active', 'Show only active commands')
23
- .option('-e, --experimental', 'Show only experimental commands')
28
+ .option('-e, --experiments', 'Show only experimental commands')
24
29
  .action((options) => {
25
30
  const claudeDir = path.join(os.homedir(), '.claude', 'commands');
26
- const activeDir = path.join(claudeDir, 'active');
27
- const experimentalDir = path.join(claudeDir, 'experiments');
28
-
31
+ const pkgDir = path.join(__dirname, '..', 'commands');
32
+
29
33
  console.log('šŸ“¦ Claude Custom Commands\n');
30
-
31
- if (!options.experimental) {
32
- console.log('šŸŽÆ Active Commands:');
33
- if (fs.existsSync(activeDir)) {
34
- const activeCommands = fs.readdirSync(activeDir)
35
- .filter(f => f.endsWith('.md'))
36
- .map(f => f.replace('.md', ''))
37
- .sort();
38
-
39
- if (activeCommands.length > 0) {
40
- activeCommands.forEach(cmd => console.log(` /${cmd}`));
41
- } else {
42
- console.log(' No active commands found');
34
+
35
+ // Determine source: installed commands or package commands
36
+ const sourceDir = fs.existsSync(claudeDir) ? claudeDir : null;
37
+
38
+ if (sourceDir) {
39
+ let allCommands = fs.readdirSync(sourceDir)
40
+ .filter(f => f.endsWith('.md'))
41
+ .map(f => f.replace('.md', ''))
42
+ .sort();
43
+
44
+ // Apply --active/--experiments filters using package source dirs
45
+ if (options.active || options.experiments) {
46
+ const activeDir = path.join(pkgDir, 'active');
47
+ const expDir = path.join(pkgDir, 'experiments');
48
+ const activeSet = new Set();
49
+ const expSet = new Set();
50
+
51
+ if (fs.existsSync(activeDir)) {
52
+ fs.readdirSync(activeDir)
53
+ .filter(f => f.endsWith('.md'))
54
+ .forEach(f => activeSet.add(f.replace('.md', '')));
43
55
  }
44
- } else {
45
- console.log(' Commands directory not found');
46
- }
47
- console.log('');
48
- }
49
-
50
- if (!options.active) {
51
- console.log('🧪 Experimental Commands:');
52
- if (fs.existsSync(experimentalDir)) {
53
- const expCommands = fs.readdirSync(experimentalDir)
54
- .filter(f => f.endsWith('.md'))
55
- .map(f => f.replace('.md', ''))
56
- .sort();
57
-
58
- if (expCommands.length > 0) {
59
- expCommands.forEach(cmd => console.log(` /${cmd}`));
60
- } else {
61
- console.log(' No experimental commands found');
56
+ if (fs.existsSync(expDir)) {
57
+ fs.readdirSync(expDir)
58
+ .filter(f => f.endsWith('.md'))
59
+ .forEach(f => expSet.add(f.replace('.md', '')));
60
+ }
61
+
62
+ if (options.active) {
63
+ allCommands = allCommands.filter(cmd => activeSet.has(cmd));
64
+ } else if (options.experiments) {
65
+ allCommands = allCommands.filter(cmd => expSet.has(cmd));
62
66
  }
67
+ }
68
+
69
+ if (allCommands.length > 0) {
70
+ const label = options.active ? 'Active' : options.experiments ? 'Experimental' : 'Available';
71
+ console.log(`šŸš€ ${label} Commands:`);
72
+ allCommands.forEach(cmd => console.log(` /${cmd}`));
73
+ console.log(`\nšŸ“Š Total: ${allCommands.length} commands`);
63
74
  } else {
64
- console.log(' Commands directory not found');
75
+ console.log(' No commands found matching filter');
65
76
  }
66
- console.log('');
77
+ } else {
78
+ console.log(' Commands directory not found');
79
+ console.log(' Run: claude-commands install');
67
80
  }
68
-
69
- console.log('šŸ’” Usage: Try /xhelp in Claude Code to see all commands');
70
81
  });
71
82
 
72
83
  program
73
84
  .command('install')
74
- .description('Install command sets')
75
- .option('--active', 'Install active commands only')
76
- .option('--experimental', 'Install experimental commands')
77
- .option('--all', 'Install all commands')
78
- .action((options) => {
85
+ .description('Install command sets to ~/.claude/commands/')
86
+ .addHelpText('after', `
87
+ Examples:
88
+ $ claude-commands install # Install active commands (default)
89
+ $ claude-commands install --all # Install all commands
90
+ $ claude-commands install --dry-run # Preview without changes`)
91
+ .option('--active', 'Install production-ready commands (default)')
92
+ .option('--experiments', 'Install experimental commands only')
93
+ .option('--all', 'Install both active and experimental')
94
+ .option('--include <pattern>', 'Include specific commands matching pattern')
95
+ .option('--exclude <pattern>', 'Exclude commands matching pattern')
96
+ .option('--dry-run', 'Show what would be installed without making changes')
97
+ .option('--backup', 'Create backup before installation')
98
+ .action(async (options) => {
79
99
  const installer = require('../lib/installer');
80
- installer.install(options);
100
+ try {
101
+ const result = await installer.install(options);
102
+ if (!result.success && !result.dryRun) {
103
+ process.exit(1);
104
+ }
105
+ } catch (error) {
106
+ console.error(`Installation failed: ${error.message}`);
107
+ process.exit(1);
108
+ }
81
109
  });
82
110
 
83
111
  program
@@ -85,33 +113,22 @@ program
85
113
  .description('Show installation status')
86
114
  .action(() => {
87
115
  const claudeDir = path.join(os.homedir(), '.claude', 'commands');
88
- const activeDir = path.join(claudeDir, 'active');
89
- const experimentalDir = path.join(claudeDir, 'experiments');
90
116
 
91
117
  console.log('šŸ“Š Claude Dev Toolkit Status\n');
92
118
 
93
119
  // Check Claude directory
94
- console.log('šŸ“ Installation Paths:');
95
- console.log(` Claude directory: ${fs.existsSync(claudeDir) ? 'āœ…' : 'āŒ'} ${claudeDir}`);
96
- console.log(` Active commands: ${fs.existsSync(activeDir) ? 'āœ…' : 'āŒ'} ${activeDir}`);
97
- console.log(` Experimental: ${fs.existsSync(experimentalDir) ? 'āœ…' : 'āŒ'} ${experimentalDir}\n`);
120
+ console.log('šŸ“ Installation Path:');
121
+ console.log(` Commands directory: ${fs.existsSync(claudeDir) ? 'āœ…' : 'āŒ'} ${claudeDir}\n`);
98
122
 
99
123
  // Count commands
100
- let activeCount = 0;
101
- let expCount = 0;
124
+ let totalCount = 0;
102
125
 
103
- if (fs.existsSync(activeDir)) {
104
- activeCount = fs.readdirSync(activeDir).filter(f => f.endsWith('.md')).length;
105
- }
106
-
107
- if (fs.existsSync(experimentalDir)) {
108
- expCount = fs.readdirSync(experimentalDir).filter(f => f.endsWith('.md')).length;
126
+ if (fs.existsSync(claudeDir)) {
127
+ totalCount = fs.readdirSync(claudeDir).filter(f => f.endsWith('.md')).length;
109
128
  }
110
129
 
111
130
  console.log('šŸ“¦ Command Inventory:');
112
- console.log(` Active commands: ${activeCount}`);
113
- console.log(` Experimental commands: ${expCount}`);
114
- console.log(` Total commands: ${activeCount + expCount}\n`);
131
+ console.log(` Total commands: ${totalCount}\n`);
115
132
 
116
133
  // Package info
117
134
  console.log('šŸ“‹ Package Information:');
@@ -119,13 +136,13 @@ program
119
136
  console.log(` CLI Location: ${process.argv[1]}\n`);
120
137
 
121
138
  // Quick health check
122
- const isHealthy = fs.existsSync(claudeDir) && (activeCount > 0 || expCount > 0);
139
+ const isHealthy = fs.existsSync(claudeDir) && totalCount > 0;
123
140
  console.log(`šŸ” Overall Status: ${isHealthy ? 'āœ… Healthy' : 'āš ļø Issues detected'}`);
124
141
 
125
142
  if (!isHealthy) {
126
143
  console.log('\nšŸ’” Troubleshooting:');
127
- console.log(' • Try: npm install -g claude-dev-toolkit');
128
- console.log(' • Or reinstall to refresh commands');
144
+ console.log(' • Try: npm install -g @paulduvall/claude-dev-toolkit');
145
+ console.log(' • Or reinstall: claude-commands install --all');
129
146
  }
130
147
  });
131
148
 
@@ -149,4 +166,229 @@ program
149
166
  config.handleCommand(options);
150
167
  });
151
168
 
169
+ program
170
+ .command('configure')
171
+ .description('Configure Claude Code settings (replaces configure-claude-code.sh)')
172
+ .option('--template <name>', 'Apply named template')
173
+ .option('--interactive', 'Launch interactive configuration wizard')
174
+ .option('--validate', 'Validate current configuration')
175
+ .option('--reset', 'Reset to default configuration')
176
+ .option('--backup', 'Create backup before changes (default: true)')
177
+ .option('--no-backup', 'Skip backup creation')
178
+ .action(async (options) => {
179
+ const ConfigureCommand = require('../lib/configure-command');
180
+ const configureCmd = new ConfigureCommand();
181
+ try {
182
+ const result = await configureCmd.execute(options);
183
+ if (!result.success) {
184
+ process.exit(1);
185
+ }
186
+ } catch (error) {
187
+ console.error(`Configuration failed: ${error.message}`);
188
+ process.exit(1);
189
+ }
190
+ });
191
+
192
+ program
193
+ .command('setup')
194
+ .description('Setup the Claude Dev Toolkit with custom commands and configuration')
195
+ .addHelpText('after', `
196
+ Examples:
197
+ $ claude-commands setup # Interactive setup
198
+ $ claude-commands setup --type basic --commands all # Basic config, all commands
199
+ $ claude-commands setup --dry-run # Preview setup actions`)
200
+ .option('--type <template>', 'Configuration template to apply (basic, comprehensive, security-focused)')
201
+ .option('--commands <set>', 'Command set to install (active, experiments, all, none)')
202
+ .option('--skip-configure', 'Skip configuration step')
203
+ .option('--skip-hooks', 'Skip hooks installation')
204
+ .option('--force', 'Overwrite existing installation')
205
+ .option('--dry-run', 'Preview actions without executing')
206
+ .action(async (options) => {
207
+ const SetupCommand = require('../lib/setup-command');
208
+ const setupCmd = new SetupCommand();
209
+ try {
210
+ const result = await setupCmd.execute(options);
211
+ if (!result.success && !result.dryRun) {
212
+ process.exit(1);
213
+ }
214
+ } catch (error) {
215
+ console.error(`Setup failed: ${error.message}`);
216
+ process.exit(1);
217
+ }
218
+ });
219
+
220
+ program
221
+ .command('verify')
222
+ .description('Verify the Claude Dev Toolkit installation status and health')
223
+ .option('--verbose', 'Show detailed verification information')
224
+ .option('--fix', 'Attempt to fix detected issues automatically')
225
+ .action(async (options) => {
226
+ const VerifyCommand = require('../lib/verify-command');
227
+ const verifyCmd = new VerifyCommand();
228
+ try {
229
+ const result = await verifyCmd.execute(options);
230
+ // Set exit code based on health status
231
+ if (result.overall === 'critical') {
232
+ process.exit(2);
233
+ } else if (result.overall === 'warning') {
234
+ process.exit(1);
235
+ }
236
+ // Exit 0 for healthy
237
+ } catch (error) {
238
+ console.error(`Verification failed: ${error.message}`);
239
+ process.exit(2);
240
+ }
241
+ });
242
+
243
+ program
244
+ .command('backup [name]')
245
+ .description('Create named backup of Claude Code configuration')
246
+ .action(async (name) => {
247
+ const BackupRestoreCommand = require('../lib/backup-restore-command');
248
+ const backupCmd = new BackupRestoreCommand();
249
+ try {
250
+ const result = await backupCmd.backup(name);
251
+ if (!result.success) {
252
+ process.exit(1);
253
+ }
254
+ } catch (error) {
255
+ console.error(`Backup failed: ${error.message}`);
256
+ process.exit(1);
257
+ }
258
+ });
259
+
260
+ program
261
+ .command('restore <name>')
262
+ .description('Restore from a named backup')
263
+ .action(async (name) => {
264
+ const BackupRestoreCommand = require('../lib/backup-restore-command');
265
+ const restoreCmd = new BackupRestoreCommand();
266
+ try {
267
+ const result = await restoreCmd.restore(name);
268
+ if (!result.success) {
269
+ process.exit(1);
270
+ }
271
+ } catch (error) {
272
+ console.error(`Restore failed: ${error.message}`);
273
+ process.exit(1);
274
+ }
275
+ });
276
+
277
+ program
278
+ .command('oidc')
279
+ .description(`Configure GitHub Actions OIDC (OpenID Connect) integration with AWS
280
+
281
+ šŸŽÆ WHAT IT DOES:
282
+ • Creates GitHub OIDC identity provider in AWS
283
+ • Sets up IAM role with trust policy for GitHub Actions
284
+ • Configures repository variables for secure AWS access
285
+ • Enables passwordless authentication from GitHub to AWS
286
+
287
+ šŸ“‹ PREREQUISITES (REQUIRED):
288
+ • AWS CLI installed and configured (aws configure)
289
+ • GitHub CLI authenticated (gh auth login)
290
+ • Git repository with GitHub remote origin
291
+ • AWS account with IAM permissions
292
+
293
+ āš™ļø WHAT IT CREATES:
294
+ • AWS OIDC Identity Provider for GitHub
295
+ • IAM Role for GitHub Actions (with trust policy)
296
+ • IAM policies for AWS resource access
297
+ • GitHub repository variables (AWS_DEPLOYMENT_ROLE, AWS_REGION)
298
+
299
+ šŸš€ BASIC USAGE:
300
+ • claude-commands oidc # Auto-detect settings
301
+ • claude-commands oidc --dry-run # Preview without changes
302
+ • claude-commands oidc --region us-west-2 # Specify AWS region`)
303
+ .option('--region <region>', 'AWS region for OIDC setup', 'us-east-1')
304
+ .option('--role-name <name>', 'IAM role name for GitHub Actions', 'GitHubActionsRole')
305
+ .option('--repository-path <path>', 'Path to repository for OIDC setup (auto-detected)', process.cwd())
306
+ .option('--dry-run', 'Preview actions without making changes (SAFE to run)')
307
+ .option('--verbose', 'Show detailed output during execution')
308
+ .action(async (options) => {
309
+ const OidcCommand = require('../lib/oidc-command');
310
+ const oidcCmd = new OidcCommand();
311
+ try {
312
+ const result = await oidcCmd.execute(options);
313
+ if (result.success) {
314
+ if (result.message) {
315
+ console.log(result.message);
316
+ }
317
+ if (options.verbose && result.duration) {
318
+ console.log(`āœ… Completed in ${result.duration}ms`);
319
+ }
320
+ } else {
321
+ console.error(`āŒ OIDC setup failed: ${result.error || 'Unknown error'}`);
322
+ if (result.enhancedError && result.enhancedError.suggestions) {
323
+ result.enhancedError.suggestions.forEach(suggestion => {
324
+ console.log(suggestion);
325
+ });
326
+ }
327
+ process.exit(1);
328
+ }
329
+ } catch (error) {
330
+ console.error(`āŒ OIDC setup failed: ${error.message}`);
331
+ process.exit(1);
332
+ }
333
+ });
334
+
335
+ program
336
+ .command('update')
337
+ .description('Check for package updates')
338
+ .action(async () => {
339
+ const { version } = require('../package.json');
340
+ console.log('šŸ” Checking for updates...\n');
341
+ console.log(`Current version: ${version}`);
342
+
343
+ try {
344
+ const { execSync } = require('child_process');
345
+ const output = execSync('npm view @paulduvall/claude-dev-toolkit version', {
346
+ encoding: 'utf8',
347
+ stdio: 'pipe'
348
+ }).trim();
349
+
350
+ console.log(`Latest version: ${output}`);
351
+
352
+ if (output !== version) {
353
+ console.log('\nšŸ†• Update available!');
354
+ console.log('\nTo update, run:');
355
+ console.log(' npm update -g @paulduvall/claude-dev-toolkit');
356
+
357
+ // Check for breaking changes in major version
358
+ const currentMajor = parseInt(version.split('.')[0]);
359
+ const latestMajor = parseInt(output.split('.')[0]);
360
+
361
+ if (latestMajor > currentMajor) {
362
+ console.log('\nāš ļø Major version update - may contain breaking changes');
363
+ console.log(' Review release notes before updating');
364
+ }
365
+ } else {
366
+ console.log('\nāœ… You are using the latest version');
367
+ }
368
+ } catch (error) {
369
+ console.error('āŒ Could not check for updates');
370
+ console.log(' Please check your internet connection');
371
+ process.exit(1);
372
+ }
373
+ });
374
+
375
+ program
376
+ .command('uninstall')
377
+ .description('Remove all installed commands, hooks, and subagents')
378
+ .addHelpText('after', `
379
+ Examples:
380
+ $ claude-commands uninstall # Remove all installed files
381
+ $ claude-commands uninstall --dry-run # Preview what would be removed`)
382
+ .option('--dry-run', 'Preview what would be removed without deleting')
383
+ .option('--keep-settings', 'Keep settings.json intact')
384
+ .action((options) => {
385
+ const uninstaller = require('../lib/uninstall-command');
386
+ try {
387
+ uninstaller.execute(options);
388
+ } catch (error) {
389
+ console.error(`Uninstall failed: ${error.message}`);
390
+ process.exit(1);
391
+ }
392
+ });
393
+
152
394
  program.parse(process.argv);