mycontext-cli 4.2.13 β 4.2.15
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 +60 -41
- package/package.json +3 -5
- package/dist/README.md +0 -86
- package/dist/package.json +0 -111
package/README.md
CHANGED
|
@@ -9,66 +9,85 @@ MyContext is not an AI code generatorβit's a natural-language-to-project compi
|
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## π§ Core Philosophy
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
### Zero-Hallucination Compilation
|
|
15
|
+
Most AI tools act as "chat-driven coders" that guess your requirements. MyContext acts as a **Natural Language Compiler**:
|
|
16
|
+
1. **Analyze**: LLM parses your intent into a strict JSON manifest (FSR).
|
|
17
|
+
2. **Clarify**: The CLI identifies gaps and prompts you *before* any code is written.
|
|
18
|
+
3. **Generate**: Deterministic script templates render valid, typed Next.js code.
|
|
15
19
|
|
|
16
|
-
###
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
20
|
+
### The Living Brain (`.mycontext/`)
|
|
21
|
+
Every project is governed by a local "brain" folder that ensures your code, types, and design tokens never drift:
|
|
22
|
+
- `context.json`: The master source of truth for your project features.
|
|
23
|
+
- `design_manifest.json`: Your premium design tokens and layout rules.
|
|
24
|
+
- `registry/`: Automated tracking of all generated components and actions.
|
|
21
25
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## π NEW: Phase 0.7 Premium Features (VERIFIED β)
|
|
29
|
+
|
|
30
|
+
- **Smart Layout Engine**: Autonomic 8/12 grid placement based on component `weight`.
|
|
31
|
+
- **Test-Mode Fast-Forward**: Detects `__MYCONTEXT_TEST_MODE__` to speed up animations 60x.
|
|
32
|
+
- **Auto-Test Generation**: `mycontext test:generate` creates Playwright specs from your FSR.
|
|
33
|
+
- **Density Guardrails**: Visual checks to prevent "rammed UI" and visual clutter.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## ποΈ Full Project Workflow
|
|
26
38
|
|
|
27
|
-
###
|
|
28
|
-
|
|
39
|
+
### 1. Initialization (`mycontext init`)
|
|
40
|
+
Set up your framework (InstantDB, Next.js, or shadcn) and establish the project brain.
|
|
29
41
|
```bash
|
|
30
|
-
mycontext
|
|
42
|
+
mycontext init --interactive
|
|
31
43
|
```
|
|
32
|
-
-
|
|
44
|
+
*AI auto-infers 90% of your spec, reducing setup from 15 mins to 2 mins.*
|
|
33
45
|
|
|
34
|
-
###
|
|
35
|
-
|
|
46
|
+
### 2. Feature Planning (`mycontext plan`)
|
|
47
|
+
Translate a feature request into a strict FSR (Feature Structured Representation).
|
|
36
48
|
```bash
|
|
37
|
-
mycontext
|
|
49
|
+
mycontext plan "A gallery for removed background images with token display"
|
|
38
50
|
```
|
|
39
|
-
- Automatically flags nested card patterns and visual clutter to maintain a premium aesthetic score.
|
|
40
|
-
|
|
41
|
-
---
|
|
42
51
|
|
|
43
|
-
|
|
52
|
+
### 3. Deterministic Build (`mycontext build`)
|
|
53
|
+
Compile your FSR into production-ready code.
|
|
54
|
+
```bash
|
|
55
|
+
mycontext build --feature gallery
|
|
56
|
+
```
|
|
44
57
|
|
|
45
|
-
###
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
58
|
+
### 4. Continuous Sync (`mycontext sync`)
|
|
59
|
+
Automatically update your documentation and `context.json` brain as your code evolves.
|
|
60
|
+
```bash
|
|
61
|
+
mycontext sync --readme
|
|
62
|
+
```
|
|
49
63
|
|
|
50
|
-
###
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
64
|
+
### 5. Diagnostics (`mycontext doctor`)
|
|
65
|
+
Verify type safety, catch schema drift, and check for "as any" usage.
|
|
66
|
+
```bash
|
|
67
|
+
mycontext doctor --verbose
|
|
68
|
+
```
|
|
55
69
|
|
|
56
70
|
---
|
|
57
71
|
|
|
58
|
-
## π¦
|
|
59
|
-
|
|
60
|
-
### Installation
|
|
72
|
+
## π¦ Installation
|
|
61
73
|
```bash
|
|
62
|
-
# Install globally
|
|
63
74
|
npm install -g mycontext-cli
|
|
64
75
|
```
|
|
65
76
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## π£οΈ Roadmap
|
|
80
|
+
- [x] **Phase 0.6**: Deterministic Scaffolding & Token Tracking
|
|
81
|
+
- [x] **Phase 0.7**: Premium Layout Engine & Test-Mode
|
|
82
|
+
- [ ] **Phase 1**: Global Registry & Multi-Agent Orchestration
|
|
83
|
+
- [ ] **Phase 2**: Granular component-level targeted LLM refactors
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## π License & Links
|
|
88
|
+
MIT Β© [MyContext Team](https://github.com/farajabien/mycontext-cli)
|
|
89
|
+
- [Documentation](https://mycontext.framer.website)
|
|
90
|
+
- [NPM: mycontext-cli](https://www.npmjs.com/package/mycontext-cli)
|
|
72
91
|
|
|
73
92
|
---
|
|
74
93
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mycontext-cli",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.15",
|
|
4
4
|
"description": "CLI tool for spec-driven development - Generate comprehensive context, visual screens, and scaffolding for AI-powered coding",
|
|
5
5
|
"main": "dist/cli.js",
|
|
6
6
|
"bin": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"build:clean": "rm -rf dist && ([ \"$npm_config_loglevel\" = \"silent\" ] || echo 'π§Ή Cleaned build directory')",
|
|
13
13
|
"build:compile": "([ \"$npm_config_loglevel\" = \"silent\" ] || echo 'π¨ Compiling TypeScript...') && tsc --noEmitOnError false",
|
|
14
14
|
"build:alias": "([ \"$npm_config_loglevel\" = \"silent\" ] || echo 'π Resolving path aliases...') && tsc-alias",
|
|
15
|
-
"build:copy": "([ \"$npm_config_loglevel\" = \"silent\" ] || echo 'π Copying config files...') && cp -r src/config dist/ && cp -r src/templates dist/ &&
|
|
15
|
+
"build:copy": "([ \"$npm_config_loglevel\" = \"silent\" ] || echo 'π Copying config files...') && cp -r src/config dist/ && cp -r src/templates dist/ && chmod +x dist/cli.js && ([ \"$npm_config_loglevel\" = \"silent\" ] || echo 'β
Build complete')",
|
|
16
16
|
"dev": "ts-node src/cli.ts",
|
|
17
17
|
"start": "node dist/cli.js",
|
|
18
18
|
"watch": "tsc --watch --pretty",
|
|
@@ -103,9 +103,7 @@
|
|
|
103
103
|
"node": ">=18"
|
|
104
104
|
},
|
|
105
105
|
"files": [
|
|
106
|
-
"dist/"
|
|
107
|
-
"README.md",
|
|
108
|
-
"package.json"
|
|
106
|
+
"dist/"
|
|
109
107
|
],
|
|
110
108
|
"packageManager": "pnpm@10.11.0+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977"
|
|
111
109
|
}
|
package/dist/README.md
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
# MyContext CLI β Deterministic Full-Stack App Compiler
|
|
2
|
-
|
|
3
|
-
Transform natural language into production-ready Next.js applications through deterministic compilation.
|
|
4
|
-
|
|
5
|
-
MyContext is not an AI code generatorβit's a natural-language-to-project compiler that uses LLMs only for intent parsing, while all code generation is performed by deterministic script templates. No hallucinations. No guessing. Just facts β manifest β complete application.
|
|
6
|
-
|
|
7
|
-
[](https://www.npmjs.com/package/mycontext-cli)
|
|
8
|
-
[](https://opensource.org/licenses/MIT)
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## π NEW: Phase 0.7 β Premium Product Engineering (VERIFIED β)
|
|
13
|
-
|
|
14
|
-
MyContext has evolved from a basic scaffolder into a high-fidelity **Product Engineering Partner**.
|
|
15
|
-
|
|
16
|
-
### 1. Smart Layout Engine (8/12 Grid)
|
|
17
|
-
MyContext now intelligently places components based on their functional `weight`.
|
|
18
|
-
- **Primary Components**: Automatically assigned to the 8-column main content area.
|
|
19
|
-
- **Secondary Components**: Placed in a 4-column side-rail for tools, status, or navigation.
|
|
20
|
-
- **Result**: Perfectly balanced, premium-grade layouts without manual CSS tweaking.
|
|
21
|
-
|
|
22
|
-
### 2. Test-Mode Fast-Forward
|
|
23
|
-
Generated stateful components are now "test-aware."
|
|
24
|
-
- When `window.__MYCONTEXT_TEST_MODE__` is detected, 3-second "AI thinking" simulations fast-forward to **100ms**.
|
|
25
|
-
- **Result**: Blazing fast automated test suites (60x speed improvement).
|
|
26
|
-
|
|
27
|
-
### 3. FSR-Driven Test Generation (`mycontext test:generate`)
|
|
28
|
-
Stop writing boilerplate tests. MyContext now generates Playwright specs directly from your FSR (Feature Structured Representation).
|
|
29
|
-
```bash
|
|
30
|
-
mycontext test:generate --feature <feature-name>
|
|
31
|
-
```
|
|
32
|
-
- **Result**: Functional test coverage for your entire feature flow in seconds.
|
|
33
|
-
|
|
34
|
-
### 4. Visual Density Guardrails
|
|
35
|
-
Built-in vision-test detection for "Rammed UI" syndrome.
|
|
36
|
-
```bash
|
|
37
|
-
mycontext test:vision --check-density
|
|
38
|
-
```
|
|
39
|
-
- Automatically flags nested card patterns and visual clutter to maintain a premium aesthetic score.
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
## ποΈ How it Works
|
|
44
|
-
|
|
45
|
-
### 1. The Planner (`mycontext plan`)
|
|
46
|
-
Listens to your natural language intent and auto-infers up to **90% of your specification**.
|
|
47
|
-
- It decomposes your project into a strict, validated JSON AST called the **Feature Structured Representation (FSR)**.
|
|
48
|
-
- Reduces setup time from 15 minutes to **2 minutes**.
|
|
49
|
-
|
|
50
|
-
### 2. The Generator (`mycontext build`)
|
|
51
|
-
Deterministically renders the FSR AST into high-fidelity Next.js output files.
|
|
52
|
-
- **Pages & Layouts**: Next.js 15+ App Router patterns.
|
|
53
|
-
- **Components**: shadcn/ui integration with premium design tokens.
|
|
54
|
-
- **Logic**: Decoupled event-driven architecture using DOM events.
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
## π¦ Quick Start
|
|
59
|
-
|
|
60
|
-
### Installation
|
|
61
|
-
```bash
|
|
62
|
-
# Install globally
|
|
63
|
-
npm install -g mycontext-cli
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Usage Workflow
|
|
67
|
-
1. **Plan**: `mycontext plan "build a background removal tool with token tracking"`
|
|
68
|
-
2. **Review**: Adjust the generated `.fsr.json` blueprint.
|
|
69
|
-
3. **Build**: `mycontext build --feature removebg`
|
|
70
|
-
4. **Test**: `mycontext test:generate --feature removebg`
|
|
71
|
-
5. **Score**: `mycontext build --score` (Verify premium design tokens)
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
## π£οΈ Roadmap
|
|
76
|
-
- [x] **Phase 0.6**: Deterministic Scaffolding & Token Tracking
|
|
77
|
-
- [x] **Phase 0.7**: Premium Layout Engine & Test-Mode
|
|
78
|
-
- [ ] **Phase 1**: Global Registry & Multi-Agent Orchestration
|
|
79
|
-
- [ ] **Phase 2**: Granular component-level targeted LLM refactors
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
## π License & Links
|
|
84
|
-
MIT Β© [MyContext Team](https://github.com/farajabien/mycontext-cli)
|
|
85
|
-
- [Documentation](https://mycontext.framer.website)
|
|
86
|
-
- [NPM: mycontext-cli](https://www.npmjs.com/package/mycontext-cli)
|
package/dist/package.json
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "mycontext-cli",
|
|
3
|
-
"version": "4.2.13",
|
|
4
|
-
"description": "CLI tool for spec-driven development - Generate comprehensive context, visual screens, and scaffolding for AI-powered coding",
|
|
5
|
-
"main": "dist/cli.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"mycontext-cli": "dist/cli.js",
|
|
8
|
-
"mycontext": "dist/cli.js"
|
|
9
|
-
},
|
|
10
|
-
"scripts": {
|
|
11
|
-
"build": "npm run build:clean && npm run build:compile && npm run build:alias && npm run build:copy",
|
|
12
|
-
"build:clean": "rm -rf dist && ([ \"$npm_config_loglevel\" = \"silent\" ] || echo 'π§Ή Cleaned build directory')",
|
|
13
|
-
"build:compile": "([ \"$npm_config_loglevel\" = \"silent\" ] || echo 'π¨ Compiling TypeScript...') && tsc --noEmitOnError false",
|
|
14
|
-
"build:alias": "([ \"$npm_config_loglevel\" = \"silent\" ] || echo 'π Resolving path aliases...') && tsc-alias",
|
|
15
|
-
"build:copy": "([ \"$npm_config_loglevel\" = \"silent\" ] || echo 'π Copying config files...') && cp -r src/config dist/ && cp -r src/templates dist/ && cp package.json dist/ && cp README.md dist/ && chmod +x dist/cli.js && ([ \"$npm_config_loglevel\" = \"silent\" ] || echo 'β
Build complete')",
|
|
16
|
-
"dev": "ts-node src/cli.ts",
|
|
17
|
-
"start": "node dist/cli.js",
|
|
18
|
-
"watch": "tsc --watch --pretty",
|
|
19
|
-
"test": "jest --passWithNoTests",
|
|
20
|
-
"test:watch": "jest --watch --passWithNoTests",
|
|
21
|
-
"test:coverage": "jest --coverage --passWithNoTests",
|
|
22
|
-
"test:integration": "jest --testPathPattern=integration --passWithNoTests",
|
|
23
|
-
"test:unit": "jest --testPathPattern=unit --passWithNoTests",
|
|
24
|
-
"lint": "eslint src/**/*.ts --quiet",
|
|
25
|
-
"lint:fix": "eslint src/**/*.ts --fix --quiet",
|
|
26
|
-
"prepublishOnly": "echo 'Skipping tests and lint for now' && npm run build"
|
|
27
|
-
},
|
|
28
|
-
"keywords": [
|
|
29
|
-
"mycontext",
|
|
30
|
-
"mycontext-ai",
|
|
31
|
-
"mycontext-cli",
|
|
32
|
-
"mycontext-components",
|
|
33
|
-
"ai",
|
|
34
|
-
"components",
|
|
35
|
-
"shadcn",
|
|
36
|
-
"nextjs",
|
|
37
|
-
"typescript",
|
|
38
|
-
"react"
|
|
39
|
-
],
|
|
40
|
-
"author": "MyContext",
|
|
41
|
-
"license": "MIT",
|
|
42
|
-
"repository": {
|
|
43
|
-
"type": "git",
|
|
44
|
-
"url": "git+https://github.com/farajabien/mycontext-cli.git",
|
|
45
|
-
"directory": "apps/cli"
|
|
46
|
-
},
|
|
47
|
-
"homepage": "https://github.com/farajabien/mycontext-cli#readme",
|
|
48
|
-
"bugs": {
|
|
49
|
-
"url": "https://github.com/farajabien/mycontext-cli/issues"
|
|
50
|
-
},
|
|
51
|
-
"dependencies": {
|
|
52
|
-
"@anthropic-ai/claude-agent-sdk": "^0.1.1",
|
|
53
|
-
"@google-cloud/vertexai": "^1.10.0",
|
|
54
|
-
"@google/generative-ai": "^0.24.1",
|
|
55
|
-
"@huggingface/inference": "^4.11.1",
|
|
56
|
-
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
57
|
-
"@myycontext/core": "workspace:*",
|
|
58
|
-
"@playwright/test": "^1.58.2",
|
|
59
|
-
"@types/figlet": "^1.7.0",
|
|
60
|
-
"@types/handlebars": "^4.1.0",
|
|
61
|
-
"axios": "^1.6.0",
|
|
62
|
-
"chalk": "^5.6.2",
|
|
63
|
-
"commander": "^11.1.0",
|
|
64
|
-
"diff": "^8.0.2",
|
|
65
|
-
"dotenv": "^17.2.3",
|
|
66
|
-
"dotenv-expand": "^12.0.3",
|
|
67
|
-
"figlet": "^1.9.3",
|
|
68
|
-
"fs-extra": "^11.3.2",
|
|
69
|
-
"fuse.js": "^7.1.0",
|
|
70
|
-
"glob": "^10.3.10",
|
|
71
|
-
"gradient-string": "^3.0.0",
|
|
72
|
-
"handlebars": "^4.7.8",
|
|
73
|
-
"inquirer": "^9.2.12",
|
|
74
|
-
"mdast-util-to-markdown": "^2.1.2",
|
|
75
|
-
"node-fetch": "^2.7.0",
|
|
76
|
-
"openai": "^6.2.0",
|
|
77
|
-
"ora": "^7.0.1",
|
|
78
|
-
"playwright": "^1.58.2",
|
|
79
|
-
"prompts": "^2.4.2",
|
|
80
|
-
"remark-parse": "^11.0.0",
|
|
81
|
-
"sonner": "^2.0.7",
|
|
82
|
-
"unified": "^11.0.5",
|
|
83
|
-
"uuid": "^9.0.1",
|
|
84
|
-
"zod": "^3.25.76"
|
|
85
|
-
},
|
|
86
|
-
"devDependencies": {
|
|
87
|
-
"@types/fs-extra": "^11.0.4",
|
|
88
|
-
"@types/glob": "^8.1.0",
|
|
89
|
-
"@types/inquirer": "^9.0.7",
|
|
90
|
-
"@types/jest": "^29.0.0",
|
|
91
|
-
"@types/node": "^20.0.0",
|
|
92
|
-
"@types/node-fetch": "^2.6.13",
|
|
93
|
-
"@types/prompts": "^2.4.9",
|
|
94
|
-
"@types/uuid": "^9.0.7",
|
|
95
|
-
"jest": "^29.0.0",
|
|
96
|
-
"ts-jest": "^29.4.0",
|
|
97
|
-
"ts-node": "^10.9.0",
|
|
98
|
-
"tsc-alias": "^1.8.16",
|
|
99
|
-
"tsx": "^4.20.6",
|
|
100
|
-
"typescript": "^5.0.0"
|
|
101
|
-
},
|
|
102
|
-
"engines": {
|
|
103
|
-
"node": ">=18"
|
|
104
|
-
},
|
|
105
|
-
"files": [
|
|
106
|
-
"dist/",
|
|
107
|
-
"README.md",
|
|
108
|
-
"package.json"
|
|
109
|
-
],
|
|
110
|
-
"packageManager": "pnpm@10.11.0+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977"
|
|
111
|
-
}
|