mycontext-cli 1.0.77 โ†’ 1.0.79

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 (2) hide show
  1. package/README.md +99 -348
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,419 +4,170 @@
4
4
 
5
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
- ## ๐Ÿš€ Quick Start
7
+ ## Installation
8
8
 
9
9
  ```bash
10
- # Install CLI
11
- npm install -g mycontext-cli
12
-
13
- # Initialize project (supports current directory with ".")
14
- mycontext init . --description "Your project description"
15
- # OR
16
- mycontext init my-app --description "Your project description"
17
- cd my-app
18
-
19
- # Unified Context Generation
20
- mycontext generate context --full --description "Your project description" # โ†’ PRD + A/B/C/D files
21
- mycontext compile-prd # โ†’ Comprehensive PRD
22
- mycontext build-app --interactive # โ†’ Complete app with agents
10
+ npm install -g @mycontext/cli
11
+ # or
12
+ pnpm add -g @mycontext/cli
13
+ # or
14
+ yarn global add @mycontext/cli
23
15
  ```
24
16
 
25
- ## ๐Ÿค– Agent-Driven Workflow (New!)
26
-
27
- MyContext uses 11 specialized AI agents working together in an orchestrated workflow:
28
-
29
- ### 1. Context Generation (Agent: SpecAgent)
17
+ ## Quick Start
30
18
 
31
19
  ```bash
32
- # Generate only PRD (default)
33
- mycontext generate context --description "Modern e-commerce platform"
34
-
35
- # Generate full context (PRD + A/B/C/D files)
36
- mycontext generate context --full --description "Modern e-commerce platform"
37
-
38
- # Generate only A/B/C/D files (requires existing PRD)
39
- mycontext generate context --files-only
20
+ # Initialize a new project
21
+ mycontext init my-project
40
22
 
41
- # Generates:
42
- # - PRD (.mycontext/01-prd.md)
43
- # - A. Features (.mycontext/01a-features.md)
44
- # - B. User Flows (.mycontext/01b-user-flows.md)
45
- # - C. Edge Cases (.mycontext/01c-edge-cases.md)
46
- # - D. Technical Specs (.mycontext/01d-technical-specs.md)
47
- ```
23
+ # Set up AI provider (X.AI Grok recommended for best results)
24
+ echo 'MYCONTEXT_XAI_API_KEY=xai-xxx' > .mycontext/.env
48
25
 
49
- ### 2. PRD Compilation (Agent: PRDAgent)
26
+ # Generate context files
27
+ mycontext generate context --full --description 'Modern todo app'
50
28
 
51
- ```bash
29
+ # Compile PRD
52
30
  mycontext compile-prd
53
- # Compiles A/B/C/D context files into:
54
- # - .mycontext/prd-compiled.md (comprehensive requirements)
55
- ```
56
-
57
- ### 3. Database Setup (Default: InstantDB)
58
-
59
- ```bash
60
- # Set up InstantDB with MCP integration (recommended)
61
- mycontext setup-instantdb
62
-
63
- # Set up MCP with other providers
64
- mycontext setup-mcp --provider github --token YOUR_TOKEN
65
- mycontext setup-mcp --provider custom --server https://your-server.com
66
- ```
67
31
 
68
- ### 4. Complete Application Build (Agent Orchestration)
69
-
70
- ```bash
71
- mycontext build-app --interactive --max-retries 3
72
- # Orchestrates multiple agents:
73
- # - TypesAgent: Generates TypeScript types
74
- # - BrandAgent: Creates design system
75
- # - CodeGenAgent: Generates components with database integration
76
- # - QAAgent: Quality assurance
77
- # - DocsAgent: Documentation
78
- # - DatabaseAgent: Real-time data operations
32
+ # Generate components
33
+ mycontext generate-components all --with-tests
79
34
  ```
80
35
 
81
- ## ๐ŸŽฏ Core Commands
36
+ ## Features
82
37
 
83
- ### Context & Planning
38
+ - **๐Ÿค– AI-Powered Generation**: Uses advanced AI models to understand your project context
39
+ - **โšก Fast Setup**: Initialize projects in seconds with Next.js, TypeScript, and Tailwind CSS
40
+ - **๐ŸŽจ Component Generation**: Create production-ready React components with Shadcn UI
41
+ - **๐Ÿ“‹ Context-Aware**: Generates PRDs, types, and branding based on your project
42
+ - **๐Ÿ”ง Developer-Friendly**: Built-in validation, testing, and preview capabilities
43
+ - **๐Ÿ†“ Free Tier**: Use Qwen3 Coder model for free testing, or premium X.AI/Claude for production
84
44
 
85
- ```bash
86
- mycontext generate context --full # PRD + A/B/C/D context files (UNIFIED)
87
- mycontext compile-prd # Compile to comprehensive PRD (NEW)
88
- mycontext build-app # Agent-orchestrated full build (NEW)
89
- mycontext generate types # TypeScript type system
90
- mycontext generate brand-kit # Complete brand system
91
- ```
92
-
93
- ### Database & MCP Setup
94
-
95
- ```bash
96
- mycontext setup-instantdb # Set up InstantDB with MCP (DEFAULT)
97
- mycontext setup-mcp # Set up MCP with various providers
98
- mycontext setup-database # Set up other database options
99
- ```
45
+ ## Commands
100
46
 
101
- ### Component Generation
47
+ ### Project Setup
102
48
 
103
49
  ```bash
104
- mycontext generate-components all --local --with-tests # All components (with DB integration)
105
- mycontext generate-components <group> --local # Specific group
106
- mycontext core generate # Design anchor component
50
+ mycontext init <project-name> # Initialize new project
51
+ mycontext setup # Configure AI providers
52
+ mycontext analyze # Analyze existing project
107
53
  ```
108
54
 
109
- ### Interactive & Management
55
+ ### Context Generation
110
56
 
111
57
  ```bash
112
- mycontext enhance <component> --prompt "improvements" # AI enhancement
113
- mycontext refine <component> --prompt "changes" # AI refinement
114
- mycontext preview components # Live preview
115
- mycontext status --detailed # Project analysis
58
+ mycontext generate context # Generate PRD and context files
59
+ mycontext generate types # Generate TypeScript types
60
+ mycontext generate brand # Generate branding guidelines
61
+ mycontext generate components-list # Generate component list
62
+ mycontext compile-prd # Compile PRD from context files
116
63
  ```
117
64
 
118
- ## Advanced Commands
65
+ ### Component Development
119
66
 
120
67
  ```bash
121
- # AI predictions and insights
122
- mycontext predict next # Next development steps
123
- mycontext predict dependencies # Package suggestions
124
- mycontext predict patterns # Architecture patterns
125
- mycontext predict issues # Potential problems
126
-
127
- # Interactive workflow
128
- mycontext build-app --interactive # Human-in-the-loop generation
129
- mycontext build-app --max-retries 5 # Configure retry limits
130
-
131
- # Model management
132
- mycontext model list # Available AI models
133
- mycontext model test # Test AI provider connections
134
- mycontext setup # Local AI setup
68
+ mycontext generate-components <target> # Generate React components
69
+ mycontext enhance <component> # Enhance existing components
70
+ mycontext refine <component> # Refine components with AI
71
+ mycontext preview <type> # Preview components or brand
135
72
  ```
136
73
 
