@biolab/talk-to-figma 0.6.0 → 0.7.0
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 +0 -125
- package/figma-plugin/figma-plugin.zip +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,128 +55,3 @@ https://cdn.jsdelivr.net/npm/@biolab/talk-to-figma@latest/figma-plugin/figma-plu
|
|
|
55
55
|
1. Open the plugin in Figma and join a channel
|
|
56
56
|
2. In your AI agent, call `join_channel` with the same channel name
|
|
57
57
|
3. Start using the MCP tools
|
|
58
|
-
|
|
59
|
-
## MCP Tools
|
|
60
|
-
|
|
61
|
-
### Document & Selection
|
|
62
|
-
|
|
63
|
-
- `get_document_info` - Get document info
|
|
64
|
-
- `get_selection` - Get current selection
|
|
65
|
-
- `read_my_design` - Get detailed selection info with all node details
|
|
66
|
-
- `get_node_info` - Get info about a specific node
|
|
67
|
-
- `get_nodes_info` - Get info about multiple nodes
|
|
68
|
-
- `set_focus` - Focus and scroll to a node
|
|
69
|
-
- `set_selections` - Select multiple nodes
|
|
70
|
-
|
|
71
|
-
### Creating Elements
|
|
72
|
-
|
|
73
|
-
- `create_rectangle` - Create a rectangle
|
|
74
|
-
- `create_frame` - Create a frame with auto-layout support
|
|
75
|
-
- `create_text` - Create a text node
|
|
76
|
-
|
|
77
|
-
### Modifying Elements
|
|
78
|
-
|
|
79
|
-
- `set_fill_color` - Set fill color (RGBA 0-1)
|
|
80
|
-
- `set_stroke_color` - Set stroke color and weight
|
|
81
|
-
- `set_corner_radius` - Set corner radius (per-corner support)
|
|
82
|
-
- `set_text_content` - Set text content
|
|
83
|
-
- `set_multiple_text_contents` - Batch update text nodes
|
|
84
|
-
- `move_node` - Move a node
|
|
85
|
-
- `resize_node` - Resize a node
|
|
86
|
-
- `clone_node` - Clone a node
|
|
87
|
-
- `delete_node` / `delete_multiple_nodes` - Delete nodes
|
|
88
|
-
|
|
89
|
-
### Auto Layout
|
|
90
|
-
|
|
91
|
-
- `set_layout_mode` - Set layout mode (NONE, HORIZONTAL, VERTICAL)
|
|
92
|
-
- `set_padding` - Set frame padding
|
|
93
|
-
- `set_axis_align` - Set axis alignment
|
|
94
|
-
- `set_layout_sizing` - Set sizing mode (FIXED, HUG, FILL)
|
|
95
|
-
- `set_item_spacing` - Set spacing between children
|
|
96
|
-
|
|
97
|
-
### Variables
|
|
98
|
-
|
|
99
|
-
- `get_local_variables` - Get all local variables with values per mode
|
|
100
|
-
- `get_local_variable_collections` - Get variable collections with modes
|
|
101
|
-
- `get_variable_by_id` - Get a specific variable
|
|
102
|
-
- `create_variable_collection` - Create a variable collection
|
|
103
|
-
- `create_variable` - Create a variable
|
|
104
|
-
- `set_variable_value` - Set variable value for a mode
|
|
105
|
-
- `set_variable_mode_name` - Rename a mode
|
|
106
|
-
- `set_variable_binding` - Bind a variable to a node property
|
|
107
|
-
|
|
108
|
-
### Components & Styles
|
|
109
|
-
|
|
110
|
-
- `get_styles` - Get local styles
|
|
111
|
-
- `get_local_components` - Get local components
|
|
112
|
-
- `create_component_instance` - Instantiate a component
|
|
113
|
-
- `get_instance_overrides` / `set_instance_overrides` - Copy/apply instance overrides
|
|
114
|
-
- `get_team_library_components` - Get team library components
|
|
115
|
-
- `get_team_library_variables` - Get team library variables
|
|
116
|
-
- `import_variable_by_key` - Import a variable from team library
|
|
117
|
-
|
|
118
|
-
### Scanning
|
|
119
|
-
|
|
120
|
-
- `scan_text_nodes` - Scan text nodes (chunked for large designs)
|
|
121
|
-
- `scan_nodes_by_types` - Scan nodes by type
|
|
122
|
-
|
|
123
|
-
### Annotations
|
|
124
|
-
|
|
125
|
-
- `get_annotations` - Get annotations
|
|
126
|
-
- `set_annotation` / `set_multiple_annotations` - Create/update annotations
|
|
127
|
-
|
|
128
|
-
### Prototyping & Connections
|
|
129
|
-
|
|
130
|
-
- `get_reactions` - Get prototype reactions
|
|
131
|
-
- `set_default_connector` - Set default connector style
|
|
132
|
-
- `create_connections` - Create connector lines between nodes
|
|
133
|
-
|
|
134
|
-
### Export
|
|
135
|
-
|
|
136
|
-
- `export_node_as_image` - Export as PNG, JPG, SVG, or PDF
|
|
137
|
-
|
|
138
|
-
### Connection
|
|
139
|
-
|
|
140
|
-
- `join_channel` - Join a channel to communicate with Figma
|
|
141
|
-
|
|
142
|
-
## Local Development
|
|
143
|
-
|
|
144
|
-
```bash
|
|
145
|
-
bun install # Install dependencies
|
|
146
|
-
bun run build # Build MCP server + relay (tsup → dist/)
|
|
147
|
-
bun run dev # Build in watch mode
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
### Start the relay (pick one)
|
|
151
|
-
|
|
152
|
-
```bash
|
|
153
|
-
bun socket # Bun-native relay (dev only, uses src/socket.ts)
|
|
154
|
-
node dist/cli.js --relay # Node-compatible relay (same as npm package)
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
Both run on port 3055 by default (`PORT` env to override).
|
|
158
|
-
|
|
159
|
-
### Point MCP config to local build
|
|
160
|
-
|
|
161
|
-
```json
|
|
162
|
-
{
|
|
163
|
-
"mcpServers": {
|
|
164
|
-
"TalkToFigma": {
|
|
165
|
-
"command": "node",
|
|
166
|
-
"args": ["/path-to-repo/dist/cli.js"]
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
## Project Structure
|
|
173
|
-
|
|
174
|
-
- `src/cli.ts` - CLI entry point (routes `--relay` flag)
|
|
175
|
-
- `src/talk_to_figma_mcp/server.ts` - MCP server
|
|
176
|
-
- `src/relay.ts` - WebSocket relay (Node-compatible, bundled in npm package)
|
|
177
|
-
- `src/socket.ts` - WebSocket relay (Bun-native, local dev only)
|
|
178
|
-
- `src/cursor_mcp_plugin/` - Figma plugin (`code.js`, `ui.html`, `manifest.json`)
|
|
179
|
-
|
|
180
|
-
## License
|
|
181
|
-
|
|
182
|
-
MIT
|
|
Binary file
|