Agent-Friendly Figma 设计提取 CLI
典型 D2C 工作流程:
nova-d2c explorenova-d2c getnova-d2c get --onlynova-d2c images开始前检查环境配置。验证 Token、API 连通性和缓存状态。
nova-d2c doctor
分析文件结构并输出推荐节点与后续建议命令。
nova-d2c explore "https://www.figma.com/design/xxx"
提取设计数据。不带 --node-id 时列出页面和顶层 Frame。
nova-d2c get "https://www.figma.com/design/xxx" --node-id 1:2
nova-d2c get "https://www.figma.com/design/xxx" --node-id 1:2 --only components
nova-d2c get "https://www.figma.com/design/xxx" --node-id 1:2 --resolved
从指定节点导出图片资源。
nova-d2c images "https://www.figma.com/design/xxx" \
--node-id 1:2,3:4 \
--output assets/ \
--image-format png \
--scale 2
| 选项 | 值 | 说明 |
|---|---|---|
--node-id |
1:2,3:4 |
节点 ID,逗号分隔 |
--only |
pages|components|variables|styles|tree|resolved |
过滤输出类型 |
--format |
yaml|json|md|compact |
输出格式(默认 yaml) |
--resolved |
标志 | 内联解析后的样式值 |
--no-cache |
标志 | 跳过缓存,强制重新获取 |