mycontext-cli 1.0.77 โ†’ 1.0.78

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 +90 -354
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,419 +4,155 @@
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"
20
+ # Initialize a new project
21
+ mycontext init my-project
37
22
 
38
- # Generate only A/B/C/D files (requires existing PRD)
39
- mycontext generate context --files-only
40
-
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 (Qwen3 Coder - FREE!)
24
+ echo 'MYCONTEXT_QWEN_API_KEY=sk-or-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
31
 
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
32
+ # Generate components
33
+ mycontext generate-components all --with-tests
66
34
  ```
67
35
 
68
- ### 4. Complete Application Build (Agent Orchestration)
36
+ ## Features
69
37
 
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
79
- ```
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 (no API key required for basic usage)
80
44
 
81
- ## ๐ŸŽฏ Core Commands
45
+ ## Commands
82
46
 
83
- ### Context & Planning
47
+ ### Project Setup
84
48
 
85
49
  ```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
50
+ mycontext init <project-name> # Initialize new project
51
+ mycontext setup # Configure AI providers
52
+ mycontext analyze # Analyze existing project
91
53
  ```
92
54
 
93
- ### Database & MCP Setup
55
+ ### Context Generation
94
56
 
95
57
  ```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
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
99
63
  ```
100
64
 
101
- ### Component Generation
65
+ ### Component Development
102
66
 
103
67
  ```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
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
107
72
  ```
108
73
 
109
- ### Interactive & Management
74
+ ### Project Management
110
75
 
111
76
  ```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
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
116
81
  ```
117
82
 
118
- ## Advanced Commands
119
-
120
- ```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
135
- ```
83
+ ## Configuration
136
84
 
137
- ## ๐Ÿ“ฆ What You Get (Updated Structure)
85
+ ### AI Providers
138
86
 
139
- ### Context Files (A/B/C/D Workflow)
87
+ MyContext supports multiple AI providers:
140
88
 
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
89
+ 1. **Qwen3 Coder (Recommended - FREE)**
146
90
 
147
- ### Generated Assets
91
+ ```bash
92
+ echo 'MYCONTEXT_QWEN_API_KEY=sk-or-xxx' > .mycontext/.env
93
+ ```
148
94
 
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
95
+ 2. **GitHub Models (Self-hosted)**
163
96
 
164
- ## ๐Ÿค– Agent Architecture
97
+ ```bash
98
+ echo 'MYCONTEXT_GITHUB_TOKEN=ghp_xxx' > .mycontext/.env
99
+ ```
165
100
 
166
- MyContext features a sophisticated multi-agent system with 11 specialized AI agents:
101
+ 3. **OpenAI (Paid)**
102
+ ```bash
103
+ echo 'OPENAI_API_KEY=sk-xxx' > .mycontext/.env
104
+ ```
167
105
 
168
- ### Core Agents
106
+ ### Project Structure
169
107
 
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
187
-
188
- ```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
193
108
  ```
194
-
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
205
-
206
- ## ๐Ÿค– AI Provider Options
207
-
208
- MyContext supports multiple AI providers with intelligent fallback:
209
-
210
- ### **Bring Your Own Keys (BYOK)**
211
-
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 |
219
-
220
- ### **Provider Priority Chain**
221
-
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
235
-
236
- # Or GitHub Models (Fast, high-quality)
237
- echo 'MYCONTEXT_GITHUB_TOKEN=ghp_xxx' > .mycontext/.env
238
-
239
- # Or Claude (Best for complex reasoning)
240
- echo 'MYCONTEXT_CLAUDE_API_KEY=sk-ant-xxx' > .mycontext/.env
241
-
242
- # Or OpenAI (Most versatile)
243
- echo 'MYCONTEXT_OPENAI_API_KEY=sk-xxx' > .mycontext/.env
244
-
245
- # Or X.AI (Creative tasks)
246
- echo 'MYCONTEXT_GROK_TOKEN=xai-xxx' > .mycontext/.env
109
+ my-project/
110
+ โ”œโ”€โ”€ .mycontext/ # MyContext configuration
111
+ โ”‚ โ”œโ”€โ”€ 01-prd.md # Product Requirements Document
112
+ โ”‚ โ”œโ”€โ”€ 02-types.ts # TypeScript types
113
+ โ”‚ โ”œโ”€โ”€ 03-branding.md # Branding guidelines
114
+ โ”‚ โ””โ”€โ”€ .env # Environment variables
115
+ โ”œโ”€โ”€ components/ # Generated components
116
+ โ””โ”€โ”€ package.json
247
117
  ```
248
118
 
249
- ### Option 2: Local AI Setup (Free & Unlimited)
250
-
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
119
+ ## Examples
255
120
 
256
- # Set up MyContext local AI
257
- mycontext setup
258
-
259
- # Verify setup
260
- mycontext model status
261
- ```
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
273
- ```
274
-
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
292
-
293
- ## ๐ŸŽฏ **Integration Guide**
294
-
295
- ### Using Generated Types
121
+ ### Create a Todo App
296
122
 
297
123
  ```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";
124
+ mycontext init todo-app --description "A modern todo application with dark mode"
125
+ cd todo-app
126
+ mycontext generate context --full
127
+ mycontext generate-components all --with-tests
304
128
  ```
305
129
 
306
- ### Using Generated Brand System
130
+ ### Work with Existing Project
307
131
 
308
132
  ```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>
316
- ```
317
-
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**
368
-
369
- ```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
133
+ mycontext init . --analyze
134
+ mycontext generate context --files-only
135
+ mycontext generate-components authentication
375
136
  ```
376
137
 
377
- ### **Comprehensive Testing**
138
+ ### Build Complete App
378
139
 
379
140
  ```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
141
+ mycontext build-app --description "E-commerce platform" --interactive
386
142
  ```
387
143
 
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
144
+ ## Documentation
410
145
 
411
- ### Enterprise Support
146
+ - [Full Documentation](https://mycontext.fbien.com/docs)
147
+ - [API Reference](https://mycontext.fbien.com/docs/api)
148
+ - [Examples](https://mycontext.fbien.com/docs/examples)
412
149
 
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
150
+ ## Support
417
151
 
418
- ---
152
+ - [GitHub Issues](https://github.com/mycontext/cli/issues)
153
+ - [Discord Community](https://discord.gg/mycontext)
154
+ - [Documentation](https://mycontext.fbien.com/docs)
419
155
 
420
- **๐Ÿš€ Ready to transform your development workflow with AI-powered agents?**
156
+ ## License
421
157
 
422
- _Built with โค๏ธ by the MyContext team - Making AI work for developers, not against them._
158
+ 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.78",
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": {