137
- ## ๐Ÿ“ฆ What You Get (Updated Structure)
138
-
139
- ### Context Files (A/B/C/D Workflow)
140
-
141
- - **`.mycontext/features.md`** โ€” Core product features and capabilities
142
- - **`.mycontext/user-flows.md`** โ€” User journey maps and interaction patterns
143
- - **`.mycontext/edge-cases.md`** โ€” Error scenarios and edge conditions
144
- - **`.mycontext/technical-specs.md`** โ€” Architecture and technical requirements
145
- - **`.mycontext/prd-compiled.md`** โ€” Comprehensive compiled PRD
146
-
147
- ### Generated Assets
148
-
149
- - **`.mycontext/types/`** โ€” Complete TypeScript type system (5 files)
150
- - `index.ts` โ€” Main type exports and interfaces
151
- - `database.ts` โ€” Database schema and data models
152
- - `enums.ts` โ€” Enum constants and type guards
153
- - `ui.ts` โ€” UI component prop types
154
- - `utils.ts` โ€” Utility types and helpers
155
- - **`.mycontext/brand-kit/`** โ€” Complete design system
156
- - `brand-kit.json` โ€” Design tokens and theme configuration
157
- - `globals.css` โ€” CSS custom properties and variables
158
- - `colors.md` โ€” Color palette documentation
159
- - `typography.md` โ€” Typography specifications and hierarchy
160
- - **`components/`** โ€” Production-ready React components with shadcn/ui
161
- - **`lib/`** โ€” Shared utilities and hooks
162
- - **`docs/`** โ€” Auto-generated component documentation
163
-
164
- ## ๐Ÿค– Agent Architecture
165
-
166
- MyContext features a sophisticated multi-agent system with 11 specialized AI agents:
167
-
168
- ### Core Agents
169
-
170
- - **SpecAgent**: Generates A/B/C/D context files from project descriptions
171
- - **PRDAgent**: Compiles context files into comprehensive PRDs
172
- - **TypesAgent**: Creates TypeScript type systems from features and flows
173
- - **BrandAgent**: Generates complete design systems and brand kits
174
- - **CodeGenAgent**: Produces production-ready React components
175
- - **QAAgent**: Performs quality assurance and validation
176
- - **DocsAgent**: Creates comprehensive documentation
177
-
178
- ### Support Agents
179
-
180
- - **ArchitectAgent**: Provides architectural analysis and recommendations
181
- - **SecurityAgent**: Performs security analysis and best practices
182
- - **InteractiveAgent**: Handles human-in-the-loop interactions
183
- - **ProjectSetupAgent**: Manages project initialization and structure
184
- - **WorkflowAgent**: Orchestrates complete build processes
185
-
186
- ### Agent Orchestration
74
+ ### Project Management
187
75
 
188
76
  ```bash
189
- mycontext build-app --interactive
190
- # Automatically coordinates all agents in the optimal sequence
191
- # Provides progress updates and handles failures gracefully
192
- # Supports human intervention when needed
77
+ mycontext validate <target> # Validate PRD or files
78
+ mycontext status # Check project status
79
+ mycontext list [type] # List components, projects, or files
80
+ mycontext promote # Promote components to production
193
81
  ```
194
82
 
195
- ## ๐Ÿš€ **Beta Release - BYOK Model**
196
-
197
- **We're currently in beta!** All usage is **Bring Your Own Key (BYOK)** - no pricing, no subscriptions, just use your existing API keys.
198
-
199
- ### **What This Means**
200
-
201
- - โœ… **No Cost**: Use your own API keys, pay only what you normally pay
202
- - โœ… **Full Control**: Complete control over costs and performance
203
- - โœ… **No Limits**: No rate limits or usage tracking from us
204
- - โœ… **Recommended Providers**: Claude or GPT for best results
83
+ ## Configuration
205
84
 
206
- ## ๐Ÿค– AI Provider Options
85
+ ### AI Providers
207
86
 
208
87
  MyContext supports multiple AI providers with intelligent fallback:
209
88
 
210
- ### **Bring Your Own Keys (BYOK)**
89
+ #### **Recommended (Premium)**
211
90
 
212
- | Provider | Environment Variable | Best For | Cost |
213
- | ---------------------- | -------------------------- | -------------------------------- | -------------- |
214
- | **X.AI (Grok)** | `MYCONTEXT_XAI_API_KEY` | Fast, high-quality generation | Your API costs |
215
- | **Qwen3 Coder** | `MYCONTEXT_QWEN_API_KEY` | Free code generation, OpenRouter | **FREE** |
216
- | **GitHub Models** | `MYCONTEXT_GITHUB_TOKEN` | Fast, high-quality generation | Your API costs |
217
- | **Claude (Anthropic)** | `MYCONTEXT_CLAUDE_API_KEY` | Complex reasoning, detailed PRDs | Your API costs |
218
- | **OpenAI** | `MYCONTEXT_OPENAI_API_KEY` | Versatile generation, refinement | Your API costs |
91
+ 1. **X.AI (Grok) - Best for Code Generation**
219
92
 
