@localtech/claude-code-toolkit 1.0.0
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 +421 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +166 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/install.d.ts +8 -0
- package/dist/commands/install.d.ts.map +1 -0
- package/dist/commands/install.js +183 -0
- package/dist/commands/install.js.map +1 -0
- package/dist/commands/list.d.ts +2 -0
- package/dist/commands/list.d.ts.map +1 -0
- package/dist/commands/list.js +134 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/template.d.ts +2 -0
- package/dist/commands/template.d.ts.map +1 -0
- package/dist/commands/template.js +281 -0
- package/dist/commands/template.js.map +1 -0
- package/dist/commands/update.d.ts +2 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +20 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/package.json +64 -0
package/README.md
ADDED
|
@@ -0,0 +1,421 @@
|
|
|
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 in Existing Project
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Install globally
|
|
41
|
+
npm install -g claude-code-toolkit
|
|
42
|
+
|
|
43
|
+
# Install in current project
|
|
44
|
+
claude-toolkit install
|
|
45
|
+
|
|
46
|
+
# Set up hooks
|
|
47
|
+
.claude/hooks/hook-manager.sh setup
|
|
48
|
+
.claude/hooks/hook-manager.sh install
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Option 2: Create New Project with Toolkit
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Install globally
|
|
55
|
+
npm install -g claude-code-toolkit
|
|
56
|
+
|
|
57
|
+
# Create new React project
|
|
58
|
+
claude-toolkit template my-awesome-app --type react
|
|
59
|
+
|
|
60
|
+
# Create new Node.js API
|
|
61
|
+
claude-toolkit template my-api --type node
|
|
62
|
+
|
|
63
|
+
# Create new Python service
|
|
64
|
+
claude-toolkit template my-service --type python
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Option 3: Manual Setup (Copy & Paste)
|
|
68
|
+
|
|
69
|
+
If you prefer manual setup, copy the `.claude` directory from this repository to any project root.
|
|
70
|
+
|
|
71
|
+
## š Detailed Setup Guide
|
|
72
|
+
|
|
73
|
+
### Step 1: Install the Toolkit
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Install globally (recommended)
|
|
77
|
+
npm install -g claude-code-toolkit
|
|
78
|
+
|
|
79
|
+
# Or install locally in a project
|
|
80
|
+
npm install claude-code-toolkit --save-dev
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Step 2: Install in Your Project
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Navigate to your project
|
|
87
|
+
cd your-project-directory
|
|
88
|
+
|
|
89
|
+
# Install Claude Code toolkit
|
|
90
|
+
claude-toolkit install
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
This creates:
|
|
94
|
+
```
|
|
95
|
+
your-project/
|
|
96
|
+
āāā .claude/
|
|
97
|
+
ā āāā AGENTS.md # Agent configurations
|
|
98
|
+
ā āāā CLAUDE.md # Global settings
|
|
99
|
+
ā āāā skills/ # Reusable skills
|
|
100
|
+
ā āāā hooks/ # Automation scripts
|
|
101
|
+
ā āāā memory/ # Project knowledge
|
|
102
|
+
āāā [your project files]
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Step 3: Upload Skills to Claude
|
|
106
|
+
|
|
107
|
+
1. Go to [claude.ai/settings](https://claude.ai/settings)
|
|
108
|
+
2. Click **Skills** in the left sidebar
|
|
109
|
+
3. Click **Upload skill** for each `.zip` file created:
|
|
110
|
+
- `mobile-ui-ux-master.zip`
|
|
111
|
+
- `professional-documentation-writer.zip`
|
|
112
|
+
- `claude-code-hooks-master.zip`
|
|
113
|
+
- `persistent-memory-system.zip`
|
|
114
|
+
|
|
115
|
+
### Step 4: Set Up Automation Hooks
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# Make hooks executable
|
|
119
|
+
.claude/hooks/hook-manager.sh setup
|
|
120
|
+
|
|
121
|
+
# Install Git hooks for automatic execution
|
|
122
|
+
.claude/hooks/hook-manager.sh install
|
|
123
|
+
|
|
124
|
+
# Test that everything works
|
|
125
|
+
.claude/hooks/hook-manager.sh test
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Step 5: Start Developing with AI Enhancement
|
|
129
|
+
|
|
130
|
+
Now you can use natural language commands like:
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
> Create a professional README for this project
|
|
134
|
+
> Review this React component for mobile responsiveness
|
|
135
|
+
> Generate unit tests for the user authentication module
|
|
136
|
+
> Debug why this API endpoint is failing
|
|
137
|
+
> Research the best practices for state management
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## šÆ Key Features Explained
|
|
141
|
+
|
|
142
|
+
### Intelligent Agent Assignment
|
|
143
|
+
The toolkit automatically routes your requests to the most appropriate agent:
|
|
144
|
+
|
|
145
|
+
- **"Review this code"** ā `code-reviewer` agent
|
|
146
|
+
- **"Write documentation"** ā `doc-writer` agent
|
|
147
|
+
- **"Make this mobile-friendly"** ā `mobile-ui-specialist` agent
|
|
148
|
+
- **"Debug this issue"** ā `debugger` agent
|
|
149
|
+
- **"Research this technology"** ā `researcher` agent
|
|
150
|
+
|
|
151
|
+
### Skill-Based Consistency
|
|
152
|
+
Skills ensure consistent, professional results:
|
|
153
|
+
|
|
154
|
+
- **Mobile UI/UX**: Eliminates card height mismatches, text overflow, padding inconsistencies
|
|
155
|
+
- **Documentation**: Creates comprehensive, well-structured docs
|
|
156
|
+
- **Memory**: Maintains project context across sessions
|
|
157
|
+
|
|
158
|
+
### Automated Quality Assurance
|
|
159
|
+
Hooks run automatically to maintain code quality:
|
|
160
|
+
|
|
161
|
+
- **Pre-commit**: Catches issues before they enter version control
|
|
162
|
+
- **Post-commit**: Updates docs, logs decisions, sends notifications
|
|
163
|
+
- **Pre-push**: Validates deployment readiness
|
|
164
|
+
- **Continuous**: Learns from your patterns to suggest improvements
|
|
165
|
+
|
|
166
|
+
## š§ CLI Commands
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
# Install toolkit in current project
|
|
170
|
+
claude-toolkit install
|
|
171
|
+
|
|
172
|
+
# Create new project with toolkit pre-installed
|
|
173
|
+
claude-toolkit template <name> [--type react|vue|node|python]
|
|
174
|
+
|
|
175
|
+
# List all available components
|
|
176
|
+
claude-toolkit list
|
|
177
|
+
|
|
178
|
+
# Update toolkit to latest version
|
|
179
|
+
claude-toolkit update
|
|
180
|
+
|
|
181
|
+
# Diagnose installation and health
|
|
182
|
+
claude-toolkit doctor
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## š Project Types Supported
|
|
186
|
+
|
|
187
|
+
### React Applications
|
|
188
|
+
```bash
|
|
189
|
+
claude-toolkit template my-react-app --type react
|
|
190
|
+
```
|
|
191
|
+
- Includes styled-components setup
|
|
192
|
+
- Mobile-first responsive components
|
|
193
|
+
- TypeScript configuration
|
|
194
|
+
- Testing framework ready
|
|
195
|
+
|
|
196
|
+
### Vue.js Applications
|
|
197
|
+
```bash
|
|
198
|
+
claude-toolkit template my-vue-app --type vue
|
|
199
|
+
```
|
|
200
|
+
- Vue 3 with Composition API
|
|
201
|
+
- Mobile-optimized components
|
|
202
|
+
- TypeScript support
|
|
203
|
+
- Vue testing utilities
|
|
204
|
+
|
|
205
|
+
### Node.js APIs
|
|
206
|
+
```bash
|
|
207
|
+
claude-toolkit template my-api --type node
|
|
208
|
+
```
|
|
209
|
+
- Express.js setup
|
|
210
|
+
- API documentation generation
|
|
211
|
+
- Testing with Jest
|
|
212
|
+
- Security middleware
|
|
213
|
+
|
|
214
|
+
### Python Services
|
|
215
|
+
```bash
|
|
216
|
+
claude-toolkit template my-service --type python
|
|
217
|
+
```
|
|
218
|
+
- FastAPI framework
|
|
219
|
+
- Automatic API documentation
|
|
220
|
+
- Pytest for testing
|
|
221
|
+
- Type hints and validation
|
|
222
|
+
|
|
223
|
+
## š§ Memory System
|
|
224
|
+
|
|
225
|
+
The toolkit includes an intelligent memory system that learns from your development patterns:
|
|
226
|
+
|
|
227
|
+
### Decisions Tracking
|
|
228
|
+
Logs architectural decisions with rationale:
|
|
229
|
+
```
|
|
230
|
+
## 2025-12-22 - Tech Stack Choice
|
|
231
|
+
**Decision**: Use React with TypeScript for better type safety
|
|
232
|
+
**Context**: Starting new web application
|
|
233
|
+
**Rationale**: Type safety reduces runtime errors
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### Learning Accumulation
|
|
237
|
+
Captures insights and patterns:
|
|
238
|
+
```
|
|
239
|
+
## 2025-12-22 - Component Architecture
|
|
240
|
+
**Insight**: Container/presentational pattern improves testability
|
|
241
|
+
**Context**: Refactoring authentication components
|
|
242
|
+
**Application**: Use consistently across all feature modules
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Context Awareness
|
|
246
|
+
Maintains current project state:
|
|
247
|
+
```
|
|
248
|
+
## Current Status
|
|
249
|
+
- Phase: Development
|
|
250
|
+
- Focus: User authentication
|
|
251
|
+
- Next: Payment integration
|
|
252
|
+
- Blockers: API rate limiting
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
## š Workflow Integration
|
|
256
|
+
|
|
257
|
+
### Git Workflow Enhancement
|
|
258
|
+
```bash
|
|
259
|
+
# Traditional workflow
|
|
260
|
+
git add .
|
|
261
|
+
git commit -m "Add feature"
|
|
262
|
+
git push
|
|
263
|
+
|
|
264
|
+
# Enhanced workflow (automatic)
|
|
265
|
+
git add .
|
|
266
|
+
git commit -m "Add user authentication" # Hooks run automatically
|
|
267
|
+
# ā Code quality checks pass
|
|
268
|
+
# ā Documentation updated
|
|
269
|
+
# ā Memory system logs decision
|
|
270
|
+
# ā Team notifications sent
|
|
271
|
+
git push # Deployment validation runs
|
|
272
|
+
# ā Security checks pass
|
|
273
|
+
# ā Build verification succeeds
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### CI/CD Integration
|
|
277
|
+
The hooks system integrates seamlessly with existing CI/CD:
|
|
278
|
+
|
|
279
|
+
- **Local validation** before pushing to remote
|
|
280
|
+
- **Consistent standards** across team members
|
|
281
|
+
- **Early issue detection** reduces CI failures
|
|
282
|
+
- **Automated deployment prep** ensures smooth releases
|
|
283
|
+
|
|
284
|
+
## šØ Customization
|
|
285
|
+
|
|
286
|
+
### Agent Configuration
|
|
287
|
+
Edit `.claude/AGENTS.md` to customize agent behaviors:
|
|
288
|
+
|
|
289
|
+
```markdown
|
|
290
|
+
## custom-agent
|
|
291
|
+
**Name**: custom-agent
|
|
292
|
+
**Description**: Your specialized agent
|
|
293
|
+
**Tools**: custom tools
|
|
294
|
+
**Triggers**: When you say "custom task"
|
|
295
|
+
**Instructions**: Your specific instructions
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
### Skill Development
|
|
299
|
+
Create new skills in `.claude/skills/your-skill/`:
|
|
300
|
+
|
|
301
|
+
```
|
|
302
|
+
your-skill/
|
|
303
|
+
āāā SKILL.md # Skill definition
|
|
304
|
+
āāā templates/ # Reusable templates
|
|
305
|
+
āāā scripts/ # Helper scripts
|
|
306
|
+
āāā examples/ # Usage examples
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### Hook Customization
|
|
310
|
+
Modify hooks in `.claude/hooks/` to match your workflow:
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
# Customize quality checks
|
|
314
|
+
edit .claude/hooks/pre-commit/code-quality-guardian.sh
|
|
315
|
+
|
|
316
|
+
# Modify notification settings
|
|
317
|
+
edit .claude/hooks/post-commit/smart-automations.sh
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
## š Security & Privacy
|
|
321
|
+
|
|
322
|
+
### Local Execution
|
|
323
|
+
- All processing happens locally
|
|
324
|
+
- No code sent to external servers
|
|
325
|
+
- Claude.ai integration respects your privacy settings
|
|
326
|
+
|
|
327
|
+
### Secure Hooks
|
|
328
|
+
- Hooks run with minimal permissions
|
|
329
|
+
- No sensitive data logged
|
|
330
|
+
- Configurable security scanning
|
|
331
|
+
- Safe automation practices
|
|
332
|
+
|
|
333
|
+
## š Performance Optimization
|
|
334
|
+
|
|
335
|
+
### Hook Performance
|
|
336
|
+
- Pre-commit: < 10 seconds (developer experience)
|
|
337
|
+
- Pre-push: < 30 seconds (deployment safety)
|
|
338
|
+
- Post-commit: < 60 seconds (background tasks)
|
|
339
|
+
|
|
340
|
+
### Caching Strategies
|
|
341
|
+
- Dependency analysis caching
|
|
342
|
+
- Build artifact reuse
|
|
343
|
+
- Incremental validation
|
|
344
|
+
- Smart test selection
|
|
345
|
+
|
|
346
|
+
## š Troubleshooting
|
|
347
|
+
|
|
348
|
+
### Common Issues
|
|
349
|
+
|
|
350
|
+
**Hooks not running:**
|
|
351
|
+
```bash
|
|
352
|
+
# Check Git hooks installation
|
|
353
|
+
.claude/hooks/hook-manager.sh status
|
|
354
|
+
|
|
355
|
+
# Reinstall hooks
|
|
356
|
+
.claude/hooks/hook-manager.sh install
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
**Skills not available:**
|
|
360
|
+
```bash
|
|
361
|
+
# Check skill uploads
|
|
362
|
+
claude-toolkit doctor
|
|
363
|
+
|
|
364
|
+
# Re-upload skills to Claude.ai
|
|
365
|
+
# Visit https://claude.ai/settings ā Skills
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
**Memory system not working:**
|
|
369
|
+
```bash
|
|
370
|
+
# Check memory directory
|
|
371
|
+
ls -la .claude/memory/
|
|
372
|
+
|
|
373
|
+
# Reset memory system
|
|
374
|
+
rm -rf .claude/memory/
|
|
375
|
+
claude-toolkit install --force
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
### Getting Help
|
|
379
|
+
|
|
380
|
+
1. **Run diagnostics**: `claude-toolkit doctor`
|
|
381
|
+
2. **Check logs**: Look in `.claude/hooks/logs/`
|
|
382
|
+
3. **Test components**: `claude-toolkit list`
|
|
383
|
+
4. **Update toolkit**: `claude-toolkit update`
|
|
384
|
+
|
|
385
|
+
## š¤ Contributing
|
|
386
|
+
|
|
387
|
+
### Adding New Skills
|
|
388
|
+
1. Create skill directory: `.claude/skills/new-skill/`
|
|
389
|
+
2. Add `SKILL.md` with metadata and instructions
|
|
390
|
+
3. Test with: `claude-toolkit doctor`
|
|
391
|
+
4. Submit via GitHub template repository
|
|
392
|
+
|
|
393
|
+
### Improving Agents
|
|
394
|
+
1. Edit `.claude/AGENTS.md`
|
|
395
|
+
2. Test agent responses
|
|
396
|
+
3. Document improvements
|
|
397
|
+
4. Share with community
|
|
398
|
+
|
|
399
|
+
### Enhancing Hooks
|
|
400
|
+
1. Modify hook scripts in `.claude/hooks/`
|
|
401
|
+
2. Test with: `.claude/hooks/hook-manager.sh test`
|
|
402
|
+
3. Ensure performance requirements
|
|
403
|
+
4. Document changes
|
|
404
|
+
|
|
405
|
+
## š License
|
|
406
|
+
|
|
407
|
+
MIT License - See [LICENSE](LICENSE) for details.
|
|
408
|
+
|
|
409
|
+
## š Acknowledgments
|
|
410
|
+
|
|
411
|
+
- Built for the Claude Code community
|
|
412
|
+
- Inspired by modern development workflows
|
|
413
|
+
- Designed for productivity and consistency
|
|
414
|
+
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
**š Ready to supercharge your development workflow?**
|
|
418
|
+
|
|
419
|
+
Start with: `npm install -g claude-code-toolkit && claude-toolkit install`
|
|
420
|
+
|
|
421
|
+
Then experience AI-enhanced development like never before! š
|
package/dist/cli.d.ts
ADDED
|
@@ -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,166 @@
|
|
|
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.0');
|
|
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
|
|
144
|
+
const agentsFile = path.join(claudeDir, '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 hooks
|
|
152
|
+
const hooksDir = path.join(claudeDir, 'hooks');
|
|
153
|
+
if (fs.existsSync(hooksDir)) {
|
|
154
|
+
console.log(chalk_1.default.green('ā
Hooks directory found'));
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
console.log(chalk_1.default.yellow('ā ļø Hooks directory not found'));
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
console.log(chalk_1.default.red('ā .claude directory not found'));
|
|
162
|
+
console.log('Run "claude-toolkit install" to set up the toolkit');
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
program.parse();
|
|
166
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,yCAAoC;A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