mycontext-cli 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +281 -76
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**🧠 The AI That Actually Understands Your Project**
|
|
4
4
|
|
|
5
|
-
AI-powered tool that generates production-ready React components
|
|
5
|
+
AI-powered tool that generates production-ready React components through an advanced agent-driven workflow that deeply understands your project context.
|
|
6
6
|
|
|
7
7
|
## 🚀 Quick Start
|
|
8
8
|
|
|
@@ -16,45 +16,74 @@ mycontext init . --description "Your project description"
|
|
|
16
16
|
mycontext init my-app --description "Your project description"
|
|
17
17
|
cd my-app
|
|
18
18
|
|
|
19
|
-
#
|
|
20
|
-
mycontext generate
|
|
21
|
-
mycontext
|
|
22
|
-
mycontext
|
|
23
|
-
mycontext generate components-list # → 04-component-list.json
|
|
24
|
-
mycontext generate-components all --local --with-tests
|
|
19
|
+
# Agent-Driven Workflow (New!)
|
|
20
|
+
mycontext generate-context-files --description "Your project description" # → A/B/C/D context files
|
|
21
|
+
mycontext compile-prd # → Comprehensive PRD
|
|
22
|
+
mycontext build-app --interactive # → Complete app with agents
|
|
25
23
|
```
|
|
26
24
|
|
|
27
|
-
##
|
|
25
|
+
## 🤖 Agent-Driven Workflow (New!)
|
|
28
26
|
|
|
29
|
-
|
|
27
|
+
MyContext uses 11 specialized AI agents working together in an orchestrated workflow:
|
|
28
|
+
|
|
29
|
+
### 1. Context Generation (Agent: SpecAgent)
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
mycontext generate-context-files --description "Modern e-commerce platform"
|
|
33
|
+
# Generates:
|
|
34
|
+
# - A. Features (.mycontext/features.md)
|
|
35
|
+
# - B. User Flows (.mycontext/user-flows.md)
|
|
36
|
+
# - C. Edge Cases (.mycontext/edge-cases.md)
|
|
37
|
+
# - D. Technical Specs (.mycontext/technical-specs.md)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### 2. PRD Compilation (Agent: PRDAgent)
|
|
30
41
|
|
|
31
42
|
```bash
|
|
32
|
-
mycontext
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
mycontext generate components-list # Component planning
|
|
43
|
+
mycontext compile-prd
|
|
44
|
+
# Compiles A/B/C/D context files into:
|
|
45
|
+
# - .mycontext/prd-compiled.md (comprehensive requirements)
|
|
36
46
|
```
|
|
37
47
|
|
|
38
|
-
###
|
|
48
|
+
### 3. Complete Application Build (Agent Orchestration)
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
mycontext build-app --interactive --max-retries 3
|
|
52
|
+
# Orchestrates multiple agents:
|
|
53
|
+
# - TypesAgent: Generates TypeScript types
|
|
54
|
+
# - BrandAgent: Creates design system
|
|
55
|
+
# - CodeGenAgent: Generates components
|
|
56
|
+
# - QAAgent: Quality assurance
|
|
57
|
+
# - DocsAgent: Documentation
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## 🎯 Core Commands
|
|
61
|
+
|
|
62
|
+
### Context & Planning
|
|
39
63
|
|
|
40
64
|
```bash
|
|
41
|
-
mycontext
|
|
42
|
-
mycontext
|
|
43
|
-
mycontext
|
|
65
|
+
mycontext generate-context-files # A/B/C/D context files (NEW)
|
|
66
|
+
mycontext compile-prd # Compile to comprehensive PRD (NEW)
|
|
67
|
+
mycontext build-app # Agent-orchestrated full build (NEW)
|
|
68
|
+
mycontext generate types # TypeScript type system
|
|
69
|
+
mycontext generate brand-kit # Complete brand system
|
|
44
70
|
```
|
|
45
71
|
|
|
46
|
-
###
|
|
72
|
+
### Component Generation
|
|
47
73
|
|
|
48
74
|
```bash
|
|
49
|
-
mycontext generate-components all --local --with-tests #
|
|
50
|
-
mycontext generate-components <group> --local #
|
|
75
|
+
mycontext generate-components all --local --with-tests # All components
|
|
76
|
+
mycontext generate-components <group> --local # Specific group
|
|
77
|
+
mycontext core generate # Design anchor component
|
|
51
78
|
```
|
|
52
79
|
|
|
53
|
-
###
|
|
80
|
+
### Interactive & Management
|
|
54
81
|
|
|
55
82
|
```bash
|
|
56
|
-
mycontext
|
|
57
|
-
mycontext
|
|
83
|
+
mycontext enhance <component> --prompt "improvements" # AI enhancement
|
|
84
|
+
mycontext refine <component> --prompt "changes" # AI refinement
|
|
85
|
+
mycontext preview components # Live preview
|
|
86
|
+
mycontext status --detailed # Project analysis
|
|
58
87
|
```
|
|
59
88
|
|
|
60
89
|
## Advanced Commands
|
|
@@ -66,42 +95,109 @@ mycontext predict dependencies # Package suggestions
|
|
|
66
95
|
mycontext predict patterns # Architecture patterns
|
|
67
96
|
mycontext predict issues # Potential problems
|
|
68
97
|
|
|
69
|
-
#
|
|
70
|
-
mycontext
|
|
71
|
-
mycontext
|
|
72
|
-
mycontext status --detailed # Project analysis
|
|
98
|
+
# Interactive workflow
|
|
99
|
+
mycontext build-app --interactive # Human-in-the-loop generation
|
|
100
|
+
mycontext build-app --max-retries 5 # Configure retry limits
|
|
73
101
|
|
|
74
102
|
# Model management
|
|
75
|
-
mycontext model list
|
|
76
|
-
mycontext model test
|
|
103
|
+
mycontext model list # Available AI models
|
|
104
|
+
mycontext model test # Test AI provider connections
|
|
105
|
+
mycontext setup # Local AI setup
|
|
77
106
|
```
|
|
78
107
|
|
|
79
|
-
## 📦 What You Get
|
|
108
|
+
## 📦 What You Get (Updated Structure)
|
|
109
|
+
|
|
110
|
+
### Context Files (A/B/C/D Workflow)
|
|
111
|
+
|
|
112
|
+
- **`.mycontext/features.md`** — Core product features and capabilities
|
|
113
|
+
- **`.mycontext/user-flows.md`** — User journey maps and interaction patterns
|
|
114
|
+
- **`.mycontext/edge-cases.md`** — Error scenarios and edge conditions
|
|
115
|
+
- **`.mycontext/technical-specs.md`** — Architecture and technical requirements
|
|
116
|
+
- **`.mycontext/prd-compiled.md`** — Comprehensive compiled PRD
|
|
117
|
+
|
|
118
|
+
### Generated Assets
|
|
80
119
|
|
|
81
|
-
- **`.mycontext/01-prd.md`** — Product Requirements Document
|
|
82
|
-
- **`.mycontext/01a-brief.md`** — Project brief summary
|
|
83
|
-
- **`.mycontext/01b-requirements.md`** — Detailed requirements
|
|
84
|
-
- **`.mycontext/01c-flows.md`** — User flows & interactions
|
|
85
120
|
- **`.mycontext/types/`** — Complete TypeScript type system (5 files)
|
|
86
|
-
- `index.ts` — Main type exports
|
|
87
|
-
- `database.ts` — Database schema
|
|
88
|
-
- `enums.ts` — Enum constants
|
|
89
|
-
- `ui.ts` — UI component types
|
|
90
|
-
- `utils.ts` — Utility types
|
|
91
|
-
- **`.mycontext/brand/`** — Complete design system
|
|
92
|
-
- `
|
|
121
|
+
- `index.ts` — Main type exports and interfaces
|
|
122
|
+
- `database.ts` — Database schema and data models
|
|
123
|
+
- `enums.ts` — Enum constants and type guards
|
|
124
|
+
- `ui.ts` — UI component prop types
|
|
125
|
+
- `utils.ts` — Utility types and helpers
|
|
126
|
+
- **`.mycontext/brand-kit/`** — Complete design system
|
|
127
|
+
- `brand-kit.json` — Design tokens and theme configuration
|
|
128
|
+
- `globals.css` — CSS custom properties and variables
|
|
93
129
|
- `colors.md` — Color palette documentation
|
|
94
|
-
- `typography.md` — Typography specifications
|
|
95
|
-
-
|
|
96
|
-
- **`
|
|
130
|
+
- `typography.md` — Typography specifications and hierarchy
|
|
131
|
+
- **`components/`** — Production-ready React components with shadcn/ui
|
|
132
|
+
- **`lib/`** — Shared utilities and hooks
|
|
133
|
+
- **`docs/`** — Auto-generated component documentation
|
|
97
134
|
|
|
98
|
-
## 🤖
|
|
135
|
+
## 🤖 Agent Architecture
|
|
136
|
+
|
|
137
|
+
MyContext features a sophisticated multi-agent system with 11 specialized AI agents:
|
|
99
138
|
|
|
100
|
-
|
|
139
|
+
### Core Agents
|
|
140
|
+
|
|
141
|
+
- **SpecAgent**: Generates A/B/C/D context files from project descriptions
|
|
142
|
+
- **PRDAgent**: Compiles context files into comprehensive PRDs
|
|
143
|
+
- **TypesAgent**: Creates TypeScript type systems from features and flows
|
|
144
|
+
- **BrandAgent**: Generates complete design systems and brand kits
|
|
145
|
+
- **CodeGenAgent**: Produces production-ready React components
|
|
146
|
+
- **QAAgent**: Performs quality assurance and validation
|
|
147
|
+
- **DocsAgent**: Creates comprehensive documentation
|
|
148
|
+
|
|
149
|
+
### Support Agents
|
|
150
|
+
|
|
151
|
+
- **ArchitectAgent**: Provides architectural analysis and recommendations
|
|
152
|
+
- **SecurityAgent**: Performs security analysis and best practices
|
|
153
|
+
- **InteractiveAgent**: Handles human-in-the-loop interactions
|
|
154
|
+
- **ProjectSetupAgent**: Manages project initialization and structure
|
|
155
|
+
- **WorkflowAgent**: Orchestrates complete build processes
|
|
156
|
+
|
|
157
|
+
### Agent Orchestration
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
mycontext build-app --interactive
|
|
161
|
+
# Automatically coordinates all agents in the optimal sequence
|
|
162
|
+
# Provides progress updates and handles failures gracefully
|
|
163
|
+
# Supports human intervention when needed
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## 💰 Business Model & Pricing
|
|
167
|
+
|
|
168
|
+
### **Free Tier (Always Free)**
|
|
169
|
+
|
|
170
|
+
- ✅ Unlimited basic generation with Qwen3 Coder
|
|
171
|
+
- ✅ Core CLI features and commands
|
|
172
|
+
- ✅ Community support and documentation
|
|
173
|
+
- ✅ Local AI setup with Ollama
|
|
174
|
+
|
|
175
|
+
### **Pro Tier ($9/month)**
|
|
176
|
+
|
|
177
|
+
- ✅ Advanced AI generation with premium providers
|
|
178
|
+
- ✅ Priority support and faster response times
|
|
179
|
+
- ✅ Enhanced features and beta access
|
|
180
|
+
- ✅ Team collaboration tools
|
|
181
|
+
|
|
182
|
+
### **Enterprise Tier ($29/month)**
|
|
183
|
+
|
|
184
|
+
- ✅ Custom AI model training and fine-tuning
|
|
185
|
+
- ✅ White-label solutions and branding
|
|
186
|
+
- ✅ On-premise deployment options
|
|
187
|
+
- ✅ Dedicated enterprise support and SLAs
|
|
101
188
|
|
|
102
189
|
### **Bring Your Own Keys (BYOK)**
|
|
103
190
|
|
|
104
|
-
Use your
|
|
191
|
+
- ✅ Use your existing API provider accounts
|
|
192
|
+
- ✅ Pay only for your actual API usage
|
|
193
|
+
- ✅ Full control over costs and performance
|
|
194
|
+
- ✅ No rate limits or usage tracking
|
|
195
|
+
|
|
196
|
+
## 🤖 AI Provider Options
|
|
197
|
+
|
|
198
|
+
MyContext supports multiple AI providers with intelligent fallback:
|
|
199
|
+
|
|
200
|
+
### **Bring Your Own Keys (BYOK)**
|
|
105
201
|
|
|
106
202
|
| Provider | Environment Variable | Best For | Cost |
|
|
107
203
|
| ---------------------- | -------------------------- | -------------------------------- | -------------- |
|
|
@@ -113,27 +209,17 @@ Use your own API keys for full control and potentially lower costs:
|
|
|
113
209
|
|
|
114
210
|
### **MyContext Managed Service**
|
|
115
211
|
|
|
116
|
-
If you don't set any API keys, MyContext uses our hosted AI service:
|
|
117
|
-
|
|
118
212
|
- **Rate Limited**: 10 requests per hour for free tier
|
|
119
213
|
- **Paid Credits**: Purchase credits for unlimited usage
|
|
120
|
-
- **
|
|
121
|
-
- **
|
|
214
|
+
- **Multi-Provider**: Automatic fallback across providers
|
|
215
|
+
- **Usage Tracking**: Quality improvement and analytics
|
|
122
216
|
|
|
123
|
-
### **
|
|
217
|
+
### **Provider Priority Chain**
|
|
124
218
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
### **Provider Priority Order**
|
|
130
|
-
|
|
131
|
-
MyContext automatically tries providers in this order:
|
|
132
|
-
|
|
133
|
-
1. **Your API Keys** (Qwen → GitHub → Claude → OpenAI → X.AI)
|
|
134
|
-
2. **MyContext Managed Service** (if no keys set)
|
|
135
|
-
3. **Qwen3 Coder** (FREE via OpenRouter)
|
|
136
|
-
4. **Basic Templates** (fallback generation)
|
|
219
|
+
1. **Your API Keys** (highest performance, your costs)
|
|
220
|
+
2. **MyContext Managed Service** (balanced, our costs)
|
|
221
|
+
3. **Qwen3 Coder FREE** (fallback, completely free)
|
|
222
|
+
4. **Basic Templates** (ultimate fallback)
|
|
137
223
|
|
|
138
224
|
## Environment Setup
|
|
139
225
|
|
|
@@ -239,20 +325,139 @@ cp .mycontext/brand/globals.css ./src/app/globals.css
|
|
|
239
325
|
|
|
240
326
|
## Key Features
|
|
241
327
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
- **
|
|
245
|
-
- **
|
|
246
|
-
- **
|
|
247
|
-
- **
|
|
248
|
-
- **Design System**: Ready-to-use brand system with complete CSS custom properties
|
|
328
|
+
### 🤖 **Agent-Driven Development**
|
|
329
|
+
|
|
330
|
+
- **11 Specialized Agents**: Each agent handles specific development tasks
|
|
331
|
+
- **Intelligent Orchestration**: Agents work together seamlessly
|
|
332
|
+
- **Human-in-the-Loop**: Interactive prompts and confirmations
|
|
333
|
+
- **Quality Gates**: Built-in validation and retry mechanisms
|
|
249
334
|
|
|
250
|
-
|
|
335
|
+
### 🎯 **Context-Aware Generation**
|
|
251
336
|
|
|
252
|
-
- **
|
|
253
|
-
- **
|
|
254
|
-
- **
|
|
337
|
+
- **Deep Project Understanding**: Analyzes existing codebase patterns
|
|
338
|
+
- **A/B/C/D Context Files**: Comprehensive project specification
|
|
339
|
+
- **Automatic Context Loading**: Commands use project context intelligently
|
|
340
|
+
- **Consistent Results**: Same context produces consistent outputs
|
|
341
|
+
|
|
342
|
+
### 🏗️ **Production-Ready Code**
|
|
343
|
+
|
|
344
|
+
- **TypeScript First**: Complete type system with 5 specialized files
|
|
345
|
+
- **Modern React**: Next.js 15, shadcn/ui, server components
|
|
346
|
+
- **Accessibility**: WCAG compliant components
|
|
347
|
+
- **Testing**: Comprehensive test suites included
|
|
348
|
+
- **Documentation**: Auto-generated component docs
|
|
349
|
+
|
|
350
|
+
### 🎨 **Complete Design System**
|
|
351
|
+
|
|
352
|
+
- **Brand Kit Generation**: Colors, typography, components
|
|
353
|
+
- **CSS Custom Properties**: Theme-able design tokens
|
|
354
|
+
- **Component Library**: Consistent, reusable components
|
|
355
|
+
- **Responsive Design**: Mobile-first approach
|
|
356
|
+
|
|
357
|
+
### 🔧 **Developer Experience**
|
|
358
|
+
|
|
359
|
+
- **Interactive CLI**: Guided workflows with progress indicators
|
|
360
|
+
- **Multiple AI Providers**: Choose your preferred AI service
|
|
361
|
+
- **Fallback Support**: Always works, even without API keys
|
|
362
|
+
- **Extensible Architecture**: Plugin system for custom agents
|
|
363
|
+
|
|
364
|
+
## 🛠️ Development & Contributing
|
|
365
|
+
|
|
366
|
+
### Prerequisites
|
|
367
|
+
|
|
368
|
+
- **Node.js**: 18+ (20+ recommended)
|
|
369
|
+
- **pnpm**: Package manager
|
|
370
|
+
- **Git**: Version control
|
|
371
|
+
|
|
372
|
+
### Local Development
|
|
373
|
+
|
|
374
|
+
```bash
|
|
375
|
+
# Clone the monorepo
|
|
376
|
+
git clone https://github.com/farajabien/mycontext.git
|
|
377
|
+
cd mycontext
|
|
378
|
+
|
|
379
|
+
# Install dependencies
|
|
380
|
+
pnpm install
|
|
381
|
+
|
|
382
|
+
# Build all packages
|
|
383
|
+
pnpm build
|
|
384
|
+
|
|
385
|
+
# Run CLI in development mode
|
|
386
|
+
cd packages/cli
|
|
387
|
+
pnpm dev --help
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
### Project Structure
|
|
391
|
+
|
|
392
|
+
```
|
|
393
|
+
mycontext-monorepo/
|
|
394
|
+
├── packages/
|
|
395
|
+
│ ├── cli/ # Main CLI package
|
|
396
|
+
│ │ ├── src/
|
|
397
|
+
│ │ │ ├── commands/ # CLI command implementations
|
|
398
|
+
│ │ │ ├── agents/ # AI agent implementations
|
|
399
|
+
│ │ │ ├── utils/ # Utility functions
|
|
400
|
+
│ │ │ └── config/ # Configuration files
|
|
401
|
+
│ │ └── docs/ # CLI documentation
|
|
402
|
+
│ └── ui/ # Shared UI components
|
|
403
|
+
├── apps/
|
|
404
|
+
│ └── web/ # Web platform (Next.js)
|
|
405
|
+
└── docs/ # Monorepo documentation
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
### Testing
|
|
409
|
+
|
|
410
|
+
```bash
|
|
411
|
+
# Run all tests
|
|
412
|
+
pnpm test
|
|
413
|
+
|
|
414
|
+
# Run CLI tests specifically
|
|
415
|
+
cd packages/cli && pnpm test
|
|
416
|
+
|
|
417
|
+
# Run with coverage
|
|
418
|
+
pnpm test:coverage
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
### Contributing Guidelines
|
|
422
|
+
|
|
423
|
+
1. **Fork** the repository
|
|
424
|
+
2. **Create** a feature branch (`git checkout -b feature/amazing-feature`)
|
|
425
|
+
3. **Commit** your changes (`git commit -m 'Add amazing feature'`)
|
|
426
|
+
4. **Push** to the branch (`git push origin feature/amazing-feature`)
|
|
427
|
+
5. **Open** a Pull Request
|
|
428
|
+
|
|
429
|
+
### Code Standards
|
|
430
|
+
|
|
431
|
+
- **TypeScript**: Strict type checking enabled
|
|
432
|
+
- **ESLint**: Code quality and consistency
|
|
433
|
+
- **Prettier**: Automatic code formatting
|
|
434
|
+
- **Conventional Commits**: Structured commit messages
|
|
435
|
+
|
|
436
|
+
## 📞 Support & Community
|
|
437
|
+
|
|
438
|
+
### Getting Help
|
|
439
|
+
|
|
440
|
+
- **📧 Email**: hello@fbien.com
|
|
441
|
+
- **🐛 Issues**: [GitHub Issues](https://github.com/farajabien/mycontext/issues)
|
|
442
|
+
- **💬 Discussions**: [GitHub Discussions](https://github.com/farajabien/mycontext/discussions)
|
|
443
|
+
- **📖 Documentation**: [docs.mycontext.fbien.com](https://docs.mycontext.fbien.com)
|
|
444
|
+
|
|
445
|
+
### Community
|
|
446
|
+
|
|
447
|
+
- **Share Components**: Contribute to the component library
|
|
448
|
+
- **Report Bugs**: Help improve stability and reliability
|
|
449
|
+
- **Feature Requests**: Suggest new capabilities and improvements
|
|
450
|
+
- **Beta Testing**: Get early access to new features
|
|
451
|
+
|
|
452
|
+
### Enterprise Support
|
|
453
|
+
|
|
454
|
+
- **Custom Deployments**: On-premise and private cloud options
|
|
455
|
+
- **White-label Solutions**: Custom branding and integration
|
|
456
|
+
- **Dedicated Support**: Priority response and SLAs
|
|
457
|
+
- **Training**: Team onboarding and best practices
|
|
255
458
|
|
|
256
459
|
---
|
|
257
460
|
|
|
258
|
-
|
|
461
|
+
**🚀 Ready to transform your development workflow with AI-powered agents?**
|
|
462
|
+
|
|
463
|
+
_Built with ❤️ by the MyContext team - Making AI work for developers, not against them._
|