220
- ### **Provider Priority Chain**
93
+ ```bash
94
+ echo 'MYCONTEXT_XAI_API_KEY=xai-xxx' > .mycontext/.env
95
+ ```
221
96
 
222
- 1. **Your API Keys** (recommended - Claude or GPT)
223
- 2. **Qwen3 Coder FREE** (fallback via OpenRouter)
224
- 3. **Basic Templates** (ultimate fallback)
225
-
226
- ## Environment Setup
227
-
228
- ### Option 1: Bring Your Own API Keys (Recommended)
229
-
230
- Set up your preferred AI provider for best performance and cost control:
231
-
232
- ```bash
233
- # Qwen3 Coder (FREE via OpenRouter - Recommended!)
234
- echo 'MYCONTEXT_QWEN_API_KEY=sk-or-xxx' > .mycontext/.env
97
+ 2. **Claude (Anthropic) - Best for Complex Reasoning**
235
98
 
236
- # Or GitHub Models (Fast, high-quality)
237
- echo 'MYCONTEXT_GITHUB_TOKEN=ghp_xxx' > .mycontext/.env
99
+ ```bash
100
+ echo 'MYCONTEXT_CLAUDE_API_KEY=sk-ant-xxx' > .mycontext/.env
101
+ ```
238
102
 
239
- # Or Claude (Best for complex reasoning)
240
- echo 'MYCONTEXT_CLAUDE_API_KEY=sk-ant-xxx' > .mycontext/.env
103
+ 3. **OpenAI (GPT-4) - Most Versatile**
104
+ ```bash
105
+ echo 'MYCONTEXT_OPENAI_API_KEY=sk-xxx' > .mycontext/.env
106
+ ```
241
107
 
242
- # Or OpenAI (Most versatile)
243
- echo 'MYCONTEXT_OPENAI_API_KEY=sk-xxx' > .mycontext/.env
108
+ #### **Testing & Fallback**
244
109
 
245
- # Or X.AI (Creative tasks)
246
- echo 'MYCONTEXT_GROK_TOKEN=xai-xxx' > .mycontext/.env
247
- ```
110
+ 4. **Qwen3 Coder (FREE)**
248
111
 
249
- ### Option 2: Local AI Setup (Free & Unlimited)
112
+ ```bash
113
+ echo 'MYCONTEXT_QWEN_API_KEY=sk-or-xxx' > .mycontext/.env
114
+ ```
250
115
 
251
- ```bash
252
- # Get Qwen3 Coder API key (FREE)
253
- # Visit https://openrouter.ai/ and create an account
254
- # Get your API key and add it to .mycontext/.env
116
+ 5. **GitHub Models (Self-hosted)**
117
+ ```bash
118
+ echo 'MYCONTEXT_GITHUB_TOKEN=ghp_xxx' > .mycontext/.env
119
+ ```
255
120
 
256
- # Set up MyContext local AI
257
- mycontext setup
121
+ ### Project Structure
258
122
 
259
- # Verify setup
260
- mycontext model status
261
123
  ```
262
-
263
- ## ๐Ÿง  **Automatic Context Loading**
264
-
265
- MyContext commands automatically load context from your project files when no description is provided:
266
-
267
- ```bash
268
- # These commands automatically use context files
269
- mycontext generate types # Uses PRD and existing context
270
- mycontext predict next # Uses project context for predictions
271
- mycontext enhance Button.tsx # Uses brand and types for enhancements
272
- mycontext refine LoginForm.tsx # Uses project context for refinements
124
+ my-project/
125
+ โ”œโ”€โ”€ .mycontext/ # MyContext configuration
126
+ โ”‚ โ”œโ”€โ”€ 01-prd.md # Product Requirements Document
127
+ โ”‚ โ”œโ”€โ”€ 02-types.ts # TypeScript types
128
+ โ”‚ โ”œโ”€โ”€ 03-branding.md # Branding guidelines
129
+ โ”‚ โ””โ”€โ”€ .env # Environment variables
130
+ โ”œโ”€โ”€ components/ # Generated components
131
+ โ””โ”€โ”€ package.json
273
132
  ```
