claude-code-toolkit 1.0.7

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 (46) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +476 -0
  3. package/dist/cli.d.ts +3 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +183 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/commands/install.d.ts +8 -0
  8. package/dist/commands/install.d.ts.map +1 -0
  9. package/dist/commands/install.js +184 -0
  10. package/dist/commands/install.js.map +1 -0
  11. package/dist/commands/list.d.ts +2 -0
  12. package/dist/commands/list.d.ts.map +1 -0
  13. package/dist/commands/list.js +134 -0
  14. package/dist/commands/list.js.map +1 -0
  15. package/dist/commands/template.d.ts +2 -0
  16. package/dist/commands/template.d.ts.map +1 -0
  17. package/dist/commands/template.js +299 -0
  18. package/dist/commands/template.js.map +1 -0
  19. package/dist/commands/update.d.ts +2 -0
  20. package/dist/commands/update.d.ts.map +1 -0
  21. package/dist/commands/update.js +21 -0
  22. package/dist/commands/update.js.map +1 -0
  23. package/dist/index.d.ts +7 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +19 -0
  26. package/dist/index.js.map +1 -0
  27. package/package.json +65 -0
  28. package/templates/.claude/hooks/README.md +342 -0
  29. package/templates/.claude/hooks/custom/intelligent-workflows.sh +336 -0
  30. package/templates/.claude/hooks/hook-manager.sh +300 -0
  31. package/templates/.claude/hooks/post-commit/smart-automations.sh +249 -0
  32. package/templates/.claude/hooks/pre-commit/code-quality-guardian.sh +257 -0
  33. package/templates/.claude/hooks/pre-push/deployment-guardian.sh +334 -0
  34. package/templates/.claude/memory/context.md +39 -0
  35. package/templates/.claude/memory/decisions.md +29 -0
  36. package/templates/.claude/memory/learnings.md +31 -0
  37. package/templates/.claude/memory/patterns.md +72 -0
  38. package/templates/.claude/memory/preferences.md +23 -0
  39. package/templates/.claude/skills/claude-code-hooks-master/SKILL.md +358 -0
  40. package/templates/.claude/skills/mobile-ui-ux-master/MobileCardGrid.tsx +270 -0
  41. package/templates/.claude/skills/mobile-ui-ux-master/SKILL.md +172 -0
  42. package/templates/.claude/skills/mobile-ui-ux-master/card-grid-template.html +260 -0
  43. package/templates/.claude/skills/mobile-ui-ux-master/mobile-ux-checklist.md +140 -0
  44. package/templates/.claude/skills/professional-documentation-writer/SKILL.md +42 -0
  45. package/templates/AGENTS.md +127 -0
  46. package/templates/CLAUDE.md +101 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Carlos Fadhel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,476 @@
