@paulduvall/claude-dev-toolkit 0.0.1-alpha.1 ā 0.0.1-alpha.11
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/README.md +74 -23
- package/bin/claude-commands +263 -64
- package/commands/active/xarchitecture.md +393 -0
- package/commands/active/xconfig.md +127 -0
- package/commands/active/xdebug.md +130 -0
- package/commands/active/xdocs.md +178 -0
- package/commands/active/xgit.md +149 -0
- package/commands/active/xpipeline.md +152 -0
- package/commands/active/xquality.md +96 -0
- package/commands/active/xrefactor.md +198 -0
- package/commands/active/xrelease.md +142 -0
- package/commands/active/xsecurity.md +92 -0
- package/commands/active/xspec.md +174 -0
- package/commands/active/xtdd.md +151 -0
- package/commands/active/xtest.md +89 -0
- package/commands/experiments/xact.md +742 -0
- package/commands/experiments/xanalytics.md +113 -0
- package/commands/experiments/xanalyze.md +70 -0
- package/commands/experiments/xapi.md +161 -0
- package/commands/experiments/xatomic.md +112 -0
- package/commands/experiments/xaws.md +85 -0
- package/commands/experiments/xcicd.md +337 -0
- package/commands/experiments/xcommit.md +122 -0
- package/commands/experiments/xcompliance.md +182 -0
- package/commands/experiments/xconstraints.md +89 -0
- package/commands/experiments/xcoverage.md +90 -0
- package/commands/experiments/xdb.md +102 -0
- package/commands/experiments/xdesign.md +121 -0
- package/commands/experiments/xevaluate.md +111 -0
- package/commands/experiments/xfootnote.md +12 -0
- package/commands/experiments/xgenerate.md +117 -0
- package/commands/experiments/xgovernance.md +149 -0
- package/commands/experiments/xgreen.md +66 -0
- package/commands/experiments/xiac.md +118 -0
- package/commands/experiments/xincident.md +137 -0
- package/commands/experiments/xinfra.md +115 -0
- package/commands/experiments/xknowledge.md +115 -0
- package/commands/experiments/xmaturity.md +120 -0
- package/commands/experiments/xmetrics.md +118 -0
- package/commands/experiments/xmonitoring.md +128 -0
- package/commands/experiments/xnew.md +898 -0
- package/commands/experiments/xobservable.md +114 -0
- package/commands/experiments/xoidc.md +165 -0
- package/commands/experiments/xoptimize.md +115 -0
- package/commands/experiments/xperformance.md +112 -0
- package/commands/experiments/xplanning.md +131 -0
- package/commands/experiments/xpolicy.md +115 -0
- package/commands/experiments/xproduct.md +98 -0
- package/commands/experiments/xreadiness.md +75 -0
- package/commands/experiments/xred.md +55 -0
- package/commands/experiments/xrisk.md +128 -0
- package/commands/experiments/xrules.md +124 -0
- package/commands/experiments/xsandbox.md +120 -0
- package/commands/experiments/xscan.md +102 -0
- package/commands/experiments/xsetup.md +123 -0
- package/commands/experiments/xtemplate.md +116 -0
- package/commands/experiments/xtrace.md +212 -0
- package/commands/experiments/xux.md +171 -0
- package/commands/experiments/xvalidate.md +104 -0
- package/commands/experiments/xworkflow.md +113 -0
- package/hooks/README.md +231 -0
- package/hooks/file-logger.sh +98 -0
- package/hooks/lib/argument-parser.sh +422 -0
- package/hooks/lib/config-constants.sh +230 -0
- package/hooks/lib/context-manager.sh +549 -0
- package/hooks/lib/error-handler.sh +412 -0
- package/hooks/lib/execution-engine.sh +627 -0
- package/hooks/lib/file-utils.sh +375 -0
- package/hooks/lib/subagent-discovery.sh +465 -0
- package/hooks/lib/subagent-validator.sh +597 -0
- package/hooks/on-error-debug.sh +221 -0
- package/hooks/pre-commit-quality.sh +204 -0
- package/hooks/pre-write-security.sh +107 -0
- package/hooks/prevent-credential-exposure.sh +265 -0
- package/hooks/subagent-trigger-simple.sh +193 -0
- package/hooks/subagent-trigger.sh +253 -0
- package/lib/backup-restore-command.js +140 -0
- package/lib/base/base-command.js +252 -0
- package/lib/base/command-result.js +184 -0
- package/lib/config/constants.js +255 -0
- package/lib/config.js +228 -3
- package/lib/configure-command.js +428 -0
- package/lib/dependency-validator.js +64 -5
- package/lib/hook-installer-core.js +2 -2
- package/lib/installation-instruction-generator-backup.js +579 -0
- package/lib/installation-instruction-generator.js +213 -495
- package/lib/installer.js +134 -56
- package/lib/oidc-command.js +363 -0
- package/lib/result.js +138 -0
- package/lib/services/backup-list-service.js +226 -0
- package/lib/services/backup-service.js +230 -0
- package/lib/services/command-installer-service.js +217 -0
- package/lib/services/logger-service.js +201 -0
- package/lib/services/package-manager-service.js +319 -0
- package/lib/services/platform-instruction-service.js +294 -0
- package/lib/services/recovery-instruction-service.js +348 -0
- package/lib/services/restore-service.js +221 -0
- package/lib/setup-command.js +309 -0
- package/lib/subagent-formatter.js +278 -0
- package/lib/subagents-core.js +237 -0
- package/lib/subagents.js +508 -0
- package/lib/types.d.ts +183 -0
- package/lib/utils/claude-path-config.js +184 -0
- package/lib/utils/file-system-utils.js +152 -0
- package/lib/utils.js +8 -4
- package/lib/verify-command.js +430 -0
- package/package.json +17 -4
- package/scripts/postinstall.js +28 -10
- package/subagents/api-guardian.md +29 -0
- package/subagents/audit-trail-verifier.md +24 -0
- package/subagents/change-scoper.md +23 -0
- package/subagents/ci-pipeline-curator.md +24 -0
- package/subagents/code-review-assistant.md +258 -0
- package/subagents/continuous-release-orchestrator.md +29 -0
- package/subagents/contract-tester.md +24 -0
- package/subagents/data-steward.md +29 -0
- package/subagents/debug-context.md +197 -0
- package/subagents/debug-specialist.md +138 -0
- package/subagents/dependency-steward.md +24 -0
- package/subagents/deployment-strategist.md +29 -0
- package/subagents/documentation-curator.md +29 -0
- package/subagents/environment-guardian.md +29 -0
- package/subagents/license-compliance-guardian.md +29 -0
- package/subagents/observability-engineer.md +25 -0
- package/subagents/performance-guardian.md +29 -0
- package/subagents/product-owner-proxy.md +28 -0
- package/subagents/requirements-reviewer.md +26 -0
- package/subagents/rollback-first-responder.md +24 -0
- package/subagents/sbom-provenance.md +25 -0
- package/subagents/security-auditor.md +29 -0
- package/subagents/style-enforcer.md +23 -0
- package/subagents/test-writer.md +24 -0
- package/subagents/trunk-guardian.md +29 -0
- package/subagents/workflow-coordinator.md +26 -0
- package/templates/README.md +100 -0
- package/templates/basic-settings.json +30 -0
- package/templates/comprehensive-settings.json +206 -0
- package/templates/hybrid-hook-config.yaml +133 -0
- package/templates/security-focused-settings.json +62 -0
- package/templates/subagent-hooks.yaml +188 -0
- package/tsconfig.json +37 -0
package/README.md
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
# Claude Dev Toolkit
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/claude-dev-toolkit)
|
|
4
|
-
[](https://opensource.org/licenses/MIT)
|
|
5
|
-

|
|
6
|
-

|
|
7
|
-

|
|
8
|
-

|
|
9
|
-
|
|
10
3
|
**Transform Claude Code into a complete development platform** with 58 AI-powered custom commands that automate your entire software development workflow.
|
|
11
4
|
|
|
12
5
|
## š Quick Installation
|
|
13
6
|
|
|
14
7
|
```bash
|
|
15
8
|
# Install globally via NPM
|
|
16
|
-
npm install -g claude-dev-toolkit
|
|
9
|
+
npm install -g @paulduvall/claude-dev-toolkit
|
|
17
10
|
|
|
18
11
|
# Commands are immediately available in Claude Code
|
|
19
12
|
claude
|
|
@@ -33,7 +26,7 @@ claude
|
|
|
33
26
|
|
|
34
27
|
### Option 1: Automatic Setup (Recommended)
|
|
35
28
|
```bash
|
|
36
|
-
npm install -g claude-dev-toolkit
|
|
29
|
+
npm install -g @paulduvall/claude-dev-toolkit
|
|
37
30
|
# Interactive setup wizard runs automatically
|
|
38
31
|
```
|
|
39
32
|
|
|
@@ -41,7 +34,7 @@ npm install -g claude-dev-toolkit
|
|
|
41
34
|
```bash
|
|
42
35
|
# Install specific command sets
|
|
43
36
|
claude-commands install --active # Install 13 production commands
|
|
44
|
-
claude-commands install --
|
|
37
|
+
claude-commands install --experiments # Install 45 experimental commands
|
|
45
38
|
claude-commands install --all # Install all 58 commands
|
|
46
39
|
```
|
|
47
40
|
|
|
@@ -49,6 +42,7 @@ claude-commands install --all # Install all 58 commands
|
|
|
49
42
|
```bash
|
|
50
43
|
claude-commands list # See all available commands
|
|
51
44
|
claude-commands status # Check installation status
|
|
45
|
+
claude-commands oidc --help # Configure GitHub Actions OIDC with AWS
|
|
52
46
|
```
|
|
53
47
|
|
|
54
48
|
## š Available Commands
|
|
@@ -89,9 +83,24 @@ Advanced commands for specialized workflows:
|
|
|
89
83
|
claude-commands list # List all available commands
|
|
90
84
|
claude-commands status # Show installation status
|
|
91
85
|
claude-commands install --active # Install production commands
|
|
92
|
-
claude-commands install --
|
|
86
|
+
claude-commands install --experiments # Install experimental commands
|
|
93
87
|
claude-commands install --all # Install all commands
|
|
94
88
|
|
|
89
|
+
# Configuration Management
|
|
90
|
+
claude-commands config --list # List available templates
|
|
91
|
+
claude-commands config --template <name> # Apply configuration template
|
|
92
|
+
claude-commands config --help # Show config command help
|
|
93
|
+
|
|
94
|
+
# OIDC Configuration (NEW)
|
|
95
|
+
claude-commands oidc --help # Show OIDC configuration options
|
|
96
|
+
claude-commands oidc --dry-run # Preview OIDC setup actions
|
|
97
|
+
claude-commands oidc --region us-west-2 --stack-name my-oidc # Configure AWS OIDC
|
|
98
|
+
|
|
99
|
+
# Subagents Management
|
|
100
|
+
claude-commands subagents --list # List available subagents
|
|
101
|
+
claude-commands subagents --install # Install subagents to Claude Code
|
|
102
|
+
claude-commands subagents --help # Show subagents command help
|
|
103
|
+
|
|
95
104
|
# In Claude Code
|
|
96
105
|
/xhelp # Show command help
|
|
97
106
|
/xtest # Run intelligent test suite
|
|
@@ -102,19 +111,37 @@ claude-commands install --all # Install all commands
|
|
|
102
111
|
|
|
103
112
|
## š§ Configuration
|
|
104
113
|
|
|
114
|
+
### Configuration Management
|
|
115
|
+
|
|
116
|
+
Use the built-in config command to manage Claude Code settings:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# List available configuration templates
|
|
120
|
+
claude-commands config --list
|
|
121
|
+
|
|
122
|
+
# Apply a specific template
|
|
123
|
+
claude-commands config --template basic-settings.json
|
|
124
|
+
claude-commands config --template security-focused-settings.json
|
|
125
|
+
claude-commands config --template comprehensive-settings.json
|
|
126
|
+
|
|
127
|
+
# Show help for config command
|
|
128
|
+
claude-commands config --help
|
|
129
|
+
```
|
|
130
|
+
|
|
105
131
|
### Installation Locations
|
|
106
132
|
- **Commands**: `~/.claude/commands/active/` and `~/.claude/commands/experiments/`
|
|
107
133
|
- **Configuration**: `~/.claude/settings.json`
|
|
108
134
|
- **Security Hooks**: `~/.claude/hooks/`
|
|
135
|
+
- **Templates**: Bundled with package installation
|
|
109
136
|
|
|
110
137
|
### Configuration Templates
|
|
111
138
|
The package includes three pre-configured templates:
|
|
112
139
|
|
|
113
140
|
1. **Basic** (`basic-settings.json`): Minimal setup for command functionality
|
|
114
|
-
2. **Security-Focused** (`security-focused-settings.json`): Enhanced security with hooks
|
|
141
|
+
2. **Security-Focused** (`security-focused-settings.json`): Enhanced security with hooks
|
|
115
142
|
3. **Comprehensive** (`comprehensive-settings.json`): Full feature set with governance
|
|
116
143
|
|
|
117
|
-
Templates are
|
|
144
|
+
Templates are applied via the config command with automatic backup of existing settings.
|
|
118
145
|
|
|
119
146
|
## š§Ŗ Development & Testing
|
|
120
147
|
|
|
@@ -127,6 +154,8 @@ npm test
|
|
|
127
154
|
npm run test:commands # Command validation
|
|
128
155
|
npm run test:workflow # Core workflow tests
|
|
129
156
|
npm run test:security # Security command tests
|
|
157
|
+
npm run test:config # Configuration command tests
|
|
158
|
+
npm run test:subagents # Subagents CLI command tests
|
|
130
159
|
npm run test:req007 # Interactive setup wizard
|
|
131
160
|
npm run test:req009 # Configuration templates
|
|
132
161
|
npm run test:req018 # Security hook installation
|
|
@@ -144,8 +173,8 @@ npm run lint # Code linting
|
|
|
144
173
|
- **Configuration Tests**: Template and setup validation
|
|
145
174
|
|
|
146
175
|
### Architecture
|
|
147
|
-
- **
|
|
148
|
-
- **JavaScript-Based**:
|
|
176
|
+
- **Self-Contained Package**: No dependencies on repository cloning
|
|
177
|
+
- **JavaScript-Based**: Native Node.js integration with comprehensive testing
|
|
149
178
|
- **Modular Design**: Separate installer, config, and validation modules
|
|
150
179
|
- **Cross-Platform**: Works on macOS, Linux, and Windows
|
|
151
180
|
|
|
@@ -173,7 +202,7 @@ claude-commands install --active # Reinstall commands
|
|
|
173
202
|
chmod 755 ~/.claude/commands/*.md # Fix permissions
|
|
174
203
|
|
|
175
204
|
# Missing experimental commands?
|
|
176
|
-
claude-commands install --
|
|
205
|
+
claude-commands install --experiments # Install experimental set
|
|
177
206
|
|
|
178
207
|
# Test failures?
|
|
179
208
|
npm test # Run full test suite
|
|
@@ -182,13 +211,13 @@ npm run validate # Validate package
|
|
|
182
211
|
|
|
183
212
|
### Validation Commands
|
|
184
213
|
```bash
|
|
185
|
-
# Repository validation (from main repo)
|
|
186
|
-
./validate-commands.sh # JavaScript-based validation
|
|
187
|
-
./verify-setup.sh # Complete setup verification
|
|
188
|
-
|
|
189
214
|
# Package validation
|
|
190
215
|
npm run validate # Package structure validation
|
|
191
216
|
npm test # Comprehensive test suite
|
|
217
|
+
|
|
218
|
+
# CLI validation
|
|
219
|
+
claude-commands verify # Complete setup verification
|
|
220
|
+
claude-commands list # Check installed commands
|
|
192
221
|
```
|
|
193
222
|
|
|
194
223
|
## š Documentation
|
|
@@ -204,6 +233,7 @@ Every command includes built-in help:
|
|
|
204
233
|
/xtest help # Show all testing options
|
|
205
234
|
/xquality help # Show quality check options
|
|
206
235
|
/xsecurity help # Show security scanning options
|
|
236
|
+
/xconfig help # Show configuration options
|
|
207
237
|
```
|
|
208
238
|
|
|
209
239
|
## š¤ Contributing
|
|
@@ -221,8 +251,8 @@ npm test
|
|
|
221
251
|
```
|
|
222
252
|
|
|
223
253
|
### Adding Commands
|
|
224
|
-
1. Create command files in
|
|
225
|
-
2. Commands
|
|
254
|
+
1. Create command files in repository `slash-commands/active/` or `slash-commands/experiments/`
|
|
255
|
+
2. Commands are included in NPM package through build process
|
|
226
256
|
3. Validate with `npm run test:commands`
|
|
227
257
|
4. Follow existing patterns and security guidelines
|
|
228
258
|
|
|
@@ -233,7 +263,28 @@ npm test
|
|
|
233
263
|
|
|
234
264
|
## š Recent Updates
|
|
235
265
|
|
|
236
|
-
### Version 0.0.1-alpha.
|
|
266
|
+
### Version 0.0.1-alpha.9
|
|
267
|
+
- ā
**NEW: OIDC Command**: GitHub Actions to AWS OIDC integration (`claude-commands oidc`)
|
|
268
|
+
- ā
**TDD Implementation**: Phase 1 foundation with comprehensive test coverage (14/14 tests)
|
|
269
|
+
- ā
**CLI Integration**: Full command-line interface with help, dry-run, and configuration options
|
|
270
|
+
- ā
**Error Framework**: Enhanced error handling with context-aware recovery suggestions
|
|
271
|
+
- ā
**Dependency Validation**: AWS CLI, Git, and GitHub CLI availability checking
|
|
272
|
+
|
|
273
|
+
### Version 0.0.1-alpha.8
|
|
274
|
+
- ā
**Documentation Consistency**: Fixed command counts (58) and subagent counts (26)
|
|
275
|
+
- ā
**Test Infrastructure**: Enhanced test-results directory handling
|
|
276
|
+
- ā
**Repository Cleanup**: Removed outdated documentation and test artifacts
|
|
277
|
+
- ā
**Validation Logic**: Improved scenario-aware test validation
|
|
278
|
+
- ā
**Version Alignment**: Synchronized all version references
|
|
279
|
+
|
|
280
|
+
### Version 0.0.1-alpha.7
|
|
281
|
+
- ā
**NPM Scoped Package**: Published as `@paulduvall/claude-dev-toolkit`
|
|
282
|
+
- ā
**Configuration Command**: Built-in `config` command for template management
|
|
283
|
+
- ā
**Workflow Reporting**: Comprehensive GitHub Actions reporting
|
|
284
|
+
- ā
**Subagents Support**: Multi-agent coordination capabilities
|
|
285
|
+
- ā
**Enhanced Documentation**: Updated installation and usage instructions
|
|
286
|
+
|
|
287
|
+
### Version 0.0.1-alpha.2
|
|
237
288
|
- ā
**Symlink Consolidation**: Eliminated duplicate directories
|
|
238
289
|
- ā
**JavaScript Migration**: Complete test suite migration from Python
|
|
239
290
|
- ā
**Enhanced Templates**: Fixed configuration template issues
|
package/bin/claude-commands
CHANGED
|
@@ -20,64 +20,53 @@ program
|
|
|
20
20
|
.command('list')
|
|
21
21
|
.description('List all available commands')
|
|
22
22
|
.option('-a, --active', 'Show only active commands')
|
|
23
|
-
.option('-e, --
|
|
23
|
+
.option('-e, --experiments', 'Show only experimental commands')
|
|
24
24
|
.action((options) => {
|
|
25
25
|
const claudeDir = path.join(os.homedir(), '.claude', 'commands');
|
|
26
|
-
const activeDir = path.join(claudeDir, 'active');
|
|
27
|
-
const experimentalDir = path.join(claudeDir, 'experiments');
|
|
28
26
|
|
|
29
27
|
console.log('š¦ Claude Custom Commands\n');
|
|
30
28
|
|
|
31
|
-
if (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
} else {
|
|
42
|
-
console.log(' No active commands found');
|
|
43
|
-
}
|
|
29
|
+
if (fs.existsSync(claudeDir)) {
|
|
30
|
+
const allCommands = fs.readdirSync(claudeDir)
|
|
31
|
+
.filter(f => f.endsWith('.md'))
|
|
32
|
+
.map(f => f.replace('.md', ''))
|
|
33
|
+
.sort();
|
|
34
|
+
|
|
35
|
+
if (allCommands.length > 0) {
|
|
36
|
+
console.log('š Available Commands:');
|
|
37
|
+
allCommands.forEach(cmd => console.log(` /${cmd}`));
|
|
38
|
+
console.log(`\nš Total: ${allCommands.length} commands`);
|
|
44
39
|
} else {
|
|
45
|
-
console.log('
|
|
40
|
+
console.log(' No commands found');
|
|
46
41
|
}
|
|
47
|
-
|
|
42
|
+
} else {
|
|
43
|
+
console.log(' Commands directory not found');
|
|
48
44
|
}
|
|
49
45
|
|
|
50
|
-
|
|
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');
|
|
62
|
-
}
|
|
63
|
-
} else {
|
|
64
|
-
console.log(' Commands directory not found');
|
|
65
|
-
}
|
|
66
|
-
console.log('');
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
console.log('š” Usage: Try /xhelp in Claude Code to see all commands');
|
|
46
|
+
console.log('\nš” Usage: Try /xhelp in Claude Code to see all commands');
|
|
70
47
|
});
|
|
71
48
|
|
|
72
49
|
program
|
|
73
50
|
.command('install')
|
|
74
|
-
.description('Install command sets')
|
|
75
|
-
.option('--active', 'Install
|
|
76
|
-
.option('--
|
|
77
|
-
.option('--all', 'Install
|
|
78
|
-
.
|
|
51
|
+
.description('Install command sets to ~/.claude/commands/')
|
|
52
|
+
.option('--active', 'Install production-ready commands (default)')
|
|
53
|
+
.option('--experiments', 'Install experimental commands only')
|
|
54
|
+
.option('--all', 'Install both active and experimental')
|
|
55
|
+
.option('--include <pattern>', 'Include specific commands matching pattern')
|
|
56
|
+
.option('--exclude <pattern>', 'Exclude commands matching pattern')
|
|
57
|
+
.option('--dry-run', 'Show what would be installed without making changes')
|
|
58
|
+
.option('--backup', 'Create backup before installation')
|
|
59
|
+
.action(async (options) => {
|
|
79
60
|
const installer = require('../lib/installer');
|
|
80
|
-
|
|
61
|
+
try {
|
|
62
|
+
const result = await installer.install(options);
|
|
63
|
+
if (!result.success && !result.dryRun) {
|
|
64
|
+
process.exit(1);
|
|
65
|
+
}
|
|
66
|
+
} catch (error) {
|
|
67
|
+
console.error(`Installation failed: ${error.message}`);
|
|
68
|
+
process.exit(1);
|
|
69
|
+
}
|
|
81
70
|
});
|
|
82
71
|
|
|
83
72
|
program
|
|
@@ -85,33 +74,22 @@ program
|
|
|
85
74
|
.description('Show installation status')
|
|
86
75
|
.action(() => {
|
|
87
76
|
const claudeDir = path.join(os.homedir(), '.claude', 'commands');
|
|
88
|
-
const activeDir = path.join(claudeDir, 'active');
|
|
89
|
-
const experimentalDir = path.join(claudeDir, 'experiments');
|
|
90
77
|
|
|
91
78
|
console.log('š Claude Dev Toolkit Status\n');
|
|
92
79
|
|
|
93
80
|
// Check Claude directory
|
|
94
|
-
console.log('š Installation
|
|
95
|
-
console.log(`
|
|
96
|
-
console.log(` Active commands: ${fs.existsSync(activeDir) ? 'ā
' : 'ā'} ${activeDir}`);
|
|
97
|
-
console.log(` Experimental: ${fs.existsSync(experimentalDir) ? 'ā
' : 'ā'} ${experimentalDir}\n`);
|
|
81
|
+
console.log('š Installation Path:');
|
|
82
|
+
console.log(` Commands directory: ${fs.existsSync(claudeDir) ? 'ā
' : 'ā'} ${claudeDir}\n`);
|
|
98
83
|
|
|
99
84
|
// Count commands
|
|
100
|
-
let
|
|
101
|
-
let expCount = 0;
|
|
85
|
+
let totalCount = 0;
|
|
102
86
|
|
|
103
|
-
if (fs.existsSync(
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (fs.existsSync(experimentalDir)) {
|
|
108
|
-
expCount = fs.readdirSync(experimentalDir).filter(f => f.endsWith('.md')).length;
|
|
87
|
+
if (fs.existsSync(claudeDir)) {
|
|
88
|
+
totalCount = fs.readdirSync(claudeDir).filter(f => f.endsWith('.md')).length;
|
|
109
89
|
}
|
|
110
90
|
|
|
111
91
|
console.log('š¦ Command Inventory:');
|
|
112
|
-
console.log(`
|
|
113
|
-
console.log(` Experimental commands: ${expCount}`);
|
|
114
|
-
console.log(` Total commands: ${activeCount + expCount}\n`);
|
|
92
|
+
console.log(` Total commands: ${totalCount}\n`);
|
|
115
93
|
|
|
116
94
|
// Package info
|
|
117
95
|
console.log('š Package Information:');
|
|
@@ -119,13 +97,234 @@ program
|
|
|
119
97
|
console.log(` CLI Location: ${process.argv[1]}\n`);
|
|
120
98
|
|
|
121
99
|
// Quick health check
|
|
122
|
-
const isHealthy = fs.existsSync(claudeDir) &&
|
|
100
|
+
const isHealthy = fs.existsSync(claudeDir) && totalCount > 0;
|
|
123
101
|
console.log(`š Overall Status: ${isHealthy ? 'ā
Healthy' : 'ā ļø Issues detected'}`);
|
|
124
102
|
|
|
125
103
|
if (!isHealthy) {
|
|
126
104
|
console.log('\nš” Troubleshooting:');
|
|
127
|
-
console.log(' ⢠Try: npm install -g claude-dev-toolkit');
|
|
128
|
-
console.log(' ⢠Or reinstall
|
|
105
|
+
console.log(' ⢠Try: npm install -g @paulduvall/claude-dev-toolkit');
|
|
106
|
+
console.log(' ⢠Or reinstall: claude-commands install --all');
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
program
|
|
111
|
+
.command('subagents')
|
|
112
|
+
.description('Manage AI subagents for Claude Code')
|
|
113
|
+
.option('-l, --list', 'List available subagents')
|
|
114
|
+
.option('-i, --install', 'Install subagents to Claude Code')
|
|
115
|
+
.action((options) => {
|
|
116
|
+
const subagents = require('../lib/subagents');
|
|
117
|
+
subagents.handleCommand(options);
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
program
|
|
121
|
+
.command('config')
|
|
122
|
+
.description('Manage Claude Code configuration templates')
|
|
123
|
+
.option('-l, --list', 'List available configuration templates')
|
|
124
|
+
.option('-t, --template <name>', 'Apply configuration template')
|
|
125
|
+
.action((options) => {
|
|
126
|
+
const config = require('../lib/config');
|
|
127
|
+
config.handleCommand(options);
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
program
|
|
131
|
+
.command('configure')
|
|
132
|
+
.description('Configure Claude Code settings (replaces configure-claude-code.sh)')
|
|
133
|
+
.option('--template <name>', 'Apply named template')
|
|
134
|
+
.option('--interactive', 'Launch interactive configuration wizard')
|
|
135
|
+
.option('--validate', 'Validate current configuration')
|
|
136
|
+
.option('--reset', 'Reset to default configuration')
|
|
137
|
+
.option('--backup', 'Create backup before changes (default: true)')
|
|
138
|
+
.option('--no-backup', 'Skip backup creation')
|
|
139
|
+
.action(async (options) => {
|
|
140
|
+
const ConfigureCommand = require('../lib/configure-command');
|
|
141
|
+
const configureCmd = new ConfigureCommand();
|
|
142
|
+
try {
|
|
143
|
+
const result = await configureCmd.execute(options);
|
|
144
|
+
if (!result.success) {
|
|
145
|
+
process.exit(1);
|
|
146
|
+
}
|
|
147
|
+
} catch (error) {
|
|
148
|
+
console.error(`Configuration failed: ${error.message}`);
|
|
149
|
+
process.exit(1);
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
program
|
|
154
|
+
.command('setup')
|
|
155
|
+
.description('Setup the Claude Dev Toolkit with custom commands and configuration')
|
|
156
|
+
.option('--type <template>', 'Configuration template to apply (basic, comprehensive, security-focused)')
|
|
157
|
+
.option('--commands <set>', 'Command set to install (active, experiments, all, none)')
|
|
158
|
+
.option('--skip-configure', 'Skip configuration step')
|
|
159
|
+
.option('--skip-hooks', 'Skip hooks installation')
|
|
160
|
+
.option('--force', 'Overwrite existing installation')
|
|
161
|
+
.option('--dry-run', 'Preview actions without executing')
|
|
162
|
+
.action(async (options) => {
|
|
163
|
+
const SetupCommand = require('../lib/setup-command');
|
|
164
|
+
const setupCmd = new SetupCommand();
|
|
165
|
+
try {
|
|
166
|
+
const result = await setupCmd.execute(options);
|
|
167
|
+
if (!result.success && !result.dryRun) {
|
|
168
|
+
process.exit(1);
|
|
169
|
+
}
|
|
170
|
+
} catch (error) {
|
|
171
|
+
console.error(`Setup failed: ${error.message}`);
|
|
172
|
+
process.exit(1);
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
program
|
|
177
|
+
.command('verify')
|
|
178
|
+
.description('Verify the Claude Dev Toolkit installation status and health')
|
|
179
|
+
.option('--verbose', 'Show detailed verification information')
|
|
180
|
+
.option('--fix', 'Attempt to fix detected issues automatically')
|
|
181
|
+
.action(async (options) => {
|
|
182
|
+
const VerifyCommand = require('../lib/verify-command');
|
|
183
|
+
const verifyCmd = new VerifyCommand();
|
|
184
|
+
try {
|
|
185
|
+
const result = await verifyCmd.execute(options);
|
|
186
|
+
// Set exit code based on health status
|
|
187
|
+
if (result.overall === 'critical') {
|
|
188
|
+
process.exit(2);
|
|
189
|
+
} else if (result.overall === 'warning') {
|
|
190
|
+
process.exit(1);
|
|
191
|
+
}
|
|
192
|
+
// Exit 0 for healthy
|
|
193
|
+
} catch (error) {
|
|
194
|
+
console.error(`Verification failed: ${error.message}`);
|
|
195
|
+
process.exit(2);
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
program
|
|
200
|
+
.command('backup [name]')
|
|
201
|
+
.description('Create named backup of Claude Code configuration')
|
|
202
|
+
.action(async (name) => {
|
|
203
|
+
const BackupRestoreCommand = require('../lib/backup-restore-command');
|
|
204
|
+
const backupCmd = new BackupRestoreCommand();
|
|
205
|
+
try {
|
|
206
|
+
const result = await backupCmd.backup(name);
|
|
207
|
+
if (!result.success) {
|
|
208
|
+
process.exit(1);
|
|
209
|
+
}
|
|
210
|
+
} catch (error) {
|
|
211
|
+
console.error(`Backup failed: ${error.message}`);
|
|
212
|
+
process.exit(1);
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
program
|
|
217
|
+
.command('restore <name>')
|
|
218
|
+
.description('Restore from a named backup')
|
|
219
|
+
.action(async (name) => {
|
|
220
|
+
const BackupRestoreCommand = require('../lib/backup-restore-command');
|
|
221
|
+
const restoreCmd = new BackupRestoreCommand();
|
|
222
|
+
try {
|
|
223
|
+
const result = await restoreCmd.restore(name);
|
|
224
|
+
if (!result.success) {
|
|
225
|
+
process.exit(1);
|
|
226
|
+
}
|
|
227
|
+
} catch (error) {
|
|
228
|
+
console.error(`Restore failed: ${error.message}`);
|
|
229
|
+
process.exit(1);
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
program
|
|
234
|
+
.command('oidc')
|
|
235
|
+
.description(`Configure GitHub Actions OIDC (OpenID Connect) integration with AWS
|
|
236
|
+
|
|
237
|
+
šÆ WHAT IT DOES:
|
|
238
|
+
⢠Creates GitHub OIDC identity provider in AWS
|
|
239
|
+
⢠Sets up IAM role with trust policy for GitHub Actions
|
|
240
|
+
⢠Configures repository variables for secure AWS access
|
|
241
|
+
⢠Enables passwordless authentication from GitHub to AWS
|
|
242
|
+
|
|
243
|
+
š PREREQUISITES (REQUIRED):
|
|
244
|
+
⢠AWS CLI installed and configured (aws configure)
|
|
245
|
+
⢠GitHub CLI authenticated (gh auth login)
|
|
246
|
+
⢠Git repository with GitHub remote origin
|
|
247
|
+
⢠AWS account with IAM permissions
|
|
248
|
+
|
|
249
|
+
āļø WHAT IT CREATES:
|
|
250
|
+
⢠AWS OIDC Identity Provider for GitHub
|
|
251
|
+
⢠IAM Role for GitHub Actions (with trust policy)
|
|
252
|
+
⢠IAM policies for AWS resource access
|
|
253
|
+
⢠GitHub repository variables (AWS_DEPLOYMENT_ROLE, AWS_REGION)
|
|
254
|
+
|
|
255
|
+
š BASIC USAGE:
|
|
256
|
+
⢠claude-commands oidc # Auto-detect settings
|
|
257
|
+
⢠claude-commands oidc --dry-run # Preview without changes
|
|
258
|
+
⢠claude-commands oidc --region us-west-2 # Specify AWS region`)
|
|
259
|
+
.option('--region <region>', 'AWS region for OIDC setup', 'us-east-1')
|
|
260
|
+
.option('--role-name <name>', 'IAM role name for GitHub Actions', 'GitHubActionsRole')
|
|
261
|
+
.option('--repository-path <path>', 'Path to repository for OIDC setup (auto-detected)', process.cwd())
|
|
262
|
+
.option('--dry-run', 'Preview actions without making changes (SAFE to run)')
|
|
263
|
+
.option('--verbose', 'Show detailed output during execution')
|
|
264
|
+
.action(async (options) => {
|
|
265
|
+
const OidcCommand = require('../lib/oidc-command');
|
|
266
|
+
const oidcCmd = new OidcCommand();
|
|
267
|
+
try {
|
|
268
|
+
const result = await oidcCmd.execute(options);
|
|
269
|
+
if (result.success) {
|
|
270
|
+
if (result.message) {
|
|
271
|
+
console.log(result.message);
|
|
272
|
+
}
|
|
273
|
+
if (options.verbose && result.duration) {
|
|
274
|
+
console.log(`ā
Completed in ${result.duration}ms`);
|
|
275
|
+
}
|
|
276
|
+
} else {
|
|
277
|
+
console.error(`ā OIDC setup failed: ${result.error || 'Unknown error'}`);
|
|
278
|
+
if (result.enhancedError && result.enhancedError.suggestions) {
|
|
279
|
+
result.enhancedError.suggestions.forEach(suggestion => {
|
|
280
|
+
console.log(suggestion);
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
process.exit(1);
|
|
284
|
+
}
|
|
285
|
+
} catch (error) {
|
|
286
|
+
console.error(`ā OIDC setup failed: ${error.message}`);
|
|
287
|
+
process.exit(1);
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
program
|
|
292
|
+
.command('update')
|
|
293
|
+
.description('Check for package updates')
|
|
294
|
+
.action(async () => {
|
|
295
|
+
const { version } = require('../package.json');
|
|
296
|
+
console.log('š Checking for updates...\n');
|
|
297
|
+
console.log(`Current version: ${version}`);
|
|
298
|
+
|
|
299
|
+
try {
|
|
300
|
+
const { execSync } = require('child_process');
|
|
301
|
+
const output = execSync('npm view @paulduvall/claude-dev-toolkit version', {
|
|
302
|
+
encoding: 'utf8',
|
|
303
|
+
stdio: 'pipe'
|
|
304
|
+
}).trim();
|
|
305
|
+
|
|
306
|
+
console.log(`Latest version: ${output}`);
|
|
307
|
+
|
|
308
|
+
if (output !== version) {
|
|
309
|
+
console.log('\nš Update available!');
|
|
310
|
+
console.log('\nTo update, run:');
|
|
311
|
+
console.log(' npm update -g @paulduvall/claude-dev-toolkit');
|
|
312
|
+
|
|
313
|
+
// Check for breaking changes in major version
|
|
314
|
+
const currentMajor = parseInt(version.split('.')[0]);
|
|
315
|
+
const latestMajor = parseInt(output.split('.')[0]);
|
|
316
|
+
|
|
317
|
+
if (latestMajor > currentMajor) {
|
|
318
|
+
console.log('\nā ļø Major version update - may contain breaking changes');
|
|
319
|
+
console.log(' Review release notes before updating');
|
|
320
|
+
}
|
|
321
|
+
} else {
|
|
322
|
+
console.log('\nā
You are using the latest version');
|
|
323
|
+
}
|
|
324
|
+
} catch (error) {
|
|
325
|
+
console.error('ā Could not check for updates');
|
|
326
|
+
console.log(' Please check your internet connection');
|
|
327
|
+
process.exit(1);
|
|
129
328
|
}
|
|
130
329
|
});
|
|
131
330
|
|