274
133
 
275
- ### Context File Priority
276
-
277
- When no description is provided, commands load context in this order:
278
-
279
- 1. **PRD** (`.mycontext/01-prd.md`) - Product requirements and project overview
280
- 2. **Types** (`.mycontext/02-types.ts`) - TypeScript type definitions
281
- 3. **User Stories** (`.mycontext/02_user_stories.md`) - User requirements
282
- 4. **Technical Specs** (`.mycontext/03_technical_specs.md`) - Technical details
283
- 5. **Component List** (`.mycontext/04-component-list.json`) - Component architecture
284
- 6. **Brand** (`.mycontext/03-branding.md` or `brand/globals.css`) - Design system
285
-
286
- ### Context Loading Benefits
287
-
288
- - **No Repetition**: Don't re-enter project details for every command
289
- - **Consistency**: All commands use the same project context
290
- - **Efficiency**: Faster workflow with automatic context detection
291
- - **Accuracy**: Better results with full project understanding
134
+ ## Examples
292
135
 
293
- ## ๐ŸŽฏ **Integration Guide**
294
-
295
- ### Using Generated Types
296
-
297
- ```bash
298
- # Move the types folder to your lib directory
299
- mv .mycontext/types ./lib/
300
-
301
- # Import types in your components
302
- import type { User, ApiResponse } from "@/lib/types";
303
- import { USER_ROLES } from "@/lib/types/enums";
304
- ```
305
-
306
- ### Using Generated Brand System
136
+ ### Create a Todo App
307
137
 
308
138
  ```bash
309
- # Copy the CSS to your globals.css
310
- cp .mycontext/brand/globals.css ./src/app/globals.css
311
-
312
- # Use the design tokens
313
- <div className="bg-primary text-primary-foreground p-4 rounded-lg">
314
- Hello World
315
- </div>
139
+ mycontext init todo-app --description "A modern todo application with dark mode"
140
+ cd todo-app
141
+ mycontext generate context --full
142
+ mycontext generate-components all --with-tests
316
143
  ```
317
144
 
318
- ## Key Features
319
-
320
- ### ๐Ÿค– **Agent-Driven Development**
321
-
322
- - **11 Specialized Agents**: Each agent handles specific development tasks
323
- - **Intelligent Orchestration**: Agents work together seamlessly
324
- - **Human-in-the-Loop**: Interactive prompts and confirmations
325
- - **Quality Gates**: Built-in validation and retry mechanisms
326
-
327
- ### ๐ŸŽฏ **Context-Aware Generation**
328
-
329
- - **Deep Project Understanding**: Analyzes existing codebase patterns
330
- - **A/B/C/D Context Files**: Comprehensive project specification
331
- - **Automatic Context Loading**: Commands use project context intelligently
332
- - **Consistent Results**: Same context produces consistent outputs
333
-
334
- ### ๐Ÿ—๏ธ **Production-Ready Code**
335
-
336
- - **TypeScript First**: Complete type system with 5 specialized files
337
- - **Modern React**: Next.js 15, shadcn/ui, server components
338
- - **Accessibility**: WCAG compliant components
339
- - **Testing**: Comprehensive test suites included
340
- - **Documentation**: Auto-generated component docs
341
-
342
- ### ๐ŸŽจ **Complete Design System**
343
-
344
- - **Brand Kit Generation**: Colors, typography, components
345
- - **CSS Custom Properties**: Theme-able design tokens
346
- - **Component Library**: Consistent, reusable components
347
- - **Responsive Design**: Mobile-first approach
348
-
349
- ### ๐Ÿ”ง **Developer Experience**
350
-
351
- - **Interactive CLI**: Guided workflows with progress indicators
352
- - **Multiple AI Providers**: Choose your preferred AI service
353
- - **Fallback Support**: Always works, even without API keys
354
- - **Extensible Architecture**: Plugin system for custom agents
355
-
356
- ### ๐Ÿ—„๏ธ **Database Integration**
357
-
358
- - **InstantDB Default**: Real-time database with instant synchronization
359
- - **MCP Support**: AI can directly interact with databases and external services
360
- - **Automatic Schema**: Database schema generated from project context
361
- - **Authentication**: Magic code authentication with user profiles
362
- - **CRUD Operations**: Generic database utilities for all entities
363
- - **Real-time Components**: Components automatically sync with live data
364
-
365
- ## ๐Ÿงช **Testing & Quality Assurance**
366
-
367
- ### **Quick Test Suite**
145
+ ### Work with Existing Project
368
146
 
