mycontext-cli 2.0.24 → 2.0.26
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 +169 -37
- package/dist/cli.js +92 -80
- package/dist/cli.js.map +1 -1
- package/dist/commands/build-app.d.ts +6 -1
- package/dist/commands/build-app.d.ts.map +1 -1
- package/dist/commands/build-app.js +97 -9
- package/dist/commands/build-app.js.map +1 -1
- package/dist/commands/compile-prd.d.ts.map +1 -1
- package/dist/commands/compile-prd.js +7 -0
- package/dist/commands/compile-prd.js.map +1 -1
- package/dist/commands/export-progress.d.ts +34 -0
- package/dist/commands/export-progress.d.ts.map +1 -0
- package/dist/commands/export-progress.js +552 -0
- package/dist/commands/export-progress.js.map +1 -0
- package/dist/commands/generate-context-files.d.ts.map +1 -1
- package/dist/commands/generate-context-files.js +10 -2
- package/dist/commands/generate-context-files.js.map +1 -1
- package/dist/commands/generate.d.ts +8 -1
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +212 -0
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/help.d.ts +17 -0
- package/dist/commands/help.d.ts.map +1 -0
- package/dist/commands/help.js +329 -0
- package/dist/commands/help.js.map +1 -0
- package/dist/commands/import-project-plan.d.ts +27 -0
- package/dist/commands/import-project-plan.d.ts.map +1 -0
- package/dist/commands/import-project-plan.js +411 -0
- package/dist/commands/import-project-plan.js.map +1 -0
- package/dist/commands/pm-integration.d.ts +18 -0
- package/dist/commands/pm-integration.d.ts.map +1 -0
- package/dist/commands/pm-integration.js +385 -0
- package/dist/commands/pm-integration.js.map +1 -0
- package/dist/commands/setup-complete.d.ts +16 -0
- package/dist/commands/setup-complete.d.ts.map +1 -0
- package/dist/commands/setup-complete.js +468 -0
- package/dist/commands/setup-complete.js.map +1 -0
- package/dist/commands/setup-shadcn.d.ts +20 -0
- package/dist/commands/setup-shadcn.d.ts.map +1 -0
- package/dist/commands/setup-shadcn.js +241 -0
- package/dist/commands/setup-shadcn.js.map +1 -0
- package/dist/commands/suggest.d.ts +15 -0
- package/dist/commands/suggest.d.ts.map +1 -0
- package/dist/commands/suggest.js +288 -0
- package/dist/commands/suggest.js.map +1 -0
- package/dist/commands/update.d.ts +0 -4
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +7 -197
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/workflow.d.ts +16 -0
- package/dist/commands/workflow.d.ts.map +1 -0
- package/dist/commands/workflow.js +464 -0
- package/dist/commands/workflow.js.map +1 -0
- package/dist/package.json +3 -1
- package/dist/services/PMIntegrationService.d.ts +46 -0
- package/dist/services/PMIntegrationService.d.ts.map +1 -0
- package/dist/services/PMIntegrationService.js +363 -0
- package/dist/services/PMIntegrationService.js.map +1 -0
- package/dist/services/WebhookServer.d.ts +37 -0
- package/dist/services/WebhookServer.d.ts.map +1 -0
- package/dist/services/WebhookServer.js +231 -0
- package/dist/services/WebhookServer.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/pm-integration.d.ts +241 -0
- package/dist/types/pm-integration.d.ts.map +1 -0
- package/dist/types/pm-integration.js +24 -0
- package/dist/types/pm-integration.js.map +1 -0
- package/dist/utils/NextJSProjectValidator.d.ts.map +1 -1
- package/dist/utils/NextJSProjectValidator.js +14 -7
- package/dist/utils/NextJSProjectValidator.js.map +1 -1
- package/dist/utils/ProjectStateAnalyzer.d.ts +46 -0
- package/dist/utils/ProjectStateAnalyzer.d.ts.map +1 -0
- package/dist/utils/ProjectStateAnalyzer.js +311 -0
- package/dist/utils/ProjectStateAnalyzer.js.map +1 -0
- package/dist/utils/ProjectStructureValidator.d.ts +12 -0
- package/dist/utils/ProjectStructureValidator.d.ts.map +1 -1
- package/dist/utils/ProjectStructureValidator.js +111 -14
- package/dist/utils/ProjectStructureValidator.js.map +1 -1
- package/dist/utils/claudeAgentClient.d.ts +8 -0
- package/dist/utils/claudeAgentClient.d.ts.map +1 -1
- package/dist/utils/claudeAgentClient.js +101 -25
- package/dist/utils/claudeAgentClient.js.map +1 -1
- package/dist/utils/envExampleGenerator.d.ts.map +1 -1
- package/dist/utils/envExampleGenerator.js +12 -1
- package/dist/utils/envExampleGenerator.js.map +1 -1
- package/dist/utils/errorHandler.d.ts +31 -74
- package/dist/utils/errorHandler.d.ts.map +1 -1
- package/dist/utils/errorHandler.js +190 -276
- package/dist/utils/errorHandler.js.map +1 -1
- package/dist/utils/hybridAIClient.d.ts.map +1 -1
- package/dist/utils/hybridAIClient.js +48 -14
- package/dist/utils/hybridAIClient.js.map +1 -1
- package/dist/utils/mcpTools.d.ts +9 -9
- package/dist/utils/nextStepsSuggester.d.ts +52 -0
- package/dist/utils/nextStepsSuggester.d.ts.map +1 -0
- package/dist/utils/nextStepsSuggester.js +438 -0
- package/dist/utils/nextStepsSuggester.js.map +1 -0
- package/dist/utils/progress.d.ts +31 -1
- package/dist/utils/progress.d.ts.map +1 -1
- package/dist/utils/progress.js +110 -2
- package/dist/utils/progress.js.map +1 -1
- package/dist/utils/workflowEngine.d.ts +96 -0
- package/dist/utils/workflowEngine.d.ts.map +1 -0
- package/dist/utils/workflowEngine.js +793 -0
- package/dist/utils/workflowEngine.js.map +1 -0
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -1,15 +1,34 @@
|
|
|
1
|
-
# MyContext CLI
|
|
1
|
+
# MyContext CLI + mycontext PM System
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**🤖 AI-Powered Project Management + Component-First Development**
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/mycontext-cli)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
[](https://nodejs.org)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Two powerful systems in one:**
|
|
10
|
+
|
|
11
|
+
1. **🎯 mycontext PM** - Intelligent project planning, task decomposition, and real-time monitoring using Claude Agent SDK
|
|
12
|
+
2. **🎨 MyContext CLI** - Component-first development with zero-error guarantees and production-ready code generation
|
|
13
|
+
|
|
14
|
+
**Result:** From client requirements to production deployment - fully automated with AI oversight.
|
|
10
15
|
|
|
11
16
|
## 🚀 Quick Start
|
|
12
17
|
|
|
18
|
+
### **Option 1: Complete Guided Setup (⭐ Recommended for New Projects)**
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Install globally
|
|
22
|
+
npm install -g mycontext-cli
|
|
23
|
+
|
|
24
|
+
# Single command complete setup with AI guidance
|
|
25
|
+
mycontext setup-complete --interactive
|
|
26
|
+
|
|
27
|
+
# That's it! Project is ready for development.
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### **Option 2: Step-by-Step Development**
|
|
31
|
+
|
|
13
32
|
```bash
|
|
14
33
|
# Install globally
|
|
15
34
|
npm install -g mycontext-cli
|
|
@@ -20,10 +39,15 @@ mycontext init my-app
|
|
|
20
39
|
# 2. Generate context files (PRD, features, etc.)
|
|
21
40
|
mycontext generate-context-files --description "Your app idea"
|
|
22
41
|
|
|
23
|
-
# 3.
|
|
24
|
-
# 4. Compile PRD (requires approval)
|
|
42
|
+
# 3. Compile PRD (requires approval)
|
|
25
43
|
mycontext compile-prd
|
|
26
44
|
|
|
45
|
+
# 4. Generate individual components
|
|
46
|
+
mycontext generate types
|
|
47
|
+
mycontext generate brand
|
|
48
|
+
mycontext generate components-list
|
|
49
|
+
mycontext generate project-structure
|
|
50
|
+
|
|
27
51
|
# 5. Generate components with validation
|
|
28
52
|
mycontext generate-components all --with-tests
|
|
29
53
|
|
|
@@ -34,6 +58,24 @@ mycontext preview components
|
|
|
34
58
|
mycontext build-app --interactive
|
|
35
59
|
```
|
|
36
60
|
|
|
61
|
+
### **Option 3: AI-Powered Workflow Analysis**
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# Install globally
|
|
65
|
+
npm install -g mycontext-cli
|
|
66
|
+
|
|
67
|
+
# 1. AI analyzes your project requirements
|
|
68
|
+
|
|
69
|
+
# 2. AI generates contextual workflow and executes it
|
|
70
|
+
mycontext workflow generate --description "E-commerce platform with payments"
|
|
71
|
+
|
|
72
|
+
# 3. Or use interactive workflow planning
|
|
73
|
+
mycontext workflow --interactive
|
|
74
|
+
|
|
75
|
+
# 4. AI creates complete project structure with components
|
|
76
|
+
# 5. Continue development with AI-generated architecture
|
|
77
|
+
```
|
|
78
|
+
|
|
37
79
|
## 💡 Philosophy: Component-First Development
|
|
38
80
|
|
|
39
81
|
**Start Small, Scale Gradually:**
|
|
@@ -47,43 +89,96 @@ mycontext build-app --interactive
|
|
|
47
89
|
|
|
48
90
|
**Result:** Production-ready apps with 0 errors, built incrementally.
|
|
49
91
|
|
|
50
|
-
##
|
|
92
|
+
## 🏗️ System Architecture
|
|
51
93
|
|
|
52
|
-
|
|
94
|
+
```
|
|
95
|
+
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
|
|
96
|
+
│ Client Input │───▶│ mycontext PM │───▶│ MyContext CLI │
|
|
97
|
+
│ │ │ (Next.js App) │ │ │
|
|
98
|
+
│ • Requirements │ │ │ │ • Code Generation│
|
|
99
|
+
│ • Budget │ │ • Task Planning │ │ • Component │
|
|
100
|
+
│ • Timeline │ │ • Progress Mgmt │ │ Creation │
|
|
101
|
+
└─────────────────┘ │ • Real-time │ └─────────────────┘
|
|
102
|
+
│ Monitoring │
|
|
103
|
+
└─────────────────┘
|
|
104
|
+
│
|
|
105
|
+
▼
|
|
106
|
+
┌─────────────────┐
|
|
107
|
+
│ Progress Sync │
|
|
108
|
+
│ (Webhooks) │
|
|
109
|
+
└─────────────────┘
|
|
110
|
+
```
|
|
53
111
|
|
|
54
|
-
|
|
55
|
-
- **ESLint checks** with automatic fixes
|
|
56
|
-
- **Build validation** before moving forward
|
|
57
|
-
- **Automatic retries** with error context (max 3 attempts)
|
|
112
|
+
### **Data Flow:**
|
|
58
113
|
|
|
59
|
-
|
|
114
|
+
1. **Client Requirements** → mycontext PM analyzes and decomposes into structured JSON
|
|
115
|
+
2. **mycontext PM Plan** → MyContext CLI imports and generates project structure
|
|
116
|
+
3. **Code Generation** → MyContext builds production-ready components
|
|
117
|
+
4. **Progress Updates** → Real-time sync back to mycontext PM dashboard
|
|
118
|
+
5. **AI Oversight** → Continuous monitoring and intelligent suggestions
|
|
119
|
+
|
|
120
|
+
## 🎯 Key Features
|
|
60
121
|
|
|
61
|
-
|
|
62
|
-
- **JSON-to-spec conversion** for structured input
|
|
63
|
-
- **Built-in templates** for common patterns (cards, forms, buttons)
|
|
64
|
-
- **Detailed implementation guidance** with accessibility & responsive requirements
|
|
65
|
-
- **Integrated workflow** with component generation
|
|
122
|
+
### 🤖 **mycontext PM (NEW)**
|
|
66
123
|
|
|
67
|
-
|
|
124
|
+
- **Intelligent Project Planning** - AI decomposes requirements into epics, user stories, and tasks
|
|
125
|
+
- **Real-time Progress Monitoring** - Hourly checks, blocker detection, timeline adjustments
|
|
126
|
+
- **Client Brief Processing** - Parse contracts, budgets, and timelines into structured plans
|
|
127
|
+
- **Task Assignment & Tracking** - Automated task management with priority and dependency handling
|
|
128
|
+
- **Progress Synchronization** - Webhook integration for live dashboard updates
|
|
68
129
|
|
|
69
|
-
|
|
70
|
-
- **Interactive component playground**
|
|
71
|
-
- **Responsive design testing**
|
|
130
|
+
### ✅ **MyContext CLI (Component-First Development)**
|
|
72
131
|
|
|
73
|
-
|
|
132
|
+
- **Streamlined Workflow** - Single `generate architecture` command replaces 5 separate steps
|
|
133
|
+
- **Smart Next Steps** - Context-aware suggestions guide you through the development process
|
|
134
|
+
- **Zero-Error Guarantee** - TypeScript/ESLint/build validation on every component
|
|
135
|
+
- **UI Specification System** - Plain-English specs with accessibility & responsive guidance
|
|
136
|
+
- **Visual Preview** - Figma-like component board for testing
|
|
137
|
+
- **BYOK Model** - Use your own Claude/X.AI/OpenAI API keys (~$20/month)
|
|
74
138
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
-
|
|
139
|
+
### 🤖 **AI Workflow Analysis**
|
|
140
|
+
|
|
141
|
+
- **Intelligent Project Analysis** - AI understands your requirements and suggests optimal workflows
|
|
142
|
+
- **Contextual Workflow Generation** - Custom workflows tailored to your specific project needs
|
|
143
|
+
- **Component Recommendations** - AI suggests appropriate components and features
|
|
144
|
+
- **Architecture Guidance** - Recommends best tech stack and project structure
|
|
78
145
|
|
|
79
146
|
## 📋 Commands
|
|
80
147
|
|
|
81
|
-
###
|
|
148
|
+
### Complete Project Setup (⭐ NEW)
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
mycontext setup-complete --interactive # Complete guided project setup
|
|
152
|
+
mycontext setup-complete --name "MyApp" # Direct setup with options
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### AI Workflow Analysis (NEW)
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
mycontext workflow analyze # Analyze project with AI
|
|
159
|
+
mycontext workflow generate # Generate and execute workflow
|
|
160
|
+
mycontext workflow --interactive # Interactive workflow planning
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Streamlined Workflow (Recommended)
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
mycontext init <project-name> # Initialize project
|
|
167
|
+
mycontext generate-context-files # Generate PRD, features, specs
|
|
168
|
+
mycontext generate architecture # Generate complete architecture
|
|
169
|
+
mycontext build-app # Build complete application
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Traditional Component-First Workflow
|
|
82
173
|
|
|
83
174
|
```bash
|
|
84
175
|
mycontext init <project-name> # Initialize project
|
|
85
176
|
mycontext generate-context-files # Generate PRD, features, specs
|
|
86
177
|
mycontext compile-prd # Compile context into PRD
|
|
178
|
+
mycontext generate types # Generate TypeScript types
|
|
179
|
+
mycontext generate brand # Generate brand guidelines
|
|
180
|
+
mycontext generate components-list # Generate component list
|
|
181
|
+
mycontext generate project-structure # Generate project structure
|
|
87
182
|
mycontext generate-components <name|all> # Generate components
|
|
88
183
|
mycontext preview <type> # Preview components/app
|
|
89
184
|
mycontext build-app # Build complete application
|
|
@@ -196,17 +291,18 @@ mycontext refine spec RevenueCard --desc "A card showing total revenue prominent
|
|
|
196
291
|
- Desktop (> 768px): Standard spacing, maintain layout
|
|
197
292
|
```
|
|
198
293
|
|
|
199
|
-
## 🆚 MyContext vs Others
|
|
294
|
+
## 🆚 MyContext + mycontext PM vs Others
|
|
200
295
|
|
|
201
|
-
| Feature
|
|
202
|
-
|
|
|
203
|
-
| **
|
|
204
|
-
| **
|
|
205
|
-
| **
|
|
206
|
-
| **
|
|
207
|
-
| **
|
|
208
|
-
| **
|
|
209
|
-
| **
|
|
296
|
+
| Feature | MyContext + mycontext PM | Lovable | v0.dev | Bolt |
|
|
297
|
+
| ------------------------- | ------------------------ | ---------- | ----------- | ----------- |
|
|
298
|
+
| **AI Project Management** | ✅ Full System | ❌ None | ❌ None | ❌ None |
|
|
299
|
+
| **Code Location** | Your machine | Cloud | Cloud | Cloud |
|
|
300
|
+
| **End-to-End Automation** | ✅ Requirements→Deploy | ❌ Manual | ❌ Manual | ❌ Manual |
|
|
301
|
+
| **Progress Monitoring** | ✅ Real-time | ❌ None | ❌ None | ❌ None |
|
|
302
|
+
| **Validation Gates** | 12+ checkpoints | None | None | None |
|
|
303
|
+
| **TypeScript Guarantee** | 100% | No | No | No |
|
|
304
|
+
| **PM Integration** | ✅ Native | ❌ None | ❌ None | ❌ None |
|
|
305
|
+
| **Pricing** | BYOK ($0-20/mo) | $20-200/mo | Usage-based | Usage-based |
|
|
210
306
|
|
|
211
307
|
## 🐛 Troubleshooting
|
|
212
308
|
|
|
@@ -243,10 +339,44 @@ mycontext refine spec ComponentName --desc "description" --verbose
|
|
|
243
339
|
mycontext refine spec ComponentName --json-file component.json
|
|
244
340
|
```
|
|
245
341
|
|
|
342
|
+
**"PM Plan Import Failed"**
|
|
343
|
+
|
|
344
|
+
```bash
|
|
345
|
+
# Validate PM plan structure first
|
|
346
|
+
mycontext import-project-plan ./pm-plan.json --validate
|
|
347
|
+
|
|
348
|
+
# Check for required fields in PM plan
|
|
349
|
+
# Required: project.name, project.description, breakdown.tasks, myContext.framework
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
**"Progress Export Issues"**
|
|
353
|
+
|
|
354
|
+
```bash
|
|
355
|
+
# Check if project has been initialized
|
|
356
|
+
mycontext export-progress --format summary
|
|
357
|
+
|
|
358
|
+
# Ensure .mycontext directory exists with todos.json
|
|
359
|
+
ls -la .mycontext/
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
**"mycontext PM Synchronization Failed"**
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
# Test webhook connectivity
|
|
366
|
+
curl -X POST https://mycontext-pm.example.com/webhook \
|
|
367
|
+
-H "Content-Type: application/json" \
|
|
368
|
+
-d '{"test": "connection"}'
|
|
369
|
+
|
|
370
|
+
# Check webhook URL format
|
|
371
|
+
mycontext export-progress --webhook https://mycontext-pm.example.com/webhook
|
|
372
|
+
```
|
|
373
|
+
|
|
246
374
|
## 📚 Documentation
|
|
247
375
|
|
|
248
376
|
- [Getting Started](https://github.com/farajabien/mycontext-cli#quick-start)
|
|
249
|
-
- [
|
|
377
|
+
- [AI Workflow Analysis](https://github.com/farajabien/mycontext-cli#ai-workflow-analysis-new)
|
|
378
|
+
- [Component Generation](https://github.com/farajabien/mycontext-cli#traditional-component-first-workflow)
|
|
379
|
+
- [System Architecture](https://github.com/farajabien/mycontext-cli#system-architecture)
|
|
250
380
|
- [Build Strategies](https://github.com/farajabien/mycontext-cli#philosophy-component-first-development)
|
|
251
381
|
|
|
252
382
|
## 🤝 Contributing
|
|
@@ -259,4 +389,6 @@ MIT © MyContext
|
|
|
259
389
|
|
|
260
390
|
---
|
|
261
391
|
|
|
392
|
+
**🤖 The future of AI-powered development: From requirements to production with mycontext PM oversight.**
|
|
393
|
+
|
|
262
394
|
**Built by developers, for developers. Your code stays on your machine.** 🚀
|
package/dist/cli.js
CHANGED
|
@@ -31,6 +31,14 @@ const sanitize_1 = require("./commands/sanitize");
|
|
|
31
31
|
const setup_database_1 = require("./commands/setup-database");
|
|
32
32
|
const setup_instantdb_1 = require("./commands/setup-instantdb");
|
|
33
33
|
const setup_mcp_1 = require("./commands/setup-mcp");
|
|
34
|
+
const setup_shadcn_1 = require("./commands/setup-shadcn");
|
|
35
|
+
const setup_complete_1 = require("./commands/setup-complete");
|
|
36
|
+
const import_project_plan_1 = require("./commands/import-project-plan");
|
|
37
|
+
const export_progress_1 = require("./commands/export-progress");
|
|
38
|
+
const pm_integration_1 = require("./commands/pm-integration");
|
|
39
|
+
const help_1 = require("./commands/help");
|
|
40
|
+
const suggest_1 = require("./commands/suggest");
|
|
41
|
+
const workflow_1 = require("./commands/workflow");
|
|
34
42
|
const generate_context_files_1 = require("./commands/generate-context-files");
|
|
35
43
|
const compile_prd_1 = require("./commands/compile-prd");
|
|
36
44
|
const build_strategy_1 = require("./commands/build-strategy");
|
|
@@ -77,7 +85,7 @@ try {
|
|
|
77
85
|
];
|
|
78
86
|
for (const p of candidates) {
|
|
79
87
|
if (fs.pathExistsSync(p)) {
|
|
80
|
-
const result = dotenv.config({ path: p });
|
|
88
|
+
const result = dotenv.config({ path: p, silent: true });
|
|
81
89
|
dotenvExpand.expand(result);
|
|
82
90
|
}
|
|
83
91
|
}
|
|
@@ -164,6 +172,7 @@ program
|
|
|
164
172
|
.option("--force", "Overwrite existing output files without prompt")
|
|
165
173
|
.option("--full", "Generate full context (PRD + A/B/C/D files) - for 'context' type only")
|
|
166
174
|
.option("--files-only", "Generate only A/B/C/D files (requires existing PRD) - for 'context' type only")
|
|
175
|
+
.option("--auto-continue", "Automatically continue to next logical steps after completion")
|
|
167
176
|
.action(async (type, options) => {
|
|
168
177
|
try {
|
|
169
178
|
const generateCommand = new generate_1.GenerateCommand();
|
|
@@ -229,6 +238,42 @@ program
|
|
|
229
238
|
process.exit(1);
|
|
230
239
|
}
|
|
231
240
|
});
|
|
241
|
+
// Context-aware help command
|
|
242
|
+
program
|
|
243
|
+
.command("help [topic]")
|
|
244
|
+
.description("Show context-aware help and guidance")
|
|
245
|
+
.option("--verbose", "Show detailed help information")
|
|
246
|
+
.action(async (topic, options) => {
|
|
247
|
+
try {
|
|
248
|
+
const helpCommand = new help_1.HelpCommand(program);
|
|
249
|
+
await helpCommand.execute({
|
|
250
|
+
topic,
|
|
251
|
+
verbose: Boolean(options.verbose),
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
catch (error) {
|
|
255
|
+
console.error(chalk_1.default.red("❌ Help command failed:"), error);
|
|
256
|
+
process.exit(1);
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
// Intelligent command suggestions
|
|
260
|
+
program
|
|
261
|
+
.command("suggest [command]")
|
|
262
|
+
.description("Get intelligent command suggestions and recommendations")
|
|
263
|
+
.option("--limit <number>", "Limit number of suggestions", "5")
|
|
264
|
+
.action(async (command, options) => {
|
|
265
|
+
try {
|
|
266
|
+
const suggestCommand = new suggest_1.SuggestCommand(program);
|
|
267
|
+
await suggestCommand.execute({
|
|
268
|
+
command,
|
|
269
|
+
limit: parseInt(options.limit) || 5,
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
catch (error) {
|
|
273
|
+
console.error(chalk_1.default.red("❌ Suggest command failed:"), error);
|
|
274
|
+
process.exit(1);
|
|
275
|
+
}
|
|
276
|
+
});
|
|
232
277
|
// Generate components command
|
|
233
278
|
const generateComponentsCmd = program
|
|
234
279
|
.command("generate-components [target]")
|
|
@@ -424,85 +469,9 @@ program
|
|
|
424
469
|
process.exit(1);
|
|
425
470
|
}
|
|
426
471
|
});
|
|
427
|
-
// Workflow command -
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
.description("Streamlined development workflow: init → context → types → brand → components")
|
|
431
|
-
.option("--description <desc>", "Project description for context generation")
|
|
432
|
-
.option("--with-tests", "Generate tests for components")
|
|
433
|
-
.option("--skip-brand", "Skip brand generation step")
|
|
434
|
-
.action(async (step, options) => {
|
|
435
|
-
try {
|
|
436
|
-
const steps = ["init", "context", "types", "brand", "components"];
|
|
437
|
-
const currentIndex = steps.indexOf(step);
|
|
438
|
-
if (currentIndex === -1) {
|
|
439
|
-
console.error(chalk_1.default.red(`❌ Invalid step: ${step}`));
|
|
440
|
-
console.log(chalk_1.default.blue("Available steps: " + steps.join(" → ")));
|
|
441
|
-
process.exit(1);
|
|
442
|
-
}
|
|
443
|
-
console.log(chalk_1.default.blue(`🚀 Running workflow step: ${step}`));
|
|
444
|
-
// Run the current step and all previous steps if needed
|
|
445
|
-
for (let i = 0; i <= currentIndex; i++) {
|
|
446
|
-
const currentStep = steps[i];
|
|
447
|
-
console.log(chalk_1.default.gray(`\n📋 Step ${i + 1}/${steps.length}: ${currentStep}`));
|
|
448
|
-
switch (currentStep) {
|
|
449
|
-
case "init":
|
|
450
|
-
// Skip if already initialized
|
|
451
|
-
if (await require("fs-extra").pathExists(".mycontext")) {
|
|
452
|
-
console.log(chalk_1.default.gray(" ✓ Already initialized"));
|
|
453
|
-
continue;
|
|
454
|
-
}
|
|
455
|
-
break;
|
|
456
|
-
case "context":
|
|
457
|
-
const generateCommand = new generate_1.GenerateCommand();
|
|
458
|
-
await generateCommand.execute({
|
|
459
|
-
type: "context",
|
|
460
|
-
full: true,
|
|
461
|
-
description: options.description,
|
|
462
|
-
...options,
|
|
463
|
-
});
|
|
464
|
-
break;
|
|
465
|
-
case "types":
|
|
466
|
-
const generateTypesCommand = new generate_1.GenerateCommand();
|
|
467
|
-
await generateTypesCommand.execute({
|
|
468
|
-
type: "types",
|
|
469
|
-
...options,
|
|
470
|
-
});
|
|
471
|
-
break;
|
|
472
|
-
case "brand":
|
|
473
|
-
if (options.skipBrand) {
|
|
474
|
-
console.log(chalk_1.default.gray(" ⏭️ Skipped (--skip-brand)"));
|
|
475
|
-
continue;
|
|
476
|
-
}
|
|
477
|
-
const generateBrandCommand = new generate_1.GenerateCommand();
|
|
478
|
-
await generateBrandCommand.execute({
|
|
479
|
-
type: "brand",
|
|
480
|
-
...options,
|
|
481
|
-
});
|
|
482
|
-
break;
|
|
483
|
-
case "components":
|
|
484
|
-
const generateComponentsCommand = new generate_components_1.GenerateComponentsCommand();
|
|
485
|
-
await generateComponentsCommand.execute("all", {
|
|
486
|
-
withTests: options.withTests || false,
|
|
487
|
-
all: true,
|
|
488
|
-
...options,
|
|
489
|
-
});
|
|
490
|
-
break;
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
console.log(chalk_1.default.green(`\n✅ Workflow step '${step}' completed successfully!`));
|
|
494
|
-
if (currentIndex < steps.length - 1) {
|
|
495
|
-
console.log(chalk_1.default.blue(`\n➡️ Next step: mycontext workflow ${steps[currentIndex + 1]}`));
|
|
496
|
-
}
|
|
497
|
-
else {
|
|
498
|
-
console.log(chalk_1.default.green(`\n🎉 All workflow steps completed! Your project is ready.`));
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
catch (error) {
|
|
502
|
-
console.error(chalk_1.default.red("❌ Workflow failed:"), error);
|
|
503
|
-
process.exit(1);
|
|
504
|
-
}
|
|
505
|
-
});
|
|
472
|
+
// Workflow command - pre-configured workflow templates
|
|
473
|
+
const workflowCommand = new workflow_1.WorkflowCommand();
|
|
474
|
+
workflowCommand.register(program);
|
|
506
475
|
// Update command (mycontext update)
|
|
507
476
|
program
|
|
508
477
|
.command("update")
|
|
@@ -538,6 +507,15 @@ program.addCommand(build_strategy_1.buildStrategyCommand);
|
|
|
538
507
|
// Health check command
|
|
539
508
|
const healthCheckCommand = new health_check_1.HealthCheckCommand();
|
|
540
509
|
healthCheckCommand.register(program);
|
|
510
|
+
// Import Project Plan command (mycontext PM integration)
|
|
511
|
+
const importProjectPlanCommand = new import_project_plan_1.ImportProjectPlanCommand();
|
|
512
|
+
importProjectPlanCommand.register(program);
|
|
513
|
+
// Export Progress command (mycontext PM integration)
|
|
514
|
+
const exportProgressCommand = new export_progress_1.ExportProgressCommand();
|
|
515
|
+
exportProgressCommand.register(program);
|
|
516
|
+
// PM Integration command (comprehensive PM integration management)
|
|
517
|
+
const pmIntegrationCommand = new pm_integration_1.PMIntegrationCommand();
|
|
518
|
+
pmIntegrationCommand.register(program);
|
|
541
519
|
// Build App command (agent-driven workflow with looping)
|
|
542
520
|
const buildAppCmd = program
|
|
543
521
|
.command("build-app")
|
|
@@ -552,6 +530,9 @@ const buildAppCmd = program
|
|
|
552
530
|
.option("--interactive", "Enable interactive mode with user prompts and confirmations")
|
|
553
531
|
.option("--skip-validation", "Skip validation and quality assurance steps")
|
|
554
532
|
.option("--max-retries <number>", "Maximum retry attempts for failed steps", "3")
|
|
533
|
+
.option("--pm-plan <file>", "Use mycontext PM project plan JSON file")
|
|
534
|
+
.option("--auto-sync", "Automatically sync progress with mycontext PM")
|
|
535
|
+
.option("--webhook-url <url>", "Webhook URL for progress updates")
|
|
555
536
|
.action(async (options) => {
|
|
556
537
|
try {
|
|
557
538
|
const command = new build_app_1.BuildAppCommand();
|
|
@@ -566,6 +547,9 @@ const buildAppCmd = program
|
|
|
566
547
|
interactive: Boolean(options.interactive),
|
|
567
548
|
skipValidation: Boolean(options.skipValidation),
|
|
568
549
|
maxRetries: parseInt(options.maxRetries) || 3,
|
|
550
|
+
pmPlan: options.pmPlan,
|
|
551
|
+
autoSync: Boolean(options.autoSync),
|
|
552
|
+
webhookUrl: options.webhookUrl,
|
|
569
553
|
});
|
|
570
554
|
}
|
|
571
555
|
catch (error) {
|
|
@@ -713,6 +697,34 @@ program
|
|
|
713
697
|
process.exit(1);
|
|
714
698
|
}
|
|
715
699
|
});
|
|
700
|
+
// shadcn/ui setup command
|
|
701
|
+
program
|
|
702
|
+
.command("setup-shadcn")
|
|
703
|
+
.description("Set up shadcn/ui components with interactive terminal installation")
|
|
704
|
+
.option("--all", "Install all essential components automatically")
|
|
705
|
+
.option("--components <list>", "Comma-separated list of components to install")
|
|
706
|
+
.option("--force", "Force reinitialization even if already set up")
|
|
707
|
+
.option("--skip-prompts", "Skip interactive prompts")
|
|
708
|
+
.action(async (options) => {
|
|
709
|
+
try {
|
|
710
|
+
const command = new setup_shadcn_1.SetupShadcnCommand();
|
|
711
|
+
await command.execute({
|
|
712
|
+
all: Boolean(options.all),
|
|
713
|
+
components: options.components
|
|
714
|
+
? options.components.split(",").map((c) => c.trim())
|
|
715
|
+
: undefined,
|
|
716
|
+
force: Boolean(options.force),
|
|
717
|
+
skipPrompts: Boolean(options.skipPrompts),
|
|
718
|
+
});
|
|
719
|
+
}
|
|
720
|
+
catch (error) {
|
|
721
|
+
console.error(chalk_1.default.red("❌ shadcn/ui setup failed:"), error);
|
|
722
|
+
process.exit(1);
|
|
723
|
+
}
|
|
724
|
+
});
|
|
725
|
+
// Setup complete command - guided complete project setup
|
|
726
|
+
const setupCompleteCommand = new setup_complete_1.SetupCompleteCommand();
|
|
727
|
+
setupCompleteCommand.register(program);
|
|
716
728
|
// Promote command for moving components to production
|
|
717
729
|
program
|
|
718
730
|
.command("promote")
|