@paulduvall/claude-dev-toolkit 0.0.1-alpha.1
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 +254 -0
- package/bin/claude-commands +132 -0
- package/lib/claude-code-compatibility.js +545 -0
- package/lib/command-selector.js +245 -0
- package/lib/config.js +182 -0
- package/lib/context-utils.js +80 -0
- package/lib/dependency-validator.js +354 -0
- package/lib/error-factory.js +394 -0
- package/lib/error-handler-utils.js +432 -0
- package/lib/error-recovery-system.js +563 -0
- package/lib/failure-recovery-installer.js +370 -0
- package/lib/hook-installer-core.js +330 -0
- package/lib/hook-installer.js +187 -0
- package/lib/hook-metadata-service.js +352 -0
- package/lib/hook-validator.js +358 -0
- package/lib/installation-configuration.js +380 -0
- package/lib/installation-instruction-generator.js +564 -0
- package/lib/installer.js +68 -0
- package/lib/package-manager-service.js +270 -0
- package/lib/permission-error-handler.js +543 -0
- package/lib/platform-utils.js +491 -0
- package/lib/setup-wizard-ui.js +245 -0
- package/lib/setup-wizard.js +355 -0
- package/lib/system-requirements-checker.js +558 -0
- package/lib/utils.js +15 -0
- package/lib/validation-utils.js +320 -0
- package/lib/version-validator-service.js +326 -0
- package/package.json +73 -0
- package/scripts/postinstall.js +182 -0
- package/scripts/validate.js +94 -0
package/README.md
ADDED
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
# Claude Dev Toolkit
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/claude-dev-toolkit)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
**Transform Claude Code into a complete development platform** with 58 AI-powered custom commands that automate your entire software development workflow.
|
|
11
|
+
|
|
12
|
+
## ๐ Quick Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
# Install globally via NPM
|
|
16
|
+
npm install -g claude-dev-toolkit
|
|
17
|
+
|
|
18
|
+
# Commands are immediately available in Claude Code
|
|
19
|
+
claude
|
|
20
|
+
/xhelp # List all available commands
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## ๐ฆ What's Included
|
|
24
|
+
|
|
25
|
+
- **13 Active Commands**: Production-ready commands for immediate use
|
|
26
|
+
- **45 Experimental Commands**: Cutting-edge features for early adopters
|
|
27
|
+
- **Security Hooks**: Automated security validation and governance
|
|
28
|
+
- **Configuration Templates**: Pre-configured settings for different workflows
|
|
29
|
+
- **Interactive Setup Wizard**: Guided installation with customization options
|
|
30
|
+
- **JavaScript Test Suite**: 100% test coverage with 10 comprehensive test suites
|
|
31
|
+
|
|
32
|
+
## ๐ฏ Quick Start
|
|
33
|
+
|
|
34
|
+
### Option 1: Automatic Setup (Recommended)
|
|
35
|
+
```bash
|
|
36
|
+
npm install -g claude-dev-toolkit
|
|
37
|
+
# Interactive setup wizard runs automatically
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Option 2: Manual Command Installation
|
|
41
|
+
```bash
|
|
42
|
+
# Install specific command sets
|
|
43
|
+
claude-commands install --active # Install 13 production commands
|
|
44
|
+
claude-commands install --experimental # Install 45 experimental commands
|
|
45
|
+
claude-commands install --all # Install all 58 commands
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Option 3: Custom Installation
|
|
49
|
+
```bash
|
|
50
|
+
claude-commands list # See all available commands
|
|
51
|
+
claude-commands status # Check installation status
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## ๐ Available Commands
|
|
55
|
+
|
|
56
|
+
### ๐ฏ **Daily Development** (Production Ready)
|
|
57
|
+
- **`/xtest`** - Smart test runner with coverage analysis
|
|
58
|
+
- **`/xquality`** - Code quality checks (format, lint, type-check)
|
|
59
|
+
- **`/xgit`** - Automated git workflow with AI-generated commits
|
|
60
|
+
- **`/xdebug`** - AI-powered debugging assistant
|
|
61
|
+
|
|
62
|
+
### ๐ **Security & Quality**
|
|
63
|
+
- **`/xsecurity`** - Comprehensive vulnerability scanning
|
|
64
|
+
- **`/xrefactor`** - Intelligent code refactoring and smell detection
|
|
65
|
+
|
|
66
|
+
### ๐๏ธ **Architecture & Planning**
|
|
67
|
+
- **`/xarchitecture`** - System design and architecture analysis
|
|
68
|
+
- **`/xspec`** - Requirements and specification generation
|
|
69
|
+
- **`/xdocs`** - Documentation generation and maintenance
|
|
70
|
+
|
|
71
|
+
### ๐ **DevOps & Deployment**
|
|
72
|
+
- **`/xpipeline`** - CI/CD pipeline optimization
|
|
73
|
+
- **`/xrelease`** - Release management automation
|
|
74
|
+
- **`/xconfig`** - Configuration management
|
|
75
|
+
- **`/xtdd`** - Test-driven development automation
|
|
76
|
+
|
|
77
|
+
### ๐งช **Experimental Commands** (45 Additional)
|
|
78
|
+
Advanced commands for specialized workflows:
|
|
79
|
+
- **Planning & Analytics**: `/xplanning`, `/xanalytics`, `/xmetrics`
|
|
80
|
+
- **Infrastructure**: `/xinfra`, `/xmonitoring`, `/xaws`
|
|
81
|
+
- **Compliance**: `/xcompliance`, `/xgovernance`, `/xpolicy`
|
|
82
|
+
- **Advanced Security**: `/xred`, `/xrisk`, `/xscan`
|
|
83
|
+
- **Performance**: `/xperformance`, `/xoptimize`
|
|
84
|
+
|
|
85
|
+
## ๐ ๏ธ CLI Usage
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# Management Commands
|
|
89
|
+
claude-commands list # List all available commands
|
|
90
|
+
claude-commands status # Show installation status
|
|
91
|
+
claude-commands install --active # Install production commands
|
|
92
|
+
claude-commands install --experimental # Install experimental commands
|
|
93
|
+
claude-commands install --all # Install all commands
|
|
94
|
+
|
|
95
|
+
# In Claude Code
|
|
96
|
+
/xhelp # Show command help
|
|
97
|
+
/xtest # Run intelligent test suite
|
|
98
|
+
/xquality fix # Auto-fix code quality issues
|
|
99
|
+
/xsecurity --scan --report # Comprehensive security scan
|
|
100
|
+
/xgit # Automated git workflow
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## ๐ง Configuration
|
|
104
|
+
|
|
105
|
+
### Installation Locations
|
|
106
|
+
- **Commands**: `~/.claude/commands/active/` and `~/.claude/commands/experiments/`
|
|
107
|
+
- **Configuration**: `~/.claude/settings.json`
|
|
108
|
+
- **Security Hooks**: `~/.claude/hooks/`
|
|
109
|
+
|
|
110
|
+
### Configuration Templates
|
|
111
|
+
The package includes three pre-configured templates:
|
|
112
|
+
|
|
113
|
+
1. **Basic** (`basic-settings.json`): Minimal setup for command functionality
|
|
114
|
+
2. **Security-Focused** (`security-focused-settings.json`): Enhanced security with hooks
|
|
115
|
+
3. **Comprehensive** (`comprehensive-settings.json`): Full feature set with governance
|
|
116
|
+
|
|
117
|
+
Templates are automatically applied during interactive setup or can be manually copied to `~/.claude/settings.json`.
|
|
118
|
+
|
|
119
|
+
## ๐งช Development & Testing
|
|
120
|
+
|
|
121
|
+
### Running Tests
|
|
122
|
+
```bash
|
|
123
|
+
# Run all test suites (100% coverage)
|
|
124
|
+
npm test
|
|
125
|
+
|
|
126
|
+
# Run specific test suites
|
|
127
|
+
npm run test:commands # Command validation
|
|
128
|
+
npm run test:workflow # Core workflow tests
|
|
129
|
+
npm run test:security # Security command tests
|
|
130
|
+
npm run test:req007 # Interactive setup wizard
|
|
131
|
+
npm run test:req009 # Configuration templates
|
|
132
|
+
npm run test:req018 # Security hook installation
|
|
133
|
+
|
|
134
|
+
# Validation and linting
|
|
135
|
+
npm run validate # Package validation
|
|
136
|
+
npm run lint # Code linting
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Test Coverage
|
|
140
|
+
- **10 Test Suites**: 100% passing
|
|
141
|
+
- **Command Validation**: All 58 commands validated
|
|
142
|
+
- **Security Tests**: Comprehensive security pattern validation
|
|
143
|
+
- **Integration Tests**: End-to-end workflow testing
|
|
144
|
+
- **Configuration Tests**: Template and setup validation
|
|
145
|
+
|
|
146
|
+
### Architecture
|
|
147
|
+
- **Symlink Consolidation**: Single source of truth with root directory
|
|
148
|
+
- **JavaScript-Based**: Migrated from Python for better Node.js integration
|
|
149
|
+
- **Modular Design**: Separate installer, config, and validation modules
|
|
150
|
+
- **Cross-Platform**: Works on macOS, Linux, and Windows
|
|
151
|
+
|
|
152
|
+
## ๐ Security Features
|
|
153
|
+
|
|
154
|
+
### Built-in Security Hooks
|
|
155
|
+
- **Credential Protection**: Prevents exposure of API keys and secrets
|
|
156
|
+
- **File Operation Logging**: Audits all AI-generated file changes
|
|
157
|
+
- **Governance Integration**: Policy enforcement and compliance checking
|
|
158
|
+
|
|
159
|
+
### Security Commands
|
|
160
|
+
- **`/xsecurity`**: Vulnerability scanning and dependency auditing
|
|
161
|
+
- **`/xred`**: Defensive security testing (experimental)
|
|
162
|
+
- **`/xcompliance`**: Automated compliance checking (experimental)
|
|
163
|
+
|
|
164
|
+
## ๐จ Troubleshooting
|
|
165
|
+
|
|
166
|
+
### Common Issues
|
|
167
|
+
```bash
|
|
168
|
+
# Commands not recognized?
|
|
169
|
+
claude-commands status # Check installation
|
|
170
|
+
claude-commands install --active # Reinstall commands
|
|
171
|
+
|
|
172
|
+
# Permission errors?
|
|
173
|
+
chmod 755 ~/.claude/commands/*.md # Fix permissions
|
|
174
|
+
|
|
175
|
+
# Missing experimental commands?
|
|
176
|
+
claude-commands install --experimental # Install experimental set
|
|
177
|
+
|
|
178
|
+
# Test failures?
|
|
179
|
+
npm test # Run full test suite
|
|
180
|
+
npm run validate # Validate package
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Validation Commands
|
|
184
|
+
```bash
|
|
185
|
+
# Repository validation (from main repo)
|
|
186
|
+
./validate-commands.sh # JavaScript-based validation
|
|
187
|
+
./verify-setup.sh # Complete setup verification
|
|
188
|
+
|
|
189
|
+
# Package validation
|
|
190
|
+
npm run validate # Package structure validation
|
|
191
|
+
npm test # Comprehensive test suite
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## ๐ Documentation
|
|
195
|
+
|
|
196
|
+
### Complete Documentation
|
|
197
|
+
- **Main Repository**: [Claude Code Custom Commands](https://github.com/PaulDuvall/claude-code)
|
|
198
|
+
- **Command Reference**: [claude-custom-commands.md](https://github.com/PaulDuvall/claude-code/blob/main/docs/claude-custom-commands.md)
|
|
199
|
+
- **Security Hooks**: [claude-code-hooks-system.md](https://github.com/PaulDuvall/claude-code/blob/main/docs/claude-code-hooks-system.md)
|
|
200
|
+
|
|
201
|
+
### Quick Reference
|
|
202
|
+
Every command includes built-in help:
|
|
203
|
+
```bash
|
|
204
|
+
/xtest help # Show all testing options
|
|
205
|
+
/xquality help # Show quality check options
|
|
206
|
+
/xsecurity help # Show security scanning options
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## ๐ค Contributing
|
|
210
|
+
|
|
211
|
+
### Development Setup
|
|
212
|
+
```bash
|
|
213
|
+
# Clone main repository
|
|
214
|
+
git clone https://github.com/PaulDuvall/claude-code.git
|
|
215
|
+
cd claude-code
|
|
216
|
+
|
|
217
|
+
# NPM package is located in claude-dev-toolkit/
|
|
218
|
+
cd claude-dev-toolkit
|
|
219
|
+
npm install
|
|
220
|
+
npm test
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Adding Commands
|
|
224
|
+
1. Create command files in root `slash-commands/active/` or `slash-commands/experiments/`
|
|
225
|
+
2. Commands automatically sync to NPM package via symlinks
|
|
226
|
+
3. Validate with `npm run test:commands`
|
|
227
|
+
4. Follow existing patterns and security guidelines
|
|
228
|
+
|
|
229
|
+
### Testing
|
|
230
|
+
- **All changes must pass 100% of tests** before merging
|
|
231
|
+
- **JavaScript test suite** provides comprehensive validation
|
|
232
|
+
- **Security-first development** - only defensive tools allowed
|
|
233
|
+
|
|
234
|
+
## ๐ Recent Updates
|
|
235
|
+
|
|
236
|
+
### Version 0.0.1-alpha.1
|
|
237
|
+
- โ
**Symlink Consolidation**: Eliminated duplicate directories
|
|
238
|
+
- โ
**JavaScript Migration**: Complete test suite migration from Python
|
|
239
|
+
- โ
**Enhanced Templates**: Fixed configuration template issues
|
|
240
|
+
- โ
**100% Test Coverage**: All 10 test suites passing
|
|
241
|
+
- โ
**58 Total Commands**: 13 active + 45 experimental commands
|
|
242
|
+
- โ
**Security Enhancements**: Comprehensive security hook system
|
|
243
|
+
|
|
244
|
+
## ๐ License
|
|
245
|
+
|
|
246
|
+
MIT ยฉ Paul Duvall
|
|
247
|
+
|
|
248
|
+
## ๐ Acknowledgments
|
|
249
|
+
|
|
250
|
+
Built for the Claude Code community to accelerate AI-powered development workflows.
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
**Ready to transform your development workflow?** Install now and experience AI-powered automation for testing, security, quality, and deployment.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Claude Commands CLI
|
|
5
|
+
* Main entry point for the claude-dev-toolkit
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const path = require('path');
|
|
9
|
+
const fs = require('fs');
|
|
10
|
+
const os = require('os');
|
|
11
|
+
const { program } = require('commander');
|
|
12
|
+
const { version, description } = require('../package.json');
|
|
13
|
+
|
|
14
|
+
program
|
|
15
|
+
.name('claude-commands')
|
|
16
|
+
.description(description)
|
|
17
|
+
.version(version);
|
|
18
|
+
|
|
19
|
+
program
|
|
20
|
+
.command('list')
|
|
21
|
+
.description('List all available commands')
|
|
22
|
+
.option('-a, --active', 'Show only active commands')
|
|
23
|
+
.option('-e, --experimental', 'Show only experimental commands')
|
|
24
|
+
.action((options) => {
|
|
25
|
+
const claudeDir = path.join(os.homedir(), '.claude', 'commands');
|
|
26
|
+
const activeDir = path.join(claudeDir, 'active');
|
|
27
|
+
const experimentalDir = path.join(claudeDir, 'experiments');
|
|
28
|
+
|
|
29
|
+
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');
|
|
43
|
+
}
|
|
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');
|
|
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');
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
program
|
|
73
|
+
.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) => {
|
|
79
|
+
const installer = require('../lib/installer');
|
|
80
|
+
installer.install(options);
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
program
|
|
84
|
+
.command('status')
|
|
85
|
+
.description('Show installation status')
|
|
86
|
+
.action(() => {
|
|
87
|
+
const claudeDir = path.join(os.homedir(), '.claude', 'commands');
|
|
88
|
+
const activeDir = path.join(claudeDir, 'active');
|
|
89
|
+
const experimentalDir = path.join(claudeDir, 'experiments');
|
|
90
|
+
|
|
91
|
+
console.log('๐ Claude Dev Toolkit Status\n');
|
|
92
|
+
|
|
93
|
+
// 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`);
|
|
98
|
+
|
|
99
|
+
// Count commands
|
|
100
|
+
let activeCount = 0;
|
|
101
|
+
let expCount = 0;
|
|
102
|
+
|
|
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;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
console.log('๐ฆ Command Inventory:');
|
|
112
|
+
console.log(` Active commands: ${activeCount}`);
|
|
113
|
+
console.log(` Experimental commands: ${expCount}`);
|
|
114
|
+
console.log(` Total commands: ${activeCount + expCount}\n`);
|
|
115
|
+
|
|
116
|
+
// Package info
|
|
117
|
+
console.log('๐ Package Information:');
|
|
118
|
+
console.log(` Version: ${version}`);
|
|
119
|
+
console.log(` CLI Location: ${process.argv[1]}\n`);
|
|
120
|
+
|
|
121
|
+
// Quick health check
|
|
122
|
+
const isHealthy = fs.existsSync(claudeDir) && (activeCount > 0 || expCount > 0);
|
|
123
|
+
console.log(`๐ Overall Status: ${isHealthy ? 'โ
Healthy' : 'โ ๏ธ Issues detected'}`);
|
|
124
|
+
|
|
125
|
+
if (!isHealthy) {
|
|
126
|
+
console.log('\n๐ก Troubleshooting:');
|
|
127
|
+
console.log(' โข Try: npm install -g claude-dev-toolkit');
|
|
128
|
+
console.log(' โข Or reinstall to refresh commands');
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
program.parse(process.argv);
|