You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CodeRio can be seamlessly integrated into Cursor as a Skill. Simply input a prompt like **"Create a React project and restore this design with high fidelity,"** along with your output directory, Figma URL([Design Link](https://www.figma.com/design/c0UBII8lURfxZIY8W6tSDR/Top-16-Websites-of-2024---Awwwards--Community-?node-id=30-8264&t=FB3Hohq2nsH7ZFts-4)), and Token. The Agent will guide you step-by-step through the page generation process. For Landing Pages, it achieves **high-fidelity restoration**, accurately reproducing images and styles. It also automatically encapsulates reusable components (such as cards) and strictly adheres to **frontend development best practices**.
-[Figma Personal Access Token](https://www.figma.com/developers/api#access-tokens)
69
+
-**Figma Link**: Select a Frame or Component in Figma, right-click, and choose **Copy link to selection** ([Reference](docs/figma-link.jpg)).
69
70
- LLM API Key ([Anthropic](https://console.anthropic.com/) | [OpenAI](https://platform.openai.com/) | [Google](https://aistudio.google.com/))
70
71
71
72
#### 2. Installation
@@ -78,35 +79,33 @@ npm install -g coderio
78
79
pnpm add -g coderio
79
80
```
80
81
81
-
> **Note for pnpm v9+ users**: If you see a warning about "Ignored build scripts", run:
82
+
> **Note for pnpm v9+ users**: If you see a warning about "Ignored build scripts", run: `pnpm approve-builds` to allow native dependencies (better-sqlite3) to compile properly.
83
+
>
84
+
> **Note**: Validation features (e.g., `d2c --mode full`) require optional dependencies `playwright` and `sharp`. They are not bundled with coderio by default to keep installation lightweight. Please install them globally beforehand for smoother execution:
82
85
>
83
86
> ```bash
84
-
> pnpm approve-builds
87
+
> npm install -g playwright sharp
88
+
> npx playwright install chromium
85
89
>```
86
-
>
87
-
> This allows native dependencies (better-sqlite3) to compile properly.
88
-
>
89
-
>**Note**: `playwright` and `sharp` are required only for validation features. They will be automatically installed when you first run a command that needs them (like `d2c --mode full`).
90
90
91
91
#### 3. Configuration
92
92
93
-
Create `~/.coderio/config.yaml`:
93
+
>**Important**: Requires a **multimodal (vision)** model (Recommended: `gemini-3-pro-preview`).
94
94
95
-
```bash
96
-
mkdir -p ~/.coderio
97
-
cat >~/.coderio/config.yaml<< 'EOF'
95
+
Create config file at `~/.coderio/config.yaml` (Windows: `%USERPROFILE%\.coderio\config.yaml`):
96
+
97
+
```yaml
98
98
model:
99
-
provider: openai # anthropic | openai | google
100
-
model: gemini-3-pro-preview
101
-
baseUrl: https://api.anthropic.com
102
-
apiKey: your-api-key-here
99
+
provider: openai # anthropic | openai | google
100
+
model: gemini-3-pro-preview
101
+
baseUrl: https://api.anthropic.com
102
+
apiKey: your-api-key-here
103
103
104
104
figma:
105
-
token: your-figma-token-here
105
+
token: your-figma-token-here
106
106
107
107
debug:
108
-
enabled: false
109
-
EOF
108
+
enabled: false# set 'true', if you want to save model and request information
110
109
```
111
110
112
111
#### 4. Usage
@@ -136,10 +135,7 @@ pnpm dev
136
135
137
136
#### 6. View Validation Report
138
137
139
-
```bash
140
-
# Open validation report in browser
141
-
open coderio/<design-name_node-id>/process/validation/index.html
0 commit comments