coderio 1.0.0 → 1.0.1-alpha.2

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 CHANGED
@@ -54,17 +54,19 @@ https://github.com/user-attachments/assets/bd0c3f18-e98a-4050-bf22-46b198fadac2
54
54
 
55
55
  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**.
56
56
 
57
- https://github.com/user-attachments/assets/a66dc680-f68d-4121-b416-aa6b778bd895
57
+ https://github.com/user-attachments/assets/43817e97-ffd2-40e3-9d33-78ee55b2ec2d
58
58
 
59
59
  ## 🚀 Quick Start
60
60
 
61
61
  ### Option 1: CLI (Recommended 👍🏻)
62
+
62
63
  Best for one-click generation.
63
64
 
64
65
  #### 1. Prerequisites
65
66
 
66
67
  - Node.js >= 18.0.0 (< 25.0.0)
67
68
  - [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)).
68
70
  - LLM API Key ([Anthropic](https://console.anthropic.com/) | [OpenAI](https://platform.openai.com/) | [Google](https://aistudio.google.com/))
69
71
 
70
72
  #### 2. Installation
@@ -77,35 +79,33 @@ npm install -g coderio
77
79
  pnpm add -g coderio
78
80
  ```
79
81
 
80
- > **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:
81
85
  >
82
86
  > ```bash
83
- > pnpm approve-builds
87
+ > npm install -g playwright sharp
88
+ > npx playwright install chromium
84
89
  > ```
85
- >
86
- > This allows native dependencies (better-sqlite3) to compile properly.
87
- >
88
- > **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`).
89
90
 
90
91
  #### 3. Configuration
91
92
 
92
- Create `~/.coderio/config.yaml`:
93
+ > **Important**: Requires a **multimodal (vision)** model (Recommended: `gemini-3-pro-preview`).
93
94
 
94
- ```bash
95
- mkdir -p ~/.coderio
96
- cat > ~/.coderio/config.yaml << 'EOF'
95
+ Create config file at `~/.coderio/config.yaml` (Windows: `%USERPROFILE%\.coderio\config.yaml`):
96
+
97
+ ```yaml
97
98
  model:
98
- provider: openai # anthropic | openai | google
99
- model: gemini-3-pro-preview
100
- baseUrl: https://api.anthropic.com
101
- 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
102
103
 
103
104
  figma:
104
- token: your-figma-token-here
105
+ token: your-figma-token-here
105
106
 
106
107
  debug:
107
- enabled: false
108
- EOF
108
+ enabled: false # set 'true', if you want to save model and request information
109
109
  ```
110
110
 
111
111
  #### 4. Usage
@@ -135,10 +135,7 @@ pnpm dev
135
135
 
136
136
  #### 6. View Validation Report
137
137
 
138
- ```bash
139
- # Open validation report in browser
140
- open coderio/<design-name_node-id>/process/validation/index.html
141
- ```
138
+ report path: coderio/<design-name_node-id>/process/validation/index.html
142
139
 
143
140
  #### 📖 All Commands
144
141
 
@@ -151,21 +148,22 @@ open coderio/<design-name_node-id>/process/validation/index.html
151
148
  | `images` | - | Download and process Figma assets |
152
149
 
153
150
  ### Option 2: Skill (Portable Embedded Workflow)
151
+
154
152
  Best for control and precision using AI Agents.
155
153
 
156
154
  **Prerequisites**:
157
155
  Copy the Skill file to your Cursor configuration directory:
158
- ```bash
159
- mkdir -p ~/.cursor/skills/design-to-code
160
- cp docs/skills/SKILL.md ~/.cursor/skills/design-to-code/SKILL.md
161
- ```
156
+
157
+ Copy `skills\design-to-code` folder to `~\.cursor\skills` (Windows: `%USERPROFILE%\.cursor\skills`)
162
158
 
163
159
  **Using in Cursor**:
164
- 1. Open Cursor Chat (`Cmd` + `L`).
160
+
161
+ 1. Open Cursor Chat.
165
162
  2. Type: **"Use design-to-code skill to convert this design: [Your Figma URL]"**
166
163
  3. The Agent will guide you step-by-step through protocol extraction and code generation.
167
164
 
168
165
  **Using in Claude Code**:
166
+
169
167
  1. Start Claude Code.
170
168
  2. Type: **"Read docs/skills/SKILL.md and perform design conversion: [Your Figma URL]"**
171
169
 
@@ -235,24 +233,9 @@ Beyond visual fidelity, the generated code is built for long-term maintenance:
235
233
  - [ ] Vue.js and Svelte support
236
234
  - [ ] Custom design system integration
237
235
 
238
- ## 🤝 Contributing
239
-
240
- we welcome contributions!
241
-
242
- ```bash
243
- git clone https://github.com/MigoXLab/coderio.git
244
- cd coderio
245
- pnpm install
246
- pnpm build
247
- ```
248
-
249
- ### Contributors
250
-
251
- Thanks to all our contributors! 🎉
236
+ ### 🤝 Contributors
252
237
 
253
- <a href="https://github.com/MigoXLab/coderio/graphs/contributors">
254
- <img src="https://contrib.rocks/image?repo=MigoXLab/coderio" />
255
- </a>
238
+ Welcome to contribute. Thanks to all our contributors! 🎉
256
239
 
257
240
  ## 📄 License
258
241