1. Terms and getting the command

The extension puts ud on the PATH of every integrated terminal of VS Code, and so of every shell Claude Code starts from one.

Term Meaning
Tool A Figma MCP tool as ud offers it, e.g. get_metadata (section 3).
Registry command A native operation of the editor, e.g. node.align (section 5). Every tool and Plugin API member is built from them.
Script JavaScript run by use_figma against the figma global (section 4).
Target The node(s) a command acts on: given by id, name path or selector (section 6), or the live selection.
Live editor A UI Designer editor in VS Code that has the file open. ud edits through it when there is one.
Actor The name that signs the events a command writes.
UDX UI Designer markup, an HTML-like text form of a node tree (section 7).

1.1 Getting the command#

The extension puts ud on the PATH of every integrated terminal of VS Code, and so of every shell Claude Code starts from one. Outside VS Code, call the same program directly:

text
node <extension folder>/out/cli.js <command> …

ud --version prints the CLI, file format and Plugin API coverage versions. ud doctor checks Node, the bridge, fonts and the licence. The CLI needs Node.js 22 or newer; inside VS Code it uses the Node that ships with VS Code.

1.2 Command line shape#

text
ud <tool | command> [file] [--param value …] [--json '<arguments>'] [options]
  • Tool names are written as Figma writes them (get_metadata); the kebab-case spelling (get-metadata) is an alias.
  • Every parameter of a tool’s input schema is a flag of the same name (--nodeId, --fileKey, --clientFrameworks). Kebab-case flags are aliases (--node-id). Arrays repeat the flag (--nodeIds nd-1 --nodeIds nd-2), objects and arrays of objects go in --json.
  • --json '<arguments>' passes the whole argument object, exactly as an MCP client would. --json - reads it from standard input. Flags given as well override fields of the object.
  • --code-file <path> is a convenience for use_figma: the script is read from a file.
  • A word is resolved in this order: native command (section 5), then Figma tool (section 3), then registry command id (ud node.duplicate is short for ud run node.duplicate). Names cannot clash in practice: native commands are single words, Figma tools use _, registry ids use .. A test keeps it that way.