1
+ # Claude Code Toolkit
2
+
3
+ šŸš€ **Portable AI-Enhanced Development Environment**
4
+
5
+ Transform any project into a professional, AI-powered development workspace with specialized agents, reusable skills, automated hooks, and intelligent workflows.
6
+
7
+ ## ✨ What's Included
8
+
9
+ ### šŸ¤– **Specialized AI Agents**
10
+ - **code-reviewer**: Automated code quality and security analysis
11
+ - **doc-writer**: Professional documentation generation
12
+ - **test-generator**: Comprehensive test suite creation
13
+ - **debugger**: Systematic debugging assistance
14
+ - **researcher**: Technical research and insights
15
+ - **mobile-ui-specialist**: Professional mobile UI/UX development
16
+
17
+ ### šŸ› ļø **Reusable Skills**
18
+ - **professional-documentation-writer**: Creates comprehensive project docs
19
+ - **mobile-ui-ux-master**: Eliminates layout and consistency issues
20
+ - **claude-code-hooks-master**: Automation and workflow enhancement
21
+ - **persistent-memory-system**: Project knowledge management
22
+
23
+ ### šŸ”„ **Automated Hooks**
24
+ - **Pre-commit**: Code quality checks, linting, type checking
25
+ - **Post-commit**: Documentation updates, notifications, memory logging
26
+ - **Pre-push**: Deployment validation, security checks
27
+ - **Custom**: Intelligent workflow analysis and suggestions
28
+
29
+ ### 🧠 **Intelligent Memory System**
30
+ - **Decisions**: Architectural choices and rationale
31
+ - **Learnings**: Development insights and patterns
32
+ - **Preferences**: User preferences and working styles
33
+ - **Context**: Current project state and evolution
34
+
35
+ ## šŸš€ Quick Start
36
+
37
+ ### Option 1: Install from Source (Development)
38
+
39
+ ```bash
40
+ # Clone or navigate to the toolkit directory
41
+ cd claude-code-toolkit
42
+
43
+ # Install dependencies
44
+ npm install
45
+
46
+ # Build the TypeScript
47
+ npm run build
48
+
49
+ # Link globally for local development
50
+ npm link
51
+
52
+ # Now you can use claude-toolkit anywhere
53
+ claude-toolkit --version
54
+ ```
55
+
56
+ ### Option 2: Install from npm (When Published)
57
+
58
+ ```bash
59
+ # Install globally
60
+ npm install -g claude-code-toolkit
61
+
62
+ # Verify installation
63
+ claude-toolkit --version
64
+ ```
65
+
66
+ ### Option 3: Install in Existing Project
67
+
68
+ ```bash
69
+ # Navigate to your project
70
+ cd your-project
71
+
72
+ # Install toolkit
73
+ claude-toolkit install
74
+
75
+ # Set up hooks (Linux/macOS/Git Bash)
76
+ .claude/hooks/hook-manager.sh setup
77
+ .claude/hooks/hook-manager.sh install
78
+ ```
79
+
80
+ ### Option 4: Create New Project with Toolkit
81
+
82
+ ```bash
83
+ # Create new React project
84
+ claude-toolkit template my-awesome-app --type react
85
+
86
+ # Create new Node.js API
87
+ claude-toolkit template my-api --type node
88
+
89
+ # Create new Vue.js app
90
+ claude-toolkit template my-vue-app --type vue
91
+
92
+ # Create new Python service
93
+ claude-toolkit template my-service --type python
94
+ ```
95
+
96
+ ### Option 5: Manual Setup (Copy & Paste)
97
+
98
+ If you prefer manual setup, copy the `templates/.claude` directory to your project root, along with `templates/AGENTS.md` and `templates/CLAUDE.md`.
99
+
100
+ ## šŸ“¦ Publishing to npm
101
+
102
+ To publish this package to npm:
103
+
104
+ ```bash
105
+ # Login to npm (one-time)
106
+ npm login
107
+
108
+ # Build the package
109
+ npm run build
110
+
111
+ # Publish to npm
112
+ npm publish
113
+
114
+ # Or publish with public access (for scoped packages)
115
+ npm publish --access public
116
+ ```
117
+
118
+ ## šŸ“‹ Detailed Setup Guide
119
+
120
+ ### Step 1: Install the Toolkit
121
+
122
+ ```bash
123
+ # From source (development)
124
+ cd claude-code-toolkit && npm install && npm run build && npm link
125
+
126
+ # Or from npm (when published)
127
+ npm install -g claude-code-toolkit
128
+ ```
129
+
130
+ ### Step 2: Install in Your Project
131
+
132
+ ```bash
133
+ # Navigate to your project
134
+ cd your-project-directory
135
+
136
+ # Install Claude Code toolkit
137
+ claude-toolkit install
138
+ ```
139
+
140
+ This creates:
141
+ ```
142
+ your-project/
143
+ ā”œā”€ā”€ .claude/
144
+ │ ā”œā”€ā”€ AGENTS.md # Agent configurations
145
+ │ ā”œā”€ā”€ CLAUDE.md # Global settings
146
+ │ ā”œā”€ā”€ skills/ # Reusable skills
147
+ │ ā”œā”€ā”€ hooks/ # Automation scripts
148
+ │ └── memory/ # Project knowledge
149
+ └── [your project files]
150
+ ```
151
+
152
+ ### Step 3: Upload Skills to Claude
153
+
154
+ 1. Go to [claude.ai/settings](https://claude.ai/settings)
155
+ 2. Click **Skills** in the left sidebar
156
+ 3. Click **Upload skill** for each `.zip` file created:
157
+ - `mobile-ui-ux-master.zip`
158
+ - `professional-documentation-writer.zip`
159
+ - `claude-code-hooks-master.zip`
160
+ - `persistent-memory-system.zip`
161
+
162
+ ### Step 4: Set Up Automation Hooks
163
+
164
+ ```bash
165
+ # Make hooks executable
166
+ .claude/hooks/hook-manager.sh setup
167
+
168
+ # Install Git hooks for automatic execution
169
+ .claude/hooks/hook-manager.sh install
170
+
171
+ # Test that everything works
172
+ .claude/hooks/hook-manager.sh test
173
+ ```
174
+
175
+ ### Step 5: Start Developing with AI Enhancement
176
+
177
+ Now you can use natural language commands like:
178
+
179
+ ```
180
+ > Create a professional README for this project
181
+ > Review this React component for mobile responsiveness
182
+ > Generate unit tests for the user authentication module
183
+ > Debug why this API endpoint is failing
184
+ > Research the best practices for state management
185
+ ```
186
+
187
+ ## šŸŽÆ Key Features Explained
188
+
189
+ ### Intelligent Agent Assignment
190
+ The toolkit automatically routes your requests to the most appropriate agent:
191
+
192
+ - **"Review this code"** → `code-reviewer` agent
193
+ - **"Write documentation"** → `doc-writer` agent
194
+ - **"Make this mobile-friendly"** → `mobile-ui-specialist` agent
195
+ - **"Debug this issue"** → `debugger` agent
196
+ - **"Research this technology"** → `researcher` agent
197
+
198
+ ### Skill-Based Consistency
199
+ Skills ensure consistent, professional results:
200
+
201
+ - **Mobile UI/UX**: Eliminates card height mismatches, text overflow, padding inconsistencies
202
+ - **Documentation**: Creates comprehensive, well-structured docs
203
+ - **Memory**: Maintains project context across sessions
204
+
205
+ ### Automated Quality Assurance
206
+ Hooks run automatically to maintain code quality:
207
+
208
+ - **Pre-commit**: Catches issues before they enter version control
209
+ - **Post-commit**: Updates docs, logs decisions, sends notifications
210
+ - **Pre-push**: Validates deployment readiness
211
+ - **Continuous**: Learns from your patterns to suggest improvements
212
+
213
+ ## šŸ”§ CLI Commands
214
+
215
+ ```bash
216
+ # Install toolkit in current project
217
+ claude-toolkit install
218
+
219
+ # Create new project with toolkit pre-installed
220
+ claude-toolkit template <name> [--type react|vue|node|python]
221
+
222
+ # List all available components
223
+ claude-toolkit list
224
+
225
+ # Update toolkit to latest version
226
+ claude-toolkit update
227
+
228
+ # Diagnose installation and health
229
+ claude-toolkit doctor
230
+ ```
231
+
232
+ ## šŸ“Š Project Types Supported
233
+
234
+ ### React Applications
235
+ ```bash
236
+ claude-toolkit template my-react-app --type react
237
+ ```
238
+ - Includes styled-components setup
239
+ - Mobile-first responsive components
240
+ - TypeScript configuration
241
+ - Testing framework ready
242
+
243
+ ### Vue.js Applications
244
+ ```bash
245
+ claude-toolkit template my-vue-app --type vue
246
+ ```
247
+ - Vue 3 with Composition API
248
+ - Mobile-optimized components
249
+ - TypeScript support
250
+ - Vue testing utilities
251
+
252
+ ### Node.js APIs
253
+ ```bash
254
+ claude-toolkit template my-api --type node
255
+ ```
256
+ - Express.js setup
257
+ - API documentation generation
258
+ - Testing with Jest
259
+ - Security middleware
260
+
261
+ ### Python Services
262
+ ```bash
263
+ claude-toolkit template my-service --type python
264
+ ```
265
+ - FastAPI framework
266
+ - Automatic API documentation
267
+ - Pytest for testing
268
+ - Type hints and validation
269
+
270
+ ## 🧠 Memory System
271
+
272
+ The toolkit includes an intelligent memory system that learns from your development patterns:
273
+
274
+ ### Decisions Tracking
275
+ Logs architectural decisions with rationale:
276
+ ```
277
+ ## 2025-12-22 - Tech Stack Choice
278
+ **Decision**: Use React with TypeScript for better type safety
279
+ **Context**: Starting new web application
280
+ **Rationale**: Type safety reduces runtime errors
281
+ ```
282
+
283
+ ### Learning Accumulation
284
+ Captures insights and patterns:
285
+ ```
286
+ ## 2025-12-22 - Component Architecture
287
+ **Insight**: Container/presentational pattern improves testability
288
+ **Context**: Refactoring authentication components
289
+ **Application**: Use consistently across all feature modules
290
+ ```
291
+
292
+ ### Context Awareness
293
+ Maintains current project state:
294
+ ```
295
+ ## Current Status
296
+ - Phase: Development
297
+ - Focus: User authentication
298
+ - Next: Payment integration
299
+ - Blockers: API rate limiting
300
+ ```
301
+
302
+ ## šŸ”„ Workflow Integration
303
+
304
+ ### Git Workflow Enhancement
305
+ ```bash
306
+ # Traditional workflow
307
+ git add .
308
+ git commit -m "Add feature"
309
+ git push
310
+
311
+ # Enhanced workflow (automatic)
312
+ git add .
313
+ git commit -m "Add user authentication" # Hooks run automatically
314
+ # → Code quality checks pass
315
+ # → Documentation updated
316
+ # → Memory system logs decision
317
+ # → Team notifications sent
318
+ git push # Deployment validation runs
319
+ # → Security checks pass
320
+ # → Build verification succeeds
321
+ ```
322
+
323
+ ### CI/CD Integration
324
+ The hooks system integrates seamlessly with existing CI/CD:
325
+
326
+ - **Local validation** before pushing to remote
327
+ - **Consistent standards** across team members
328
+ - **Early issue detection** reduces CI failures
329
+ - **Automated deployment prep** ensures smooth releases
330
+
331
+ ## šŸŽØ Customization
332
+
333
+ ### Agent Configuration
334
+ Edit `.claude/AGENTS.md` to customize agent behaviors:
335
+
336
+ ```markdown
337
+ ## custom-agent
338
+ **Name**: custom-agent
339
+ **Description**: Your specialized agent
340
+ **Tools**: custom tools
341
+ **Triggers**: When you say "custom task"
342
+ **Instructions**: Your specific instructions
343
+ ```
344
+
345
+ ### Skill Development
346
+ Create new skills in `.claude/skills/your-skill/`:
347
+
348
+ ```
349
+ your-skill/
350
+ ā”œā”€ā”€ SKILL.md # Skill definition
351
+ ā”œā”€ā”€ templates/ # Reusable templates
352
+ ā”œā”€ā”€ scripts/ # Helper scripts
353
+ └── examples/ # Usage examples
354
+ ```
355
+
356
+ ### Hook Customization
357
+ Modify hooks in `.claude/hooks/` to match your workflow:
358
+
359
+ ```bash
360
+ # Customize quality checks
361
+ edit .claude/hooks/pre-commit/code-quality-guardian.sh
362
+
363
+ # Modify notification settings
364
+ edit .claude/hooks/post-commit/smart-automations.sh
365
+ ```
366
+
367
+ ## šŸ” Security & Privacy
368
+
369
+ ### Local Execution
370
+ - All processing happens locally
371
+ - No code sent to external servers
372
+ - Claude.ai integration respects your privacy settings
373
+
374
+ ### Secure Hooks
375
+ - Hooks run with minimal permissions
376
+ - No sensitive data logged
377
+ - Configurable security scanning
378
+ - Safe automation practices
379
+
380
+ ## šŸ“ˆ Performance Optimization
381
+
382
+ ### Hook Performance
383
+ - Pre-commit: < 10 seconds (developer experience)
384
+ - Pre-push: < 30 seconds (deployment safety)
385
+ - Post-commit: < 60 seconds (background tasks)
386
+
387
+ ### Caching Strategies
388
+ - Dependency analysis caching
389
+ - Build artifact reuse
390
+ - Incremental validation
391
+ - Smart test selection
392
+
393
+ ## šŸ› Troubleshooting
394
+
395
+ ### Common Issues
396
+
397
+ **Hooks not running:**
398
+ ```bash
399
+ # Check Git hooks installation
400
+ .claude/hooks/hook-manager.sh status
401
+
402
+ # Reinstall hooks
403
+ .claude/hooks/hook-manager.sh install
404
+ ```
405
+
406
+ **Skills not available:**
407
+ ```bash
408
+ # Check skill uploads
409
+ claude-toolkit doctor
410
+
411
+ # Re-upload skills to Claude.ai
412
+ # Visit https://claude.ai/settings → Skills
413
+ ```
414
+
415
+ **Memory system not working:**
416
+ ```bash
417
+ # Check memory directory
418
+ ls -la .claude/memory/
419
+
420
+ # Reset memory system
421
+ rm -rf .claude/memory/
422
+ claude-toolkit install --force
423
+ ```
424
+
425
+ ### Getting Help
426
+
427
+ 1. **Run diagnostics**: `claude-toolkit doctor`
428
+ 2. **Check logs**: Look in `.claude/hooks/logs/`
429
+ 3. **Test components**: `claude-toolkit list`
430
+ 4. **Update toolkit**: `claude-toolkit update`
431
+
432
+ ## šŸ¤ Contributing
433
+
434
+ ### Adding New Skills
435
+ 1. Create skill directory: `.claude/skills/new-skill/`
436
+ 2. Add `SKILL.md` with metadata and instructions
437
+ 3. Test with: `claude-toolkit doctor`
438
+ 4. Submit via GitHub template repository
439
+
440
+ ### Improving Agents
441
+ 1. Edit `.claude/AGENTS.md`
442
+ 2. Test agent responses
443
+ 3. Document improvements
444
+ 4. Share with community
445
+
446
+ ### Enhancing Hooks
447
+ 1. Modify hook scripts in `.claude/hooks/`
448
+ 2. Test with: `.claude/hooks/hook-manager.sh test`
449
+ 3. Ensure performance requirements
450
+ 4. Document changes
451
+
452
+ ## šŸ“„ License
453
+
454
+ MIT License - See [LICENSE](LICENSE) for details.
455
+
456
+ ## šŸ™ Acknowledgments
457
+
458
+ - Built for the Claude Code community
459
+ - Inspired by modern development workflows
460
+ - Designed for productivity and consistency
461
+
462
+ ---
463
+
464
+ **šŸŽ‰ Ready to supercharge your development workflow?**
465
+
466
+ **From source:**
467
+ ```bash
468
+ cd claude-code-toolkit && npm install && npm run build && npm link && claude-toolkit install
469
+ ```
470
+
471
+ **From npm (when published):**
472
+ ```bash
473
+ npm install -g claude-code-toolkit && claude-toolkit install
474
+ ```
475
+
476
+ Then experience AI-enhanced development like never before!
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/cli.js ADDED
@@ -0,0 +1,183 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __importDefault = (this && this.__importDefault) || function (mod) {
37
+ return (mod && mod.__esModule) ? mod : { "default": mod };
38
+ };
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ const commander_1 = require("commander");
41
+ const chalk_1 = __importDefault(require("chalk"));
42
+ const ora_1 = __importDefault(require("ora"));
43
+ const install_1 = require("./commands/install");
44
+ const template_1 = require("./commands/template");
45
+ const list_1 = require("./commands/list");
46
+ const update_1 = require("./commands/update");
47
+ const program = new commander_1.Command();
48
+ program
49
+ .name('claude-toolkit')
50
+ .description('Portable Claude Code toolkit with agents, skills, and hooks')
51
+ .version('1.0.7');
52
+ program
53
+ .command('install')
54
+ .description('Install Claude Code toolkit in current project')
55
+ .option('-f, --force', 'Force overwrite existing files')
56
+ .option('--no-hooks', 'Skip hook installation')
57
+ .option('--no-skills', 'Skip skill installation')
58
+ .option('--no-agents', 'Skip agent installation')
59
+ .action(async (options) => {
60
+ const spinner = (0, ora_1.default)('Installing Claude Code toolkit...').start();
61
+ try {
62
+ await (0, install_1.installToolkit)(options);
63
+ spinner.succeed(chalk_1.default.green('Claude Code toolkit installed successfully!'));
64
+ console.log('\nšŸ“‹ Next steps:');
65
+ console.log('1. Upload skills to https://claude.ai/settings → Skills');
66
+ console.log('2. Run hooks setup: .claude/hooks/hook-manager.sh setup');
67
+ console.log('3. Install git hooks: .claude/hooks/hook-manager.sh install');
68
+ }
69
+ catch (error) {
70
+ spinner.fail(chalk_1.default.red('Installation failed'));
71
+ console.error(error);
72
+ process.exit(1);
73
+ }
74
+ });
75
+ program
76
+ .command('template')
77
+ .description('Create a new project with Claude Code toolkit pre-installed')
78
+ .argument('<name>', 'Project name')
79
+ .option('-t, --type <type>', 'Project type (react, vue, node, python)', 'react')
80
+ .action(async (name, options) => {
81
+ const spinner = (0, ora_1.default)(`Creating ${options.type} project with Claude Code toolkit...`).start();
82
+ try {
83
+ await (0, template_1.createTemplate)(name, options.type);
84
+ spinner.succeed(chalk_1.default.green(`Project "${name}" created successfully!`));
85
+ console.log('\nšŸš€ Get started:');
86
+ console.log(` cd ${name}`);
87
+ console.log(' npm install');
88
+ console.log(' npm run dev');
89
+ }
90
+ catch (error) {
91
+ spinner.fail(chalk_1.default.red('Template creation failed'));
92
+ console.error(error);
93
+ process.exit(1);
94
+ }
95
+ });
96
+ program
97
+ .command('list')
98
+ .description('List available toolkit components')
99
+ .action(async () => {
100
+ try {
101
+ await (0, list_1.listComponents)();
102
+ }
103
+ catch (error) {
104
+ console.error(chalk_1.default.red('Failed to list components'), error);
105
+ process.exit(1);
106
+ }
107
+ });
108
+ program
109
+ .command('update')
110
+ .description('Update toolkit to latest version')
111
+ .action(async () => {
112
+ const spinner = (0, ora_1.default)('Updating Claude Code toolkit...').start();
113
+ try {
114
+ await (0, update_1.updateToolkit)();
115
+ spinner.succeed(chalk_1.default.green('Toolkit updated successfully!'));
116
+ }
117
+ catch (error) {
118
+ spinner.fail(chalk_1.default.red('Update failed'));
119
+ console.error(error);
120
+ process.exit(1);
121
+ }
122
+ });
123
+ program
124
+ .command('doctor')
125
+ .description('Diagnose toolkit installation and health')
126
+ .action(async () => {
127
+ console.log(chalk_1.default.blue('šŸ” Diagnosing Claude Code toolkit...\n'));
128
+ // Check if .claude directory exists
129
+ const fs = await Promise.resolve().then(() => __importStar(require('fs')));
130
+ const path = await Promise.resolve().then(() => __importStar(require('path')));
131
+ const claudeDir = path.join(process.cwd(), '.claude');
132
+ if (fs.existsSync(claudeDir)) {
133
+ console.log(chalk_1.default.green('āœ… .claude directory found'));
134
+ // Check skills
135
+ const skillsDir = path.join(claudeDir, 'skills');
136
+ if (fs.existsSync(skillsDir)) {
137
+ const skills = fs.readdirSync(skillsDir);
138
+ console.log(chalk_1.default.green(`āœ… Skills directory found (${skills.length} skills)`));
139
+ }
140
+ else {
141
+ console.log(chalk_1.default.yellow('āš ļø Skills directory not found'));
142
+ }
143
+ // Check agents (AGENTS.md is in project root, not in .claude/)
144
+ const agentsFile = path.join(process.cwd(), 'AGENTS.md');
145
+ if (fs.existsSync(agentsFile)) {
146
+ console.log(chalk_1.default.green('āœ… Agents configuration found'));
147
+ }
148
+ else {
149
+ console.log(chalk_1.default.yellow('āš ļø Agents configuration not found'));
150
+ }
151
+ // Check CLAUDE.md global config
152
+ const claudeMdFile = path.join(process.cwd(), 'CLAUDE.md');
153
+ if (fs.existsSync(claudeMdFile)) {
154
+ console.log(chalk_1.default.green('āœ… Claude global configuration found'));
155
+ }
156
+ else {
157
+ console.log(chalk_1.default.yellow('āš ļø Claude global configuration not found'));
158
+ }
159
+ // Check memory system
160
+ const memoryDir = path.join(claudeDir, 'memory');
161
+ if (fs.existsSync(memoryDir)) {
162
+ const memoryFiles = fs.readdirSync(memoryDir);
163
+ console.log(chalk_1.default.green(`āœ… Memory system found (${memoryFiles.length} files)`));
164
+ }
165
+ else {
166
+ console.log(chalk_1.default.yellow('āš ļø Memory system not found'));
167
+ }
168
+ // Check hooks
169
+ const hooksDir = path.join(claudeDir, 'hooks');
170
+ if (fs.existsSync(hooksDir)) {
171
+ console.log(chalk_1.default.green('āœ… Hooks directory found'));
172
+ }
173
+ else {
174
+ console.log(chalk_1.default.yellow('āš ļø Hooks directory not found'));
175
+ }
176
+ }
177
+ else {
178
+ console.log(chalk_1.default.red('āŒ .claude directory not found'));
179
+ console.log('Run "claude-toolkit install" to set up the toolkit');
180
+ }
181
+ });
182
+ program.parse();
183
+ //# sourceMappingURL=cli.js.map
@@ -0,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