The `ud` command
The ud command line: the Figma MCP tool surface, the Plugin API in use_figma, native commands, selectors, UDX and ud mcp.
Esta página está em inglês; a tradução está a caminho.
| Product | SoftForge UI Designer (SoftForge.softforge-ui-designer) |
| Document | CLI-001 |
| Status | Draft; review decisions D4, D7, D8, D9, D11 applied |
| Date | 2026-10-10 |
| Owner | Arthur de Araújo Farias |
| Realises | SRS-001 (#1) section 3 (CMD-1 – CMD-37), AI-11, AI-12 |
ud reads and edits UI Designer files (.design) from a shell. It is built for three users:
- Claude Code and other agents. They design in a terminal with the same tools they use for Figma.
- Scripts and CI. Render screens, lint a design system, export tokens and assets, diff two branches.
- People who prefer a terminal or want to automate a chore.
ud is the Figma MCP server’s interface, served for a local file. Its top-level commands have the names
and parameters of the Figma MCP tools: use_figma, get_metadata, get_design_context, get_screenshot,
and so on. use_figma runs JavaScript written against the Figma Plugin API. ud mcp serves the same tools
over the Model Context Protocol. An agent, a skill or a prompt written for Figma therefore works against UI
Designer. Underneath, every tool and every Plugin API call runs commands of the same registry the editor uses
(SRS section 3.1).
Generated from issue #3 of planning.pb by
scripts/docs-specs.mjs; the board is the source of truth.
Status. Done 2026-10-10. CLI-001 complete with D4, D7, D8, D9, D11 applied; the document now lives in the comments of this issue.
- 1. Terms and getting the commandThe extension puts ud on the PATH of every integrated terminal of VS Code, and so of every shell Claude Code starts from one.
- 2. Working with the editorWhen a live editor has the file open, ud does not touch the file.
- 3. Figma MCP toolsThis section lists every Figma MCP tool and what ud does with it.
- 4. The Plugin API in `use_figma`A script runs in a QuickJS interpreter compiled to WebAssembly (SRS CMD-11).
- 5. Native commandsEvery registry command is a ud command (SRS CMD-19):
- 6. Selectors--query takes a CSS-like selector over the layer tree of the current page (--page for another, --all-pages for all):
- 7. UDX markupUDX is an HTML-like text form of a node tree.
- 8. `ud mcp`ud mcp is a stdio MCP server named ui-designer (SRS CMD-7).
- 9. Output, errors and exit codesHuman output is short and stable.
- 10. Limits and performance
- Appendix A. Figma MCP tool to registry map