369
147
  ```bash
370
- # Run automated test suite
371
- ./docs/quick-test.sh
372
-
373
- # Expected: All tests pass within 5 minutes
374
- # Tests: Installation, initialization, generation, timeout handling
148
+ mycontext init . --analyze
149
+ mycontext generate context --files-only
150
+ mycontext generate-components authentication
375
151
  ```
376
152
 
377
- ### **Comprehensive Testing**
153
+ ### Build Complete App
378
154
 
379
155
  ```bash
380
- # Follow detailed testing guide
381
- cat docs/TESTING_GUIDE.md
382
-
383
- # Test specific scenarios
384
- mycontext status --check-health
385
- mycontext model --test
156
+ mycontext build-app --description "E-commerce platform" --interactive
386
157
  ```
387
158
 
388
- ### **Timeout Configuration**
389
-
390
- - **Default Timeout**: 5 minutes for all AI operations
391
- - **Component Generation**: 5 minutes per component
392
- - **Context Generation**: 5 minutes for full context
393
- - **Agent Workflows**: 5 minutes per workflow step
394
-
395
- ## ๐Ÿ“ž Support & Community
396
-
397
- ### Getting Help
398
-
399
- - **๐Ÿ“ง Email**: hello@fbien.com
400
- - **๐Ÿ› Issues**: [GitHub Issues](https://github.com/farajabien/mycontext/issues)
401
- - **๐Ÿ’ฌ Discussions**: [GitHub Discussions](https://github.com/farajabien/mycontext/discussions)
402
- - **๐Ÿ“– Documentation**: [docs.mycontext.fbien.com](https://docs.mycontext.fbien.com)
403
-
404
- ### Community
405
-
406
- - **Share Components**: Contribute to the component library
407
- - **Report Bugs**: Help improve stability and reliability
408
- - **Feature Requests**: Suggest new capabilities and improvements
409
- - **Beta Testing**: Get early access to new features
159
+ ## Documentation
410
160
 
411
- ### Enterprise Support
161
+ - [Full Documentation](https://mycontext.fbien.com/docs)
162
+ - [API Reference](https://mycontext.fbien.com/docs/api)
163
+ - [Examples](https://mycontext.fbien.com/docs/examples)
412
164
 
413
- - **Custom Deployments**: On-premise and private cloud options
414
- - **White-label Solutions**: Custom branding and integration
415
- - **Dedicated Support**: Priority response and SLAs
416
- - **Training**: Team onboarding and best practices
165
+ ## Support
417
166
 
418
- ---
167
+ - [GitHub Issues](https://github.com/mycontext/cli/issues)
168
+ - [Discord Community](https://discord.gg/mycontext)
169
+ - [Documentation](https://mycontext.fbien.com/docs)
419
170
 
420
- **๐Ÿš€ Ready to transform your development workflow with AI-powered agents?**
171
+ ## License
421
172
 
422
- _Built with โค๏ธ by the MyContext team - Making AI work for developers, not against them._
173
+ MIT ยฉ MyContext
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mycontext-cli",
3
- "version": "1.0.77",
3
+ "version": "1.0.79",
4
4
  "description": "MyContext CLI - AI-powered component generation with shadcn/ui and Next.js 15 integration",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {