mycontext-cli 4.2.18 → 4.2.19

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 +469 -71
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,71 +1,469 @@
1
- # The Project
2
-
3
- A high-fidelity application built with MyContext.
4
-
5
- ## 🎯 Project Overview
6
- This project is built using a spec-driven development paradigm guided by a central 'Living Brain'.
7
-
8
- ## ✨ Key Features
9
- - **Authentication**: undefined
10
- - **Pricing Table**: undefined
11
- - **FAQ Section**: undefined
12
-
13
- ## 📂 Project Structure
14
- ```bash
15
- 📁 bao-pilot
16
- 📁 bao-pilot
17
- 📄 build-errors-2.txt
18
- 📄 build-errors.txt
19
- 📁 docs
20
- 📁 research
21
- 📁 examples
22
- 📄 mega-context-sample.json
23
- 📄 validate-context.ts
24
- 📁 experiments
25
- 📁 living-brain-blog
26
- 📁 pricing-mission
27
- 📄 jest.config.js
28
- 📄 mycontext-cli-4.2.13.tgz
29
- 📄 mycontext-cli-4.2.14.tgz
30
- 📄 mycontext-cli-4.2.15.tgz
31
- 📄 mycontext-cli-4.2.16.tgz
32
- 📄 package.json
33
- 📁 public
34
- 📁 scripts
35
- 📄 generateTypesFromSchema.ts
36
- 📄 migrate-brain.ts
37
- 📄 run-improvement-analysis.js
38
- 📄 test-tailor-cv.sh
39
- 📁 src
40
- 📁 agents
41
- 📄 cli.ts
42
- 📁 clients
43
- 📁 commands
44
- 📁 config
45
- ```
46
-
47
- ## 🚀 Quick Start
48
- 1. **Install Dependencies**:
49
- ```bash
50
- pnpm install
51
- ```
52
- 2. **Run Dev Server**:
53
- ```bash
54
- npm run dev
55
- ```
56
-
57
- <!-- mycontext:start -->
58
- ### 🎯 Project Overview
59
- AI-driven development platform.
60
-
61
- ### Key Features
62
- - Authentication
63
- - Pricing Table
64
- - FAQ Section
65
-
66
- ---
67
- _Last synchronized with MyContext Living DB on 3/10/2026_
68
- <!-- mycontext:end -->
69
-
70
- ---
71
- *Generated by MyContext CLI - Living Brain JSON Source*
1
+ # mycontext-cli
2
+
3
+ > The Context Engine for AI-Native Development.
4
+ > Generate high-fidelity scaffolds, maintain a **Living Brain**, and drive your entire codebase with a single source of truth.
5
+
6
+ [![npm version](https://img.shields.io/npm/v/mycontext-cli)](https://www.npmjs.com/package/mycontext-cli)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
8
+
9
+ ---
10
+
11
+ ## Table of Contents
12
+
13
+ - [What is MyContext?](#what-is-mycontext)
14
+ - [Installation](#installation)
15
+ - [Quick Start](#quick-start)
16
+ - [Core Concepts](#core-concepts)
17
+ - [Command Reference](#command-reference)
18
+ - [Project Setup](#project-setup)
19
+ - [Living Brain](#living-brain)
20
+ - [AI Agent & Planning](#ai-agent--planning)
21
+ - [Code Generation](#code-generation)
22
+ - [Analysis & Diagnostics](#analysis--diagnostics)
23
+ - [Maintenance](#maintenance)
24
+ - [Typical Workflow](#typical-workflow)
25
+ - [Environment Variables](#environment-variables)
26
+ - [Configuration](#configuration)
27
+
28
+ ---
29
+
30
+ ## What is MyContext?
31
+
32
+ MyContext treats your project spec as a **Living Brain** — a structured JSON document (`.mycontext/context.json`) that describes your app's goals, architecture, components, and design system. Every CLI command reads from and writes back to this Brain, keeping your code and your spec permanently in sync.
33
+
34
+ ---
35
+
36
+ ## Installation
37
+
38
+ ```bash
39
+ npm install -g mycontext-cli
40
+ # or
41
+ pnpm add -g mycontext-cli
42
+ ```
43
+
44
+ Verify:
45
+
46
+ ```bash
47
+ mycontext --version
48
+ ```
49
+
50
+ ---
51
+
52
+ ## Quick Start
53
+
54
+ ```bash
55
+ # 1. Go to your project folder (or an empty directory)
56
+ cd my-app
57
+
58
+ # 2. Initialise the Living Brain
59
+ mycontext init
60
+
61
+ # 3. Configure your AI provider
62
+ mycontext setup
63
+
64
+ # 4. Generate the full context from your PRD
65
+ mycontext generate context --full
66
+
67
+ # 5. Scaffold the entire application
68
+ mycontext build
69
+ ```
70
+
71
+ ---
72
+
73
+ ## Core Concepts
74
+
75
+ | Concept | What it is |
76
+ |---|---|
77
+ | **Living Brain** | `.mycontext/context.json` — single source of truth for your project |
78
+ | **PRD** | `.mycontext/01-prd.md` — your product requirements document |
79
+ | **Design Manifest** | AI-derived design system snapshot |
80
+ | **Sub-agents** | Specialised AI workers (CodeGen, QA, Architect, Security, …) |
81
+ | **FSR** | Feature Spec Record — structured description of a single feature |
82
+
83
+ ---
84
+
85
+ ## Command Reference
86
+
87
+ ### Project Setup
88
+
89
+ #### `mycontext init [project-name]`
90
+
91
+ Initialise a new MyContext project. Creates `.mycontext/` with your PRD template, context skeleton, and (optionally) a framework scaffold.
92
+
93
+ ```bash
94
+ mycontext init my-saas-app
95
+ mycontext init --framework nextjs # Next.js + shadcn/ui
96
+ mycontext init --framework instantdb # Next.js + InstantDB + shadcn (default)
97
+ mycontext init --framework other # MyContext files only
98
+ mycontext init --interactive # Guided 100%-complete spec wizard
99
+ mycontext init --spec-only # Context files only, no framework setup
100
+ ```
101
+
102
+ #### `mycontext setup`
103
+
104
+ Configure AI providers (Anthropic, OpenAI, xAI) and your development stack.
105
+
106
+ ```bash
107
+ mycontext setup
108
+ mycontext setup --stack nextjs-tailwind-shadcn
109
+ ```
110
+
111
+ #### `mycontext auth`
112
+
113
+ Authenticate with the MyContext AI cloud service.
114
+
115
+ ```bash
116
+ mycontext auth --login
117
+ mycontext auth --status
118
+ mycontext auth --logout
119
+ ```
120
+
121
+ #### `mycontext setup-shadcn`
122
+
123
+ Add shadcn/ui to an existing project and wire it to the Living Brain.
124
+
125
+ #### `mycontext setup-database`
126
+
127
+ Set up a database provider (InstantDB, Supabase, Firebase) with schema and auth components.
128
+
129
+ ```bash
130
+ mycontext setup-database --provider instantdb
131
+ ```
132
+
133
+ #### `mycontext setup-instantdb`
134
+
135
+ Full InstantDB + MCP integration wizard.
136
+
137
+ ```bash
138
+ mycontext setup-instantdb --app-id <id> --token <token>
139
+ ```
140
+
141
+ #### `mycontext setup-mcp`
142
+
143
+ Configure a Model Context Protocol (MCP) server for AI-powered tooling.
144
+
145
+ ```bash
146
+ mycontext setup-mcp --provider instantdb
147
+ mycontext setup-mcp --provider github
148
+ mycontext setup-mcp --provider custom --server <url>
149
+ ```
150
+
151
+ ---
152
+
153
+ ### Living Brain
154
+
155
+ #### `mycontext generate [type]`
156
+
157
+ Orchestrate the Living Brain — generate context files, types, brand tokens, and more.
158
+
159
+ ```bash
160
+ mycontext generate context --full # Full PRD + A/B/C/D context files
161
+ mycontext generate context # Incremental update
162
+ mycontext generate --from-schema # Types from InstantDB schema
163
+ mycontext generate design-prompt # AI design brief
164
+ mycontext generate screens # Screen list from user flows
165
+ mycontext generate components-manifest # Component props + sample data
166
+ mycontext generate actions # UI→backend action hooks
167
+ mycontext generate assets # Planned asset list
168
+ mycontext generate sample-data # Seed data for development
169
+ ```
170
+
171
+ #### `mycontext sync`
172
+
173
+ Auto-update `context.json` and `README.md` by scanning the live codebase.
174
+
175
+ ```bash
176
+ mycontext sync # Sync both
177
+ mycontext sync --context # context.json only
178
+ mycontext sync --readme # README.md only
179
+ mycontext sync --dry-run # Preview changes without writing
180
+ ```
181
+
182
+ #### `mycontext sync-readme`
183
+
184
+ Synchronise the root `README.md` with your design manifest.
185
+
186
+ #### `mycontext validate <target>`
187
+
188
+ Validate your PRD or context files for completeness.
189
+
190
+ ```bash
191
+ mycontext validate prd
192
+ mycontext validate context
193
+ mycontext validate --interactive
194
+ ```
195
+
196
+ #### `mycontext status`
197
+
198
+ Show current project status and progress against the Living Brain.
199
+
200
+ ```bash
201
+ mycontext status
202
+ mycontext status --detailed
203
+ ```
204
+
205
+ ---
206
+
207
+ ### AI Agent & Planning
208
+
209
+ #### `mycontext agent [prompt]`
210
+
211
+ Assess a natural-language prompt against the Living Brain and propose (or apply) changes.
212
+
213
+ ```bash
214
+ mycontext agent "Add a dark mode toggle to the nav"
215
+ mycontext agent "Add a dark mode toggle" --execute # Apply changes
216
+ mycontext agent "..." --execute --yes # Skip confirmation
217
+ ```
218
+
219
+ #### `mycontext plan`
220
+
221
+ Interactive feature planning session — produces an FSR (Feature Spec Record).
222
+
223
+ ```bash
224
+ mycontext plan
225
+ ```
226
+
227
+ #### `mycontext build-strategy`
228
+
229
+ Generate an AI-powered build strategy and execution plan from the current Brain state.
230
+
231
+ #### `mycontext ideate`
232
+
233
+ Generate creative UI/UX concepts based on project context.
234
+
235
+ ```bash
236
+ mycontext ideate --industry fintech --count 5
237
+ ```
238
+
239
+ ---
240
+
241
+ ### Code Generation
242
+
243
+ #### `mycontext build`
244
+
245
+ Scaffold the **entire** application from the Living Brain in one shot.
246
+
247
+ ```bash
248
+ mycontext build
249
+ mycontext build --force # Regenerate all components
250
+ ```
251
+
252
+ #### `mycontext build-feature`
253
+
254
+ Build a single feature end-to-end from an FSR.
255
+
256
+ #### `mycontext generate-components [target]`
257
+
258
+ Generate React components from the component manifest.
259
+
260
+ ```bash
261
+ mycontext generate-components all
262
+ mycontext generate-components --core-only # First 10 components only
263
+ mycontext generate-components --group forms
264
+ mycontext generate-components all --with-tests
265
+ ```
266
+
267
+ #### `mycontext add <component>`
268
+
269
+ Add a context-aware component (shadcn primitive or custom).
270
+
271
+ ```bash
272
+ mycontext add button
273
+ mycontext add UserCard --group cards
274
+ mycontext add dialog --shadcn
275
+ ```
276
+
277
+ #### `mycontext enhance`
278
+
279
+ Enhance the project or specific components with AI suggestions.
280
+
281
+ #### `mycontext refine`
282
+
283
+ Refine context or components.
284
+
285
+ #### `mycontext refine:component <componentName>`
286
+
287
+ Refine a single component with targeted AI feedback.
288
+
289
+ ```bash
290
+ mycontext refine:component HeroSection --variant mobile
291
+ mycontext refine:component NavBar --in-place
292
+ ```
293
+
294
+ #### `mycontext migrate [target]`
295
+
296
+ Migrate components to new standards.
297
+
298
+ ```bash
299
+ mycontext migrate rtl # RTL-friendly logical CSS properties
300
+ mycontext migrate rtl --path src/components/Nav.tsx
301
+ mycontext migrate radix --all # Refactor to Radix/shadcn primitives
302
+ ```
303
+
304
+ ---
305
+
306
+ ### Analysis & Diagnostics
307
+
308
+ #### `mycontext analyze`
309
+
310
+ Analyse an **existing** project and generate context files from the live codebase.
311
+
312
+ ```bash
313
+ mycontext analyze
314
+ mycontext analyze --image ./screenshot.png # Analyse a mockup instead
315
+ mycontext analyze --verbose
316
+ ```
317
+
318
+ #### `mycontext design`
319
+
320
+ Design system analysis and manifest generation.
321
+
322
+ ```bash
323
+ mycontext design --analyze
324
+ mycontext design --validate
325
+ mycontext design --summary
326
+ mycontext design --regenerate
327
+ ```
328
+
329
+ #### `mycontext scan`
330
+
331
+ Scan the project tree and assess progress against the Living Brain.
332
+
333
+ ```bash
334
+ mycontext scan
335
+ mycontext scan --assess # AI progress assessment
336
+ mycontext scan --assess --json # Machine-readable output
337
+ ```
338
+
339
+ #### `mycontext health-check`
340
+
341
+ Run health checks across the project.
342
+
343
+ #### `mycontext doctor`
344
+
345
+ Full diagnostic check with auto-fix suggestions.
346
+
347
+ #### `mycontext sanitize`
348
+
349
+ Find and optionally remove redundant, duplicate, or unreachable code.
350
+
351
+ ```bash
352
+ mycontext sanitize
353
+ mycontext sanitize --fix
354
+ mycontext sanitize --verbose
355
+ ```
356
+
357
+ #### `mycontext generate-todos`
358
+
359
+ Generate a contextual todo list from the project's current state.
360
+
361
+ ```bash
362
+ mycontext generate-todos --count 10 --energy high --complexity moderate
363
+ ```
364
+
365
+ ---
366
+
367
+ ### Maintenance
368
+
369
+ #### `mycontext update`
370
+
371
+ Update the CLI to the latest published version.
372
+
373
+ ```bash
374
+ mycontext update
375
+ ```
376
+
377
+ #### `mycontext clean`
378
+
379
+ Clean and repair malformed context files.
380
+
381
+ ```bash
382
+ mycontext clean
383
+ mycontext clean --project ./path/to/project
384
+ ```
385
+
386
+ #### `mycontext help [topic]`
387
+
388
+ Context-aware help for any topic or command.
389
+
390
+ ```bash
391
+ mycontext help
392
+ mycontext help agent
393
+ mycontext help generate --verbose
394
+ ```
395
+
396
+ ---
397
+
398
+ ## Typical Workflow
399
+
400
+ ### Starting a new project
401
+
402
+ ```bash
403
+ mkdir my-app && cd my-app
404
+ mycontext init --interactive # Guided spec wizard
405
+ mycontext setup # Configure AI keys
406
+ mycontext generate context --full # Build the Living Brain
407
+ mycontext generate components-manifest
408
+ mycontext build # Scaffold the whole app
409
+ ```
410
+
411
+ ### Adding a feature to an existing project
412
+
413
+ ```bash
414
+ mycontext plan # Describe the feature interactively
415
+ mycontext build-feature # Generate code from the FSR
416
+ mycontext sync # Keep context.json in sync
417
+ ```
418
+
419
+ ### Adopting MyContext on an existing codebase
420
+
421
+ ```bash
422
+ cd existing-project
423
+ mycontext analyze # Reverse-engineer context from code
424
+ mycontext generate context # Fill gaps with AI
425
+ mycontext status # See what's covered
426
+ ```
427
+
428
+ ---
429
+
430
+ ## Environment Variables
431
+
432
+ MyContext loads `.env` files from your project automatically. You can also set these directly:
433
+
434
+ | Variable | Description |
435
+ |---|---|
436
+ | `ANTHROPIC_API_KEY` | Anthropic Claude API key |
437
+ | `OPENAI_API_KEY` | OpenAI API key |
438
+ | `XAI_API_KEY` | xAI (Grok) API key |
439
+ | `MYCONTEXT_API_KEY` | MyContext cloud service key |
440
+ | `INSTANTDB_APP_ID` | InstantDB application ID |
441
+
442
+ Loaded in order (first match wins):
443
+ `.mycontext/.env.local` → `.mycontext/.env` → `.env.local` → `.env`
444
+
445
+ ---
446
+
447
+ ## Configuration
448
+
449
+ All project configuration lives in `.mycontext/`:
450
+
451
+ ```
452
+ .mycontext/
453
+ ├── context.json ← Living Brain (source of truth)
454
+ ├── 01-prd.md ← Product Requirements Document
455
+ ├── .env.local ← Local secrets (git-ignored)
456
+ └── ... ← Generated context files
457
+ ```
458
+
459
+ ---
460
+
461
+ ## Links
462
+
463
+ - [GitHub](https://github.com/farajabien/mycontext-cli)
464
+ - [Issues](https://github.com/farajabien/mycontext-cli/issues)
465
+ - [npm](https://www.npmjs.com/package/mycontext-cli)
466
+
467
+ ---
468
+
469
+ *Built with MyContext — spec-driven development for the AI era.*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mycontext-cli",
3
- "version": "4.2.18",
3
+ "version": "4.2.19",
4
4
  "description": "The Context Engine for AI-Native Development - Generate high-fidelity scaffolds and Living Brains for AI-powered coding",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {