ud command reference
Every Figma MCP tool, verb and registry command of the ud command line, with parameters and examples.
Esta página está em inglês; a tradução está a caminho.
Generated from the compiled command registry (src/commands), the tool table (src/mcp/tools.ts) and the CLI (src/cli) by scripts/docs-cli.mjs. 216 registry commands, 34 tools served at CLI milestone 0.8. The specification is CLI-001.
Getting ud#
ud ships inside the extension. VS Code puts it on the PATH of every integrated terminal, so Claude Code started from one finds it. Outside VS Code, run the bundled script with Node 22 or newer (node <extension>/dist/ud.js). The command UI Designer: Let Claude Code Design in This Folder installs the Claude Code skills into .claude/skills/ (ud skill --install); ud mcp install registers the MCP server in .mcp.json.
A word after ud is resolved as a verb, then a Figma MCP tool (or its kebab-case alias), then a registry command id (ud node.create is ud run node.create). Parameters are flags named after the JSON Schema properties (--fileKey, --nodeId); --args '<json>' (or --args - for standard input) passes the whole argument object. When a live editor has the file open, commands run through the editor and show up there at once; otherwise ud edits the file headless.
Usage#
ud — UI Designer from the command line (CLI-001)
Usage:
ud <tool | command | verb> [file] [--param value …] [--args '<json>' | --args -] [options]
Figma MCP tools: use_figma, get_metadata, create_new_file, whoami, get_figma_skill (0.1); get_screenshot, upload_assets, download_assets (0.2);
get_variable_defs, search_design_system, get_libraries (0.4)
Native tools: ud_run, ud_apply, ud_help, ud_tree, ud_render, ud_system
Registry commands: ud run <id> … or ud <id> … (ud commands lists them)
Verbs:
tree [file] [--node n | --query q] [--depth n] indented layer tree
inspect <target> [--file f] [--json] one node, fully
find --query '<selector>' [file] ids of matching nodes
find --text t [--in text,names,components,styles,variables] [--regex] find text and names (DOC-9)
replace --find t --with r [--in text,names] [--regex] replace text in place (DOC-9)
system [file] [--budget n] [--only variables,styles,components,scales,guidance] design-system digest (AI-3)
library list|add|remove|enable|import|updates|accept|search|publish workspace libraries (VAR-7, VAR-8)
run <id> [file] [--param value …] a registry command
apply <steps.json | -> [--file f] several commands as one transaction ($1, $ref)
new <name> [--template blank|mobile|web|desktop|design-system] [--dir d]
where [file] file, live or headless, actor, licence
license status [--json] | activate <key> | deactivate the licence ticket of ud and ud mcp (LIC-6)
selection | select <ids…> the live editor's selection
watch [file] [--json] live events as lines (headless: the file's new WAL groups)
proposal list|open|review|accept|discard [id] the editor's AI proposals (AI-5)
render [file] [--node n | --query q | --page p] [--format png|jpg|webp|svg] [--scale s] [--out f]
[--contents-only] [--background transparent|page|#hex] [--max-dimension n] [--region x,y,w,h] [--at point]
[--mode collection=mode[,…]]
export [file] --format udx|png|jpg|webp|svg [--node n | --page p] [--out dir] [--scale s] [--use-settings] [--ids]
export [file] --format pdf [--page p | --node n] [--order position|flow] [--outline-text] [--out f.pdf] vector PDF (EXP-1)
export [file] --format tokens --tokens-format dtcg|css|scss|tailwind|style-dictionary|tokens-studio|swift|kotlin|flutter [--out f]
import tokens <tokens.json> [--format dtcg|style-dictionary|tokens-studio] [--collection c] variables from tokens (VAR-9)
snippet <target> --language react|react-modules|tailwind|custom-element|html|css|swiftui|compose [--out f] code for a node (DEV-2)
codegen <target> --framework <language> [--out dir] [--dry-run] generate files; edits outside ud:generated markers stay (DEV-3)
codemap list|get|set|remove|suggest|resolve components mapped to code components (DEV-4, Code Connect)
lint [targets…] [--rules .design-lint.json] [--only a,b] [--fix] [--json] design lint; exit 1 on errors (DEV-6)
components usage [component] [file] instances here and in the workspace, detached, overrides (CMP-9)
insert [file] --udx <file | -> [--parent p] [--x n --y n] build nodes from UDX (ud help udx)
replace [file] <target> --udx <file | -> replace a subtree, keeping matching ids
import svg <file.svg> | image <file> [--parent p] SVG as vectors, an image as an image fill
fonts [file] [--os] | font embed [file] --family f [--style s]
validate [files…] [--fonts] schema and reader checks; --fonts: missing and OS fonts
consolidate [file] fold the WAL into the tree (hash unchanged)
history [file] [--since seq] [--limit n] changes by session: time, actor, summary, seq range, hash
versions [file] | versions show <vs-…> [--udx | --out f.design] named versions (older ones from git)
version save "<title>" [--description d] save a named version
restore <seq | sha256:… | vs-…> [file] restore a point as a new change
prototype run [file] --flow f [--steps '…'] [--out shot.png] play a flow headless and render the final screen (PRO-10)
prototype flows [file] | prototype motion <node> flows with their screens; animated interactions (get_motion_context)
prototype export [file] [--out dir] [--flow f] the prototype as a static site (PRO-9)
import figma <url> [--token t] [--pages a,b] [--report r.json] [--dry-run] a Figma file via the REST API (EXP-5)
import sketch|penpot <file> [out.design] [--pages a,b] [--no-images] [--report r.json] [--dry-run] a .sketch or Penpot file (EXP-8)
import html <url> [--viewport 390,1440] [--reference] a running page rebuilt as frames (INT-1)
capture <url> --out shot.png [--viewport w] a screenshot of a running page (INT-1)
compare-live <node> <url> [file] a frame against the running page: regions, spacing, color, font (INT-3)
diff <a> [b] [file] [--image out.png] [--page p | --node n] structural and visual diff (CMD-35)
compare <a> [b] [file] [--page p | --node n] [--out dir] frames changed since a (or since Ready for dev: a = ready),
rendered before/after with an overlay (COL-5, DEV-5)
comments [file] [--open] [--page p] [--node n] [--mine] comment threads (COL-4)
comments add --message m [--node n | --page p --x n --y n] | reply <id> | resolve <id> | react <id> <emoji> | delete <id>
commands [--category c] | help [topic] | schema <id|tool> | plugin-api | version
mcp [--file f] [--read-only] [--allow a,b] [--proposal id|auto] [--as name]
mcp install [--dry-run] | skill --install [--dir d] [--only a,b] [--force] [--global]
Options: --file, --as <actor>, --json, --dry-run, --if-version <hash>, --seed <hex>, --wait <s>, --live, --no-live, --quiet,
--workspace <dir> (where libraries are searched; else UD_WORKSPACE, the git root or the file's folder),
--fonts <dir> (a workspace font folder; repeat; else UD_FONT_DIRS or fonts/ and assets/fonts/)
Exit codes: 0 ok, 1 command failed, 2 usage, 3 conflict, 4 licence, 5 not found, 6 unsupported.Exit codes#
| Code | Meaning |
|---|---|
| 0 | success |
| 1 | command, script, limit, stopped, internal |
| 2 | usage |
| 3 | conflict |
| 4 | licence |
| 5 | not_found |
| 6 | unsupported |
Errors are printed on standard error; with --json they are an object {code, subcode, message, hint, details, safeToRetryWithoutCanvasRead}.
Figma MCP tools#
The tools of the Figma MCP server, under the same names and parameters, plus the native ud_* tools. ud <tool> … on the terminal; ud mcp serves the same tools over the Model Context Protocol. Mutates: the tool changes the design; Licence: read tools work on the Free plan.
| Tool | Since | Mutates | Licence | Description | Parameters |
|---|---|---|---|---|---|
use_figma |
0.1 | yes | paid | Run JavaScript against the document with the Figma Plugin API figma global (CLI-001 §4). |
code*, description*, fileKey*, skillNames, timeoutMs, dryRun |
get_metadata |
0.1 | read | Sparse XML outline of a node or page: one element per node named by type, with id, name, x, y, width, height and hidden. | fileKey*, nodeId, depth |
|
create_new_file |
0.1 | yes | paid | Create a new .design file (editorType design only). fileName is the file name without extension; projectId an optional folder relative to the workspace; template one of blank, mobile, web, desktop. | editorType*, fileName*, planKey*, projectId, template |
whoami |
0.1 | read | The actor that signs events, the plan (ud::local) and the seat (edit or view), and the proposal mode when set. | ||
get_figma_skill |
0.1 | read | Read a skill resource: skill://ui-designer/ |
uri* |
|
ud_run |
0.1 | yes | free | Run one registry command (ud commands lists them; ud_help {topic: “ |
command*, params, fileKey, dryRun, ifVersion |
ud_apply |
0.1 | yes | paid | Run several commands as one transaction and one undo step: {actions: [{command, params, ref?}], fileKey?, dryRun?, ifVersion?}. “$1” in a later step’s params is the node created by step 1; “$name” the step whose ref is name. | actions*, fileKey, dryRun, ifVersion, label |
ud_help |
0.1 | read | Help on a command id, a tool name, or the topics commands, tools, plugin-api, selectors, udx, skills. | topic |
|
ud_tree |
0.1 | read | Compact indented layer tree (type, name, size, id) of the document, a page or a node; depth limits the levels. | fileKey, node, page, depth |
|
get_screenshot |
0.2 | read | Render a node (or a page) to PNG (CMD-4). | contentsOnly, enableBase64Response, fileKey*, maxDimension, nodeId*, mode, out |
|
upload_assets |
0.2 | yes | paid | Add images to |
batchCommit, count, currentPageId, fileKey*, nodeId, nodeIds, scaleMode, paths |
download_assets |
0.2 | read | Export a node with its export settings (or defaultFormat/defaultScale), plus the source images of its image fills (rawImages, at most 20) and its vector layers as SVG (svgAssets, at most 20). | defaultFormat, defaultScale, fileKey*, nodeId*, out |
|
get_variable_defs |
0.4 | read | Variables and styles used by a node and its subtree, resolved for the node’s mode (or mode, e.g. “color=Dark”), as Figma’s flat map: {“color/bg/surface”: “#FFFFFF”, “space/4”: “16”, “Heading/H1”: “Font(family: Inter, style: Bold, size: 32, lineHeight: 40)”}. detail: each entry with id, collection, values per mode and code syntax. | fileKey*, nodeId*, mode, detail |
|
search_design_system |
0.4 | read | Search the components, variables and styles of the file and of every library it uses (VAR-7), one result list per query, ranked by name, description, aliases and usage. | disableCodeConnect, fileKey*, includeLibraryKeys, queries* |
|
get_libraries |
0.4 | read | Libraries the file uses (libraries_added_to_file, with status current, updates or missing) and the workspace .design files that publish a library plus the ud.libraries setting (libraries_available_to_add, 50 per page; libraries_available_to_add_next_offset for more). | fileKey*, offset |
|
get_motion_context |
0.5 | read | Smart-animate transitions and prototype animations of a node (a screen: and its layers; recursive: true for any node’s subtree) as keyframe tracks with easing (cubic Bézier or spring with its settle time), CSS @keyframes, motion.dev snippets and coordination hints for implementing them (CLI-001 §3.11). | clientFrameworks, clientLanguages, fileKey*, nodeId*, recursive |
|
get_design_context |
0.6 | read | Reference code for a node (CLI-001 §3.12, DEV-2): React + Tailwind by default, or what clientFrameworks/clientLanguages name (react, web-components, swiftui, compose, html…); instances with a code-map entry become their code components ( | clientFrameworks, clientLanguages, disableCodeConnect, excludeScreenshot, fileKey*, forceCode, nodeId*, skillNames, language, out |
|
get_code_connect_map |
0.6 | read | The code map under a node (DEV-4): {" |
codeConnectLabel, fileKey*, nodeId* |
|
add_code_connect_map |
0.6 | yes | paid | Map a component or component set (nodeId; an instance maps its main component) to a code component: componentName, source (file relative to the workspace root), label, optional template with templateDataJson, and props ({“Size”: {“prop”: “size”}}). | componentName*, fileKey*, label*, nodeId*, source*, template, templateDataJson, props, dryRun |
get_code_connect_suggestions |
0.6 | read | Code components of the workspace that look like the design’s components (codemap.suggest: names, exported props against component properties), each {component, componentName, source, label, confidence, props}; nodeId limits it to one component. | excludeMappingPrompt, fileKey*, nodeId* |
|
send_code_connect_mappings |
0.6 | yes | paid | Save several code-map entries as one undoable transaction: mappings [{nodeId, componentName, source, label, template?, templateDataJson?, props?}]. | clientFrameworks, clientLanguages, fileKey*, mappings*, nodeId*, dryRun |
get_context_for_code_connect |
0.6 | read | What a mapping needs for a component, set or instance: {id, name, type, description, properties [{key, name, type, defaultValue, options}], variants, nestedInstances, codeMap?}. | fileKey*, nodeId* |
|
list_file_components_for_code_connect |
0.6 | read | The file’s components and component sets with their properties, whether they are mapped, and their instance counts (codemap.list). | fileKey* |
|
generate_figma_design |
0.8 | yes | paid | Capture a running web page into frames (INT-1, import.html): headless Chromium loads the URL at each viewport width and the DOM becomes frames with auto layout, text, images and vectors, placed right of the page’s content. | fileKey, url*, outputMode, viewports, reference, selector |
ud_import_html |
0.8 | yes | paid | Import a running web page as editable frames (INT-1, AI-001 §9.1): one frame per viewport width (default 1440), flex → auto layout, grid → grid layout, text with runs, images, SVG. reference: true names it “Reference: |
fileKey, url*, viewports, height, reference, page, x, y, fullPage, waitMs, selector |
ud_import_figma |
0.8 | yes | paid | Import a Figma file through the REST API (EXP-5): pages, components and variants, instances with overrides, styles, variables (Enterprise token), auto layout, images, prototype links; one transaction per page. token defaults to FIGMA_TOKEN. | fileKey, url*, token, pages, depth, images, dryRun |
ud_capture |
0.8 | read | Screenshot a running web page with headless Chromium (page.capture, INT-1): returns {screenshot (path), width, height, browser} and the PNG as an image item. | url*, viewport, height, fullPage, waitMs, out, inline |
|
ud_render |
0.2 | read | Render a node, a page or a region to PNG, JPG, WebP, SVG or PDF with every ud render option (CMD-32, EXP-1). | fileKey, node, nodes, query, page, region, format, scale, maxDimension, contentsOnly, useAbsoluteBounds, background, quality, svg, pdf, mode, at, out, inline |
|
ud_system |
0.4 | read | The design-system digest (AI-3): variables by collection with modes and values, styles by type, components with variants and properties, spacing/radius/type scales and guidance from descriptions, for the file and its libraries; under budget tokens (default 4000). | fileKey, budget, only, json |
|
ud_prototype_run |
0.5 | read | Play a prototype headless (PRO-10): start at a flow (or a frame), run steps such as ‘click:“Sign in”;wait:300;back’ and return {flow, start, screens, steps, final, hotspots, urls, warnings, image: {path, width, height}} with the final screen rendered as an image item. | fileKey, flow, node, steps, mode, render, format, scale, out, inline |
|
ud_diff |
0.5 | read | Compare two versions of a design (CMD-35): points of the WAL (seq, sha256:…, vs-…), current, other .design files, or git revisions (HEAD~1, rev:path). | fileKey, a*, b, image, page, node, scale |
|
ud_comments |
0.6 | read | The comment threads of a design (COL-4): {threads: [{id, anchor, position, message, by, at, resolved, mentions, reactions, meta?: {category, severity, findingId}, replies}], open, resolved}, filtered by page, node (threads on it or inside it), open (unresolved only) or mine (threads by or mentioning the actor). | fileKey, page, nodeId, open, mine |
|
ud_compare |
0.6 | read | Visual compare of two versions (COL-5, DEV-5): the top-level frames added, removed or changed between a and b, each rendered at both points with an overlay of the changed regions outlined in red (images under |
fileKey, a*, b, page, node, scope, out, images, scale |
|
ud_lint |
0.6 | read | Design lint of a subtree (nodeId; default the whole file) or of the rules named (rules: “contrast,touch-target”): detached instances, raw colours, text without a style, missing auto layout, contrast per mode, touch targets, spacing scale, unnamed layers, alt text, accessible names, dormant overrides, inert reactions, missing variable values. | fileKey, nodeId, rules |
* required.
Figma tools that UI Designer does not serve fail with exit code 6 and a hint (CMD-6):
| Tool | Hint |
|---|---|
get_figjam |
get_figjam is a FigJam tool. UI Designer designs interfaces; for boards and diagrams use Software Board (uml). |
generate_diagram |
generate_diagram is a FigJam tool. UI Designer designs interfaces; for boards and diagrams use Software Board (uml). |
generate_image |
generate_image needs Figma’s image generation service, which UI Designer does not have; add an image file with upload_assets (0.2) or draw it with use_figma. |
export_video |
export_video is not available in UI Designer; closest: get_screenshot (0.2) for stills, ud render for frames. |
list_shaders |
Shaders are a Figma service UI Designer does not have; closest: fills, gradients and effects through use_figma. |
get_shader |
Shaders are a Figma service UI Designer does not have; closest: fills, gradients and effects through use_figma. |
create_shader |
Shaders are a Figma service UI Designer does not have; closest: fills, gradients and effects through use_figma. |
update_shader |
Shaders are a Figma service UI Designer does not have; closest: fills, gradients and effects through use_figma. |
list_file_shaders |
Shaders are a Figma service UI Designer does not have; closest: fills, gradients and effects through use_figma. |
list_generative_plugins |
Generative plugins are a Figma service UI Designer does not have; closest: a use_figma script, or a skill in .claude/skills. |
get_generative_plugin |
Generative plugins are a Figma service UI Designer does not have; closest: a use_figma script, or a skill in .claude/skills. |
create_generative_plugin |
Generative plugins are a Figma service UI Designer does not have; closest: a use_figma script, or a skill in .claude/skills. |
update_generative_plugin |
Generative plugins are a Figma service UI Designer does not have; closest: a use_figma script, or a skill in .claude/skills. |
html_to_figma |
html_to_figma is replaced by generate_figma_design (0.8) and ud import html. |
weave_cancel_tool_run |
weave_cancel_tool_run belongs to Figma Weave (hosted AI models), which UI Designer does not offer; closest: run the model yourself and bring the result in with upload_assets (0.2). |
weave_find_model |
weave_find_model belongs to Figma Weave (hosted AI models), which UI Designer does not offer; closest: run the model yourself and bring the result in with upload_assets (0.2). |
weave_get_model_run_output |
weave_get_model_run_output belongs to Figma Weave (hosted AI models), which UI Designer does not offer; closest: run the model yourself and bring the result in with upload_assets (0.2). |
weave_get_tool_inputs |
weave_get_tool_inputs belongs to Figma Weave (hosted AI models), which UI Designer does not offer; closest: run the model yourself and bring the result in with upload_assets (0.2). |
weave_get_tool_run_output |
weave_get_tool_run_output belongs to Figma Weave (hosted AI models), which UI Designer does not offer; closest: run the model yourself and bring the result in with upload_assets (0.2). |
weave_list_tools |
weave_list_tools belongs to Figma Weave (hosted AI models), which UI Designer does not offer; closest: run the model yourself and bring the result in with upload_assets (0.2). |
weave_run_model |
weave_run_model belongs to Figma Weave (hosted AI models), which UI Designer does not offer; closest: run the model yourself and bring the result in with upload_assets (0.2). |
weave_run_tool |
weave_run_tool belongs to Figma Weave (hosted AI models), which UI Designer does not offer; closest: run the model yourself and bring the result in with upload_assets (0.2). |
weave_upload_asset |
weave_upload_asset belongs to Figma Weave (hosted AI models), which UI Designer does not offer; closest: run the model yourself and bring the result in with upload_assets (0.2). |
Tool parameters#
use_figma#
Run JavaScript against the document with the Figma Plugin API figma global (CLI-001 §4). One atomic transaction: if the script throws or hits a limit nothing is applied. Returns {result, createdNodeIds, changedNodeIds, removedNodeIds, logs, events, durationMs}. Load the ui-designer skill (skill://ui-designer/ui-designer/SKILL.md) before the first call.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--code |
string | yes | max length 50000 | |
--description |
string | yes | max length 2000 | |
--fileKey |
string | yes | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | |
--skillNames |
string | |||
--timeoutMs |
integer | Script time limit in ms (default 30000, max 300000). ≥ 1, ≤ 300000 | ||
--dryRun |
boolean | Run and report, apply nothing. |
get_metadata#
Sparse XML outline of a node or page: one element per node named by type, with id, name, x, y, width, height and hidden. Without nodeId: the list of pages as JSON. Call it first to find ids, then narrow with a nodeId or depth.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--fileKey |
string | yes | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | |
--nodeId |
string | A node id (nd-… or nd:…), a page id (pg-…), a name path from the page (Home/Header/Logo) or the node-id of a ud:// link. | ||
--depth |
integer | Levels below the root to include (default: all). ≥ 0 |
create_new_file#
Create a new .design file (editorType design only). fileName is the file name without extension; projectId an optional folder relative to the workspace; template one of blank, mobile, web, desktop. Returns {fileKey, url, documentId}.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--editorType |
“design” | “figjam” | “slides” | yes | ||
--fileName |
string | yes | ||
--planKey |
string | yes | Accepted and ignored; whoami returns ud::local. pattern ^(team|organization)::\d+$|^ud::[a-z]+$ |
|
--projectId |
string | |||
--template |
“blank” | “mobile” | “web” | “desktop” | “design-system” | blank (default), mobile (390×844), web (1440×1024), desktop (1280×800); design-system (a starter library: color, space, radius and type variables, text and effect styles, Button and Card components). |
whoami#
The actor that signs events, the plan (ud::local) and the seat (edit or view), and the proposal mode when set.
Takes no parameters.
get_figma_skill#
Read a skill resource: skill://ui-designer/
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--uri |
string | yes |
ud_run#
Run one registry command (ud commands lists them; ud_help {topic: “
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--command |
string | yes | A command id such as node.create. | |
--params |
object | The command’s parameters (ud schema |
||
--fileKey |
string | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | ||
--dryRun |
boolean | |||
--ifVersion |
string | Refuse with conflict when the document hash differs. |
ud_apply#
Run several commands as one transaction and one undo step: {actions: [{command, params, ref?}], fileKey?, dryRun?, ifVersion?}. “$1” in a later step’s params is the node created by step 1; “$name” the step whose ref is name. Result: {ok, result, events, hash, seq, createdNodeIds, mutatedNodeIds, warnings}.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--actions |
object[] | yes | ||
--fileKey |
string | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | ||
--dryRun |
boolean | |||
--ifVersion |
string | |||
--label |
string | The undo label and event group note. |
ud_help#
Help on a command id, a tool name, or the topics commands, tools, plugin-api, selectors, udx, skills.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--topic |
string | A command id (node.create), a tool (get_metadata) or a topic (commands, plugin-api, selectors). |
ud_tree#
Compact indented layer tree (type, name, size, id) of the document, a page or a node; depth limits the levels. The structured result is the node.tree record.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--fileKey |
string | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | ||
--node |
string | A node id (nd-… or nd:…), a page id (pg-…), a name path from the page (Home/Header/Logo) or the node-id of a ud:// link. | ||
--page |
string | A page id or name. | ||
--depth |
integer | ≥ 0 |
get_screenshot#
Render a node (or a page) to PNG (CMD-4). Returns JSON {path, url, width, height, original_width, original_height}: path is the local file; url a single-use loopback URL valid 10 minutes while ud mcp or the editor serves it, else null. maxDimension caps the longer edge (default 1024); enableBase64Response also inlines the PNG as an image item.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--contentsOnly |
boolean | |||
--enableBase64Response |
boolean | false |
||
--fileKey |
string | yes | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | |
--maxDimension |
integer | 1024 |
≥ -9007199254740991, ≤ 65536 | |
--nodeId |
string | yes | A node id (nd-… or nd:…), a page id (pg-…), a name path from the page (Home/Header/Logo) or the node-id of a ud:// link. | |
--mode |
string | Variable modes (0.4). | ||
--out |
string | Write the PNG here (default: a temporary file). |
upload_assets#
Add images to
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--batchCommit |
boolean | false |
||
--count |
integer | 1 |
≥ 1, ≤ 60 | |
--currentPageId |
string | |||
--fileKey |
string | yes | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | |
--nodeId |
string | A node id (nd-… or nd:…), a page id (pg-…), a name path from the page (Home/Header/Logo) or the node-id of a ud:// link. | ||
--nodeIds |
string[] | |||
--scaleMode |
“FILL” | “FIT” | “TILE” | "FILL" |
||
--paths |
string[] | Local files (or http(s) URLs) to upload directly; required on a one-shot command. |
download_assets#
Export a node with its export settings (or defaultFormat/defaultScale), plus the source images of its image fills (rawImages, at most 20) and its vector layers as SVG (svgAssets, at most 20). Each entry has a local path and a single-use url (null from a one-shot command).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--defaultFormat |
“png” | “jpg” | “svg” | “pdf” | |||
--defaultScale |
number | ≥ 0.01, ≤ 4 | ||
--fileKey |
string | yes | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | |
--nodeId |
string | yes | A node id (nd-… or nd:…), a page id (pg-…), a name path from the page (Home/Header/Logo) or the node-id of a ud:// link. | |
--out |
string | Folder to write into (default: a temporary folder). |
get_variable_defs#
Variables and styles used by a node and its subtree, resolved for the node’s mode (or mode, e.g. “color=Dark”), as Figma’s flat map: {“color/bg/surface”: “#FFFFFF”, “space/4”: “16”, “Heading/H1”: “Font(family: Inter, style: Bold, size: 32, lineHeight: 40)”}. detail: each entry with id, collection, values per mode and code syntax.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--fileKey |
string | yes | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | |
--nodeId |
string | yes | A node id (nd-… or nd:…), a page id (pg-…), a name path from the page (Home/Header/Logo) or the node-id of a ud:// link. | |
--mode |
string | Variable modes to resolve with: collection=mode[,…] (VAR-6). | ||
--detail |
boolean | Each entry with id, collection, values per mode and code syntax. |
search_design_system#
Search the components, variables and styles of the file and of every library it uses (VAR-7), one result list per query, ranked by name, description, aliases and usage. Each item has key (local id, or lib-…/id for library items: pass it to instance.create, style.apply, node.bind or library.import), name, description, libraryKey, libraryName, variant properties for component sets and the resolved value for variables.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--disableCodeConnect |
boolean | |||
--fileKey |
string | yes | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | |
--includeLibraryKeys |
string[] | |||
--queries |
object[] | yes |
get_libraries#
Libraries the file uses (libraries_added_to_file, with status current, updates or missing) and the workspace .design files that publish a library plus the ud.libraries setting (libraries_available_to_add, 50 per page; libraries_available_to_add_next_offset for more). Each has name, libraryKey (document id), description, sourceType and path.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--fileKey |
string | yes | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | |
--offset |
integer | ≥ 0, ≤ 9007199254740991 |
get_motion_context#
Smart-animate transitions and prototype animations of a node (a screen: and its layers; recursive: true for any node’s subtree) as keyframe tracks with easing (cubic Bézier or spring with its settle time), CSS @keyframes, motion.dev snippets and coordination hints for implementing them (CLI-001 §3.11). Returns JSON {nodeId, transitions: [{source, trigger, navigation, from, to, type, duration (ms), easing, tracks: [{nodeId, name, property, from, to}]}], hints}, then the CSS and the motion.dev code.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--clientFrameworks |
string | |||
--clientLanguages |
string | |||
--fileKey |
string | yes | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | |
--nodeId |
string | yes | A node id (nd-… or nd:…), a page id (pg-…), a name path from the page (Home/Header/Logo) or the node-id of a ud:// link. | |
--recursive |
boolean | false |
get_design_context#
Reference code for a node (CLI-001 §3.12, DEV-2): React + Tailwind by default, or what clientFrameworks/clientLanguages name (react, web-components, swiftui, compose, html…); instances with a code-map entry become their code components (
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--clientFrameworks |
string | |||
--clientLanguages |
string | |||
--disableCodeConnect |
boolean | |||
--excludeScreenshot |
boolean | |||
--fileKey |
string | yes | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | |
--forceCode |
boolean | |||
--nodeId |
string | yes | A node id (nd-… or nd:…), a page id (pg-…), a name path from the page (Home/Header/Logo) or the node-id of a ud:// link. | |
--skillNames |
string | |||
--language |
“css” | “html” | “react” | “react-modules” | “tailwind” | “custom-element” | “swiftui” | “compose” | The generator, overriding clientFrameworks. | ||
--out |
string | Folder for the assets (default: a temporary folder). |
get_code_connect_map#
The code map under a node (DEV-4): {"
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--codeConnectLabel |
string | |||
--fileKey |
string | yes | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | |
--nodeId |
string | yes | A node id (nd-… or nd:…), a page id (pg-…), a name path from the page (Home/Header/Logo) or the node-id of a ud:// link. |
add_code_connect_map#
Map a component or component set (nodeId; an instance maps its main component) to a code component: componentName, source (file relative to the workspace root), label, optional template with templateDataJson, and props ({“Size”: {“prop”: “size”}}). Written to the component’s codeMap (codemap.set).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--componentName |
string | yes | ||
--fileKey |
string | yes | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | |
--label |
“React” | “Web Components” | “Vue” | “Svelte” | “Storybook” | “Javascript” | “Swift” | “Swift UIKit” | … | yes | ||
--nodeId |
string | yes | A node id (nd-… or nd:…), a page id (pg-…), a name path from the page (Home/Header/Logo) or the node-id of a ud:// link. | |
--source |
string | yes | ||
--template |
string | |||
--templateDataJson |
string | |||
--props |
object | Component property key → {prop, values?, when?}. | ||
--dryRun |
boolean |
get_code_connect_suggestions#
Code components of the workspace that look like the design’s components (codemap.suggest: names, exported props against component properties), each {component, componentName, source, label, confidence, props}; nodeId limits it to one component. Save the right ones with send_code_connect_mappings.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--excludeMappingPrompt |
boolean | |||
--fileKey |
string | yes | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | |
--nodeId |
string | yes | A node id (nd-… or nd:…), a page id (pg-…), a name path from the page (Home/Header/Logo) or the node-id of a ud:// link. |
send_code_connect_mappings#
Save several code-map entries as one undoable transaction: mappings [{nodeId, componentName, source, label, template?, templateDataJson?, props?}].
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--clientFrameworks |
string | |||
--clientLanguages |
string | |||
--fileKey |
string | yes | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | |
--mappings |
object[] | yes | ||
--nodeId |
string | yes | A node id (nd-… or nd:…), a page id (pg-…), a name path from the page (Home/Header/Logo) or the node-id of a ud:// link. | |
--dryRun |
boolean |
get_context_for_code_connect#
What a mapping needs for a component, set or instance: {id, name, type, description, properties [{key, name, type, defaultValue, options}], variants, nestedInstances, codeMap?}.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--fileKey |
string | yes | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | |
--nodeId |
string | yes | A node id (nd-… or nd:…), a page id (pg-…), a name path from the page (Home/Header/Logo) or the node-id of a ud:// link. |
list_file_components_for_code_connect#
The file’s components and component sets with their properties, whether they are mapped, and their instance counts (codemap.list).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--fileKey |
string | yes | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. |
generate_figma_design#
Capture a running web page into frames (INT-1, import.html): headless Chromium loads the URL at each viewport width and the DOM becomes frames with auto layout, text, images and vectors, placed right of the page’s content. Returns {ids, report: {elements, frames, texts, images, vectors, missingFonts, issues}}. outputMode clipboard is not supported.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--fileKey |
string | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | ||
--url |
string | yes | ||
--outputMode |
“file” | “existingFile” | “newFile” | “clipboard” | file (default): import into the file; clipboard is refused. | ||
--viewports |
integer[] | |||
--reference |
boolean | |||
--selector |
string |
ud_import_html#
Import a running web page as editable frames (INT-1, AI-001 §9.1): one frame per viewport width (default 1440), flex → auto layout, grid → grid layout, text with runs, images, SVG. reference: true names it “Reference:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--fileKey |
string | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | ||
--url |
string | yes | http(s) URL (localhost dev servers), file: URL, or a path to an .html file or folder. | |
--viewports |
integer[] | Viewport widths (default [1440]). | ||
--height |
integer | ≥ 200, ≤ 4000 | ||
--reference |
boolean | false |
||
--page |
string | A page id or name (default the first page). | ||
--x |
number | |||
--y |
number | |||
--fullPage |
boolean | true |
||
--waitMs |
integer | ≥ 0, ≤ 30000 | ||
--selector |
string | Capture only the first element matching this CSS selector. |
ud_import_figma#
Import a Figma file through the REST API (EXP-5): pages, components and variants, instances with overrides, styles, variables (Enterprise token), auto layout, images, prototype links; one transaction per page. token defaults to FIGMA_TOKEN. Returns the report: {pages, nodes, components, variables, styles, images, flows, approximated, skipped, approximatedRatio, target, issues}. dryRun maps without writing.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--fileKey |
string | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | ||
--url |
string | yes | A figma.com/design/ |
|
--token |
string | Personal access token (default FIGMA_TOKEN). | ||
--pages |
string[] | |||
--depth |
integer | ≥ 1 | ||
--images |
boolean | true |
||
--dryRun |
boolean | false |
ud_capture#
Screenshot a running web page with headless Chromium (page.capture, INT-1): returns {screenshot (path), width, height, browser} and the PNG as an image item. No design file needed.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--url |
string | yes | ||
--viewport |
integer | 1440 |
≥ 200, ≤ 3840 | |
--height |
integer | ≥ 200, ≤ 4000 | ||
--fullPage |
boolean | false |
||
--waitMs |
integer | ≥ 0, ≤ 30000 | ||
--out |
string | Where to write the PNG (default a temporary file). | ||
--inline |
boolean | true |
ud_render#
Render a node, a page or a region to PNG, JPG, WebP, SVG or PDF with every ud render option (CMD-32, EXP-1). Default target: the selection, else the first page. Returns JSON {path, url, width, height, mime} and the image as an image item (raster formats). PDF: vector, text with embedded subset fonts (pdf.outlineText for outlines), shadows and blurs as images.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--fileKey |
string | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | ||
--node |
string | A node id (nd-… or nd:…), a page id (pg-…), a name path from the page (Home/Header/Logo) or the node-id of a ud:// link. | ||
--nodes |
string[] | PDF only: one page per node, in this order (EXP-3). | ||
--query |
string | A selector matching one node. | ||
--page |
string | A page id or name. | ||
--region |
string | x,y,w,h in page units. | ||
--format |
“png” | “jpg” | “jpeg” | “webp” | “svg” | “pdf” | "png" |
png, jpg, webp, svg or pdf. | |
--scale |
number | 1 |
≤ 4 | |
--maxDimension |
integer | Longer edge cap in px. ≥ 1, ≤ 16384 | ||
--contentsOnly |
boolean | false |
Render the node alone (default: the canvas inside its bounds, with what overlaps it). | |
--useAbsoluteBounds |
boolean | false grows the area by strokes and effects. | ||
--background |
string | transparent, page or #RRGGBB (default: transparent for a node, page for a page or region). | ||
--quality |
number | JPG and WebP quality (default 0.9). ≥ 0, ≤ 1 | ||
--svg |
object | |||
--pdf |
object | |||
--mode |
string | Variable modes (0.4). | ||
--at |
string | Render the document as it was at a point of its history: a seq, a state hash (sha256:…) or a version (vs-…). | ||
--out |
string | Output file or folder (default: a temporary file). | ||
--inline |
boolean | true |
Return the image as an image content item. |
ud_system#
The design-system digest (AI-3): variables by collection with modes and values, styles by type, components with variants and properties, spacing/radius/type scales and guidance from descriptions, for the file and its libraries; under budget tokens (default 4000). Load it before designing and bind variables instead of raw values.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--fileKey |
string | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | ||
--budget |
integer | Token budget of the text (default 4000). ≥ 100, ≤ 100000 | ||
--only |
string | Parts: variables,styles,components,scales,guidance. | ||
--json |
boolean | Also return the full digest record as structured content. |
ud_prototype_run#
Play a prototype headless (PRO-10): start at a flow (or a frame), run steps such as ‘click:“Sign in”;wait:300;back’ and return {flow, start, screens, steps, final, hotspots, urls, warnings, image: {path, width, height}} with the final screen rendered as an image item. Steps: click|hover|press|release:“Name” or x,y; drag:“Name”,dx,dy; scroll:dx,dy; key:Enter; wait:ms; timeout; back; outside; unhover; restart.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--fileKey |
string | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | ||
--flow |
string | A flow id (fl-…) or name; default the first flow. | ||
--node |
string | Start at this frame instead (id or name path). | ||
--steps |
string or any[] | Steps: ‘click:“Sign in”;wait:300’ or [{click: “Sign in”}, {wait: 300}]. | ||
--mode |
string | Variable modes: Collection=Mode[,…]. | ||
--render |
boolean | true |
Render the final screen. | |
--format |
“png” | “jpg” | “jpeg” | “webp” | “svg” | "png" |
||
--scale |
number | 1 |
≤ 4 | |
--out |
string | Output file or folder (default: a temporary file). | ||
--inline |
boolean | true |
Return the image as an image content item. |
ud_diff#
Compare two versions of a design (CMD-35): points of the WAL (seq, sha256:…, vs-…), current, other .design files, or git revisions (HEAD~1, rev:path). Returns the structural change list {changes: [{kind: created|deleted|changed|moved, entity, id, name, props, details}], summary}; with image, also renders the page (or node) at both points and writes before, after and an overlay with the changed regions outlined in red.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--fileKey |
string | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | ||
--a |
string | yes | The earlier point: 12, sha256:…, vs-…, current, file.design, HEAD~1 or rev:path. | |
--b |
string | "current" |
The later point (default current). | |
--image |
string | Write the visual diff: |
||
--page |
string | The page to render for the image (default the first). | ||
--node |
string | Render this node’s area instead of the page. | ||
--scale |
number | 1 |
≤ 4 |
ud_comments#
The comment threads of a design (COL-4): {threads: [{id, anchor, position, message, by, at, resolved, mentions, reactions, meta?: {category, severity, findingId}, replies}], open, resolved}, filtered by page, node (threads on it or inside it), open (unresolved only) or mine (threads by or mentioning the actor). Write with ud_run: comment.add, comment.reply, comment.update, comment.react, comment.resolve, comment.delete.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--fileKey |
string | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | ||
--page |
string | A page id or name. | ||
--nodeId |
string | Threads anchored on this node or inside it. | ||
--open |
boolean | Unresolved threads only. | ||
--mine |
boolean or string | Threads by or mentioning the actor (true) or this name. |
ud_compare#
Visual compare of two versions (COL-5, DEV-5): the top-level frames added, removed or changed between a and b, each rendered at both points with an overlay of the changed regions outlined in red (images under
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--fileKey |
string | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | ||
--a |
string | yes | The earlier point: 12, sha256:…, vs-…, ready, file.design, HEAD~1 or rev:path. | |
--b |
string | "current" |
The later point (default current). | |
--page |
string | Compare the frames of this page (default every page). | ||
--node |
string | Compare this top-level frame only. | ||
--scope |
“changed” | “all” | "changed" |
all: render every frame and report pixel-only changes too. | |
--out |
string | The folder for the images. | ||
--images |
boolean | true |
false: the frame list only, no rendering. | |
--scale |
number | 1 |
≤ 4 |
ud_lint#
Design lint of a subtree (nodeId; default the whole file) or of the rules named (rules: “contrast,touch-target”): detached instances, raw colours, text without a style, missing auto layout, contrast per mode, touch targets, spacing scale, unnamed layers, alt text, accessible names, dormant overrides, inert reactions, missing variable values. Returns {findings: [{rule, severity, nodeId, name, page, message, fix?}], errors, warnings, infos}; fixes run through ud_run lint.fix.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--fileKey |
string | The .design file: a path, a ud:// link or a document id (doc-…). Left out: the only open or only local design. | ||
--nodeId |
string | |||
--rules |
string |
Verbs#
Native commands of ud that are not registry commands or tools (ud help <verb>).
ud tree#
ud tree [file] [--node n | --query q | --page p] [--depth n] [--json]
Compact indented layer tree: type, name, size, position, id (CMD-33).ud inspect#
ud inspect <target> [--file f] [--query q] [--fields a,b] [--platform web|ios|android|flutter] [--json]
One node with every property (node.describe). The target is an id, a name path or a ud:// link.
--platform (or --fields code) adds code: the box model, CSS or platform code, Tailwind classes, variables, typography,
assets, the code-map snippet and accessibility (codegen.inspect, DEV-1).ud find#
ud find --query '<selector>' [file] [--page p] [--json]
Ids of the nodes a selector matches (ud help selectors).
ud find --text t [file] [--in text,names,components,styles,variables] [--regex] [--case-sensitive] [--page p] [--json]
Finds text content, layer names, components, styles and variables (DOC-9, document.find).ud replace#
ud replace [file] --find t --with r [--in text,names] [--regex] [--case-sensitive] [--page p] [--targets a,b]
Replaces text in text layers (and layer names with --in names) in place, keeping styled runs (DOC-9, document.replace).
ud replace [file] <target> --udx <file | -> [--keep-ids false]
Replaces a node and its subtree with UDX, keeping the nodes whose id attributes match (udx.replace).ud system#
ud system [file] [--budget n] [--only variables,styles,components,scales,guidance] [--json]
The design-system digest of the file and its libraries (AI-3, system.digest): variables with modes, styles, components with
properties, scales, guidance; under --budget tokens (default 4000). Load it before designing; bind variables, use styles.ud library#
ud library list [file] [--json] libraries used (status current|updates|missing) and available
ud library add <path.design | name | doc-…> [--file f] use a workspace library (library.add)
ud library import <library> <name|id …> copy components, styles, variables (+ dependencies)
ud library updates [library] | accept [library] [ids …] review and accept library changes (VAR-8)
ud library search <query> [--entity component|variable|style|all]
ud library publish [name] [--description d] | --unpublish mark this file as a library (document.library)
ud library remove <library> | enable <library> --enabled false
Libraries are searched under --workspace (UD_WORKSPACE, else the git root, else the file's folder) and ud.libraries.ud run#
ud run <command-id> [file] [--param value …] [--args '<json>' | -] [--dry-run] [--if-version h] [--json]
Runs one registry command (ud <command-id> is the same).ud apply#
ud apply <steps.json | -> [--file f] [--label l] [--dry-run] [--json]
A transaction of [{command, params, ref?}]; "$1" is the node created by step 1, "$name" the step whose ref is name.ud new#
ud new <name> [--template blank|mobile|web|desktop|design-system] [--dir d] [--force] [--json]
Creates <name>.design (as create_new_file).
ud new <name> --from-figma <figma.com/design URL> [--token t] [--pages a,b] [--no-images]: a new file holding the Figma file (EXP-5).ud where#
ud where [file] [--json]
Which file a command would use, live (through the editor) or headless, the actor and the licence.ud license#
ud license status [--json]
The plan ud and ud mcp edit with: the licence ticket the editor writes next to the ud shim (UD_LICENSE_TICKET), verified
offline. No ticket, or one that does not verify, is the Free plan: reading, rendering, exports and comments work; changes
exit 4.
ud license activate <key | ->
Verifies a licence key offline and writes the ticket; the editor confirms it with the licence server when it starts.
When offline verification fails, run UI Designer: Sign In in VS Code.
ud license deactivate
Removes the ticket.ud selection#
ud selection [file] [--json]
The live editor's selection (needs a live editor).ud watch#
ud watch [file] [--json]
Prints each committed change of the live editor as a line until interrupted or the editor closes the file (CMD-37);
--json prints {seq, hash, actor, source, label, events} per group. Without an editor, prints the groups appended to
the file's WAL as they land (a rewrite of the file prints one line with reset: true).ud proposal#
ud proposal list [file] [--json] the editor's proposals (AI panel turns, --proposal auto sessions)
ud proposal review <id> [--images] [--json] change list, changed frames, conflicts (ai-agents §6.5)
ud proposal accept <id> [--use-proposal-values '[{"nodeId": …, "property": …}]'] apply as one undo step
ud proposal discard <id> drop it
ud proposal open [--label l] fork the document (writes with UD_PROPOSAL=<id> go to it)
Only the live editor holds proposals.ud render#
ud render [file] [--node n | --query q | --page p] [--format png|jpg|webp|svg|pdf] [--scale s] [--out f] [--contents-only]
[--background transparent|page|#hex] [--max-dimension n] [--region x,y,w,h] [--quality 0-1] [--json]
Renders a node (default: the selection, else the first page) with the reference renderer (CMD-32). Without --contents-only a
node is drawn with what overlaps it inside its bounds. Prints the written path (default: a temporary file); --json prints
{path, width, height, mime}. --at <seq|sha256:…|vs-…> renders the document as it was then. --mode color=Dark[,space=Compact]
renders with those variable modes (VAR-6): explicit modes at the rendered node or page; frames inside that choose a mode keep it.ud export#
ud export [file] --format tokens --tokens-format dtcg|css|scss|tailwind|style-dictionary|tokens-studio|swift|kotlin|flutter [--out f|dir]
[--collections a,b] [--modes a,b]
Design tokens from the variables (tokens.export, VAR-9); prints them without --out.
ud export [file] --format udx|png|jpg|webp|svg [--node n | --nodes a,b | --query q | --page p] [--out dir] [--scale s] [--use-settings] [--ids]
udx: prints the UDX (or writes --out). Images: one file per export setting of the node (without --format, or with
--use-settings), else the format at --scale; written into --out (default: the working folder).
ud export [file] --format pdf [--page p | --node n | --nodes a,b] [--order position|flow] [--outline-text] [--out f.pdf|dir]
A vector PDF with embedded, subset fonts (EXP-1): a page gives one PDF page per top-level frame, in reading order
(position) or along the prototype flows (flow); a node gives one page. --outline-text draws text as outlines. Blurs and
shadows are rasterised at 2x; text in fonts whose licence forbids embedding is outlined, with a warning.ud import#
ud import tokens <tokens.json | -> [--format dtcg|style-dictionary|tokens-studio] [--collection c] [--dry-run] [file]
Creates or updates collections, modes and variables from design tokens (tokens.import, VAR-9).
ud import svg <file.svg> [--parent p] [--x n --y n] [--name n] [file]
ud import image <file> [--parent p] [--x n --y n] [file]
SVG becomes frames, shapes and vectors (EXP-4); an image becomes a rectangle with an image fill.
ud import figma <figma.com/design URL> [file] [--token t | FIGMA_TOKEN] [--pages a,b] [--depth n] [--no-images] [--report out.json] [--dry-run]
Imports a Figma file through the REST API (EXP-5): one transaction per page, then the report (approximated ratio, issues).
ud import sketch <file.sketch> [out.design] [--pages a,b] [--no-images] [--report r.json] [--dry-run]
ud import penpot <file.penpot | file.zip> [out.design] [--pages a,b] [--no-images] [--report r.json] [--dry-run]
Imports a Sketch document or a Penpot export (EXP-8): one transaction per page, then the same report; --dry-run lists
the pages; an out.design that does not exist is created.
ud import html <url | page.html | folder> [file] [--viewport 390,1440] [--reference] [--full-page false] [--selector s] [--page p] [--x n --y n]
Captures the page with headless Chromium (UD_CHROMIUM) and rebuilds it as frames, one per viewport (INT-1); --reference
names the frame "Reference: <route>" and locks it.ud snippet#
ud snippet <target> [file] --language react|react-modules|tailwind|custom-element|html|css|swiftui|compose [--out f|dir]
[--component-name N] [--no-code-map] [--options '<json>'] [--json]
Code for a node (codegen.snippet, DEV-2): prints it, or writes --out (a folder gets every file: Name.tsx, Name.module.css …).
Mapped instances (ud codemap) become their code components.ud codegen#
ud codegen <target> [file] --framework <language> [--out dir] [--dry-run] [--component-name N] [--json]
Writes the generated files into --out (default: the working folder) with image assets under assets/ (codegen.generate,
DEV-3). The code sits between ud:generated <id> start/end markers: regenerating replaces only that, so edits outside
the markers stay; a file without the markers is left alone. --dry-run prints a unified diff per file.ud codemap#
ud codemap list [file] components, mapped or not, with instance counts
ud codemap set <component> <componentName> [source] [--label React] [--props '<json>'] [--template t]
ud codemap get [node] | resolve <instance> | remove <component>
ud codemap suggest [component] [--min 0.4] code components of the workspace that look like the design's
The map lives on the component (codeMap) and in the ud.codeMap setting (DEV-4, Code Connect).ud lint#
ud lint [targets…] [file] [--rules .design-lint.json] [--only rule,rule] [--fix [--dry-run]] [--json]
Checks detached instances, raw colours, missing text styles and auto layout, contrast (per mode), touch targets, the
spacing scale, unnamed layers, alt text, accessible names, dormant overrides, inert reactions and missing variable
values (lint.run, DEV-6). Without --rules the .design-lint.json next to the design (or above it) is used. --fix applies
the fixable findings first (lint.fix). Exit 1 when an error-level finding remains.ud components#
ud components usage [component] [file] [--json]
For each component of this file: instances here and in the workspace's design files that use it as a library,
detached copies and the most used overrides (components.usage, CMP-9).ud insert#
ud insert [file] --udx <file | -> [--parent p] [--after n] [--x n --y n] [--keep-ids]
Builds nodes from UDX (CLI-001 §7, udx.insert). Image src paths are read relative to the design file, or to the UDX file.ud fonts#
ud fonts [file] [--os] [--json]
The font index: embedded (document), workspace (--fonts, UD_FONT_DIRS, fonts/), bundled and, with --os, system fonts;
and the fonts the design uses that resolve nowhere.ud validate#
ud validate [files…] [--json]
Checks files against schemas/design-1.0.schema.json and the reader's rules (FMT-001 §9). Exit 1 when one is invalid.
ud validate --fonts [files…] [--json]
Lists text nodes whose font is missing (exit 1) or resolves to an OS font (TXT-6). UD_OS_FONTS=0 skips the OS folders.ud consolidate#
ud consolidate [file] [--dry-run] [--json]
Rewrites the file with the WAL folded into the tree; the state hash is unchanged (FMT-001 §7).ud history#
ud history [file] [--since seq] [--limit n] [--json]
The WAL's changes grouped by transaction and by session (COL-1): time, actor, summary or undo label, seq range and the
state hash after each group. Preview a point with ud render --at <seq|hash|vs-…>; restore it with ud restore.ud versions#
ud versions [file] [--json]
Named versions, oldest first (COL-2).
ud versions show <vs-…> [file] [--json | --udx [--page p] | --out file.design]
The document at a version: from the WAL, else from the git history of the file (the last commit whose WAL still holds
the version.save event), checked against its treeHash. --out writes it as a consolidated .design file.ud version#
ud version [--json]
The CLI, design format and Plugin API coverage versions (also ud --version).
ud version save "<title>" [file] [--description d] [--json]
Saves a named version (version.save, COL-2).ud restore#
ud restore <seq | sha256:… | vs-…> [file] [--dry-run] [--json]
Makes the document what it was at that point, as one new undoable change (history.restore).ud prototype#
ud prototype run [file] --flow <name|fl-…> [--node frame] [--steps 'click:"Sign in";wait:300;back'] [--out shot.png] [--format png|jpg|webp|svg]
[--scale s] [--mode c=m] [--no-render] [--json]
Plays the flow headless (PRO-10) and renders the final screen. Steps: click|hover|press|release:"Name" (a layer's name, its text,
or its id) or x,y in screen px; drag:"Name",dx,dy; scroll:[target,]dx,dy; key:Enter; wait:ms (runs after-delay timers); timeout
(fires the next one); back; outside (click outside the top overlay); unhover; restart. Prints each step's screen, the final
screen with its frame counter (3 / 5) and the image path; --json prints the plan (screens, steps, final, hotspots).
ud prototype flows [file] [--json]
The flows with the screens they reach. ud prototype motion <node> [file]: get_motion_context.
ud render --steps '…' [--flow f] is the same as ud prototype run (CMD-32).
ud prototype export [file] [--out dir] [--flow f]… [--page p]… [--no-fonts] [--base-url /path/] [--json]
Writes the prototype as a static site (PRO-9): index.html, player.js, lib/, state.json, assets/, fonts/; serve it over HTTP.ud capture#
ud capture <url | page.html> --out shot.png [--viewport 1440] [--height 900] [--full-page] [--json]
A PNG screenshot of a running page with headless Chromium (page.capture, INT-1); no design file needed.ud compare-live#
ud compare-live <node> <url> [file] [--viewport w] [--tolerance px] [--json]
Compares a frame with the running page (document.compareLive, INT-3): changed pixel regions, a difference overlay, and the
spacing, color and font mismatches of the frame's texts matched by content.ud diff#
ud diff <a> [b] [file] [--image out.png] [--page p | --node n] [--scale s] [--json]
Compares two versions (CMD-35): a and b are WAL points (12, sha256:…, vs-…), current (b's default), .design files, git
revisions of the file (HEAD~1) or rev:path. Prints one line per change (+ created, - deleted, ~ changed, > moved, with renames
and text edits); --json the change list and summary. --image writes the overlay (changed regions outlined in red) and
<out>-before.png, <out>-after.png of the page (or node) at both points.ud compare#
ud compare <a> [b] [file] [--page p | --node n] [--scope changed|all] [--out dir] [--scale s] [--no-images] [--json]
Visual compare (COL-5, DEV-5): the top-level frames added, removed or changed between a and b (points as in ud diff:
12, sha256:…, vs-…, current, file.design, HEAD~1, rev:path), each rendered at both points: <frame>-before.png,
<frame>-after.png and <frame>.png, the overlay with the changed regions outlined in red, under
<name>.design.assets/compare/<hash-a>-<hash-b>/ (or --out). a = ready compares every frame marked Ready for dev with
itself when it was marked. --scope all renders every frame and reports pixel-only changes (styles, variables, main
components) too. --json prints {frames: [{nodeId, name, change, before, after, overlay, regions}], summary}.ud comments#
ud comments [file] [--open] [--page p] [--node n] [--mine] [--json]
The comment threads with their replies (comment.list, COL-4): open or resolved, author, time, anchor, review meta.
ud comments add [file] --message m [--node n [--x dx --y dy] | --page p --x n --y n] [--mentions a,b]
[--category c --severity info|warning|error --finding-id id]
ud comments reply <thread> --message m | update <id> --message m | react <id> <emoji> [--on false]
ud comments resolve <thread> | reopen <thread> | delete <id>
@Name and @"Two Words" in a message are mentions. ud run comment.* takes the same parameters.ud commands#
ud commands [--category c] [--json]
Every registry command and tool, with since and flags.ud mcp#
ud mcp [--file f] [--read-only] [--allow a,b] [--proposal id|auto] [--as name] [--fonts dir]
A stdio MCP server named ui-designer (CMD-7). It keeps folded documents, the text engine and the fonts warm between
calls, and serves the single-use loopback URLs of get_screenshot, download_assets and upload_assets (127.0.0.1 only).
--proposal <id> (or UD_PROPOSAL) sends every call to that proposal of the live editor; --proposal auto opens one on the
session's first write (whoami and ud_run where report it; headless, writes go to the file and whoami says why).
ud mcp install [--dry-run] [--proposal auto] [--file f]
Adds the server to .mcp.json of the working folder.ud select#
ud select <id | name path …> [--query q] [--file f]
Sets the live editor's selection (needs a live editor).ud help#
ud help [command | tool | verb | topic]
Topics: commands, tools, plugin-api, selectors, udx, skill:<name>.ud schema#
ud schema <command | tool>
Parameter (and result) JSON Schemas.ud plugin-api#
ud plugin-api [--json]
The Plugin API coverage table (CMD-14).ud skill#
ud skill [--json]
Lists the bundled skills.
ud skill --install [--dir d] [--only a,b] [--force] [--global] [--dry-run]
Copies them into .claude/skills/ with a .ud-skill.json manifest (AI-001 §3.8).ud font#
ud font embed [file] --family f [--style s] [--dry-run] [--json]
Copies a font file into <name>.design.assets/ and registers it (asset.add, FMT-001 §8.3). Refused when the font's OS/2
fsType forbids embedding (D22: only 0 or bit 3 is embedded); exit 1 when nothing was embedded.Registry commands#
Every command of the editor is a registry command: the editor, the context menus, ud, use_figma and the MCP server all run the same definitions. Run one with ud <id> [file] --param value … or ud run <id> …; ud help <id> prints this help and ud schema <id> the JSON Schema. Commands marked selection act on the editor’s selection when no target is given.
Document#
| Command | Summary |
|---|---|
document.update |
Rename the document or change its colour profile. |
document.info |
The document id, name, state hash, sequence number and the number of pages and nodes. |
document.find |
Find text, layer names, components, styles and variables across pages (DOC-9). |
document.replace |
Replace text in text layers (and optionally layer names) across the document, keeping styles. |
document.compareLive |
Compare a frame with the running page: a screenshot, a pixel overlay, and the spacing, colour and font mismatches. |
system.digest |
A compact digest of the file’s and its libraries’ variables, styles, components, scales and guidance. |
lint.run |
Check the design against the lint rules: tokens, styles, auto layout, contrast, touch targets, names, alt text. |
lint.fix |
Apply the mechanical fixes of lint findings (bind raw colours, apply text styles, rename, reset dormant overrides). |
document.update#
Update Document. Rename the document or change its colour profile.
Since 0.1 · mutates · licence paid
Changes the document’s own properties (FMT-001 §4.2): the name shown in the title bar and the colour profile. Since 0.4, –library publishes the file as a workspace library (FMT-001 §4.2, VAR-7).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--name |
string | The document name. | ||
--colorProfile |
“SRGB” | “DISPLAY_P3” | The colour profile of the document. | ||
--library |
object or null | Publish the file as a library {name, description} (VAR-7), or null to stop (0.4; library.publish is the same). |
ud document.update --name "Checkout" --colorProfile SRGB
ud document.update --library '{"name": "Starter DS", "description": "Tokens and base components"}'document.info#
Document Info. The document id, name, state hash, sequence number and the number of pages and nodes.
Since 0.1 · read-only · licence read
Prints what identifies the document and its current state: the id, the name, the state hash of FMT-001 §6.9 (what –if-version takes), the last event number and the counts of pages and nodes.
Takes no parameters.
ud document.info --jsondocument.find#
Find. Find text, layer names, components, styles and variables across pages (DOC-9).
Since 0.4 · read-only · licence read
Searches the document (DOC-9): –in text (TEXT characters), names (layer names), components (names and descriptions), styles and variables (names and descriptions); default text and names. –regex treats –text as a regular expression; matching ignores case unless –caseSensitive. Each match has kind, id, page, name, a snippet and the range of the first hit. Without –text every item of the chosen kinds is listed.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--text |
string | |||
--in |
“text” | “names” | “components” | “styles” | “variables”[] or string | |||
--regex |
boolean | |||
--caseSensitive |
boolean | |||
--page |
string | A page id (pg-…) or a page name. | ||
--limit |
integer | ≥ 1, ≤ 5000 |
ud find --text "Sign in" --in text,names
ud document.find --text "^Button" --regex --in components --jsondocument.replace#
Replace. Replace text in text layers (and optionally layer names) across the document, keeping styles.
Since 0.4 · mutates · licence paid
Replaces every occurrence in place (DOC-9): text content keeps its styled runs; –in names also renames layers. –regex enables groups ($1) in –replace; –targets limits to some nodes; –page to one page. One undo step.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--find |
string | yes | ||
--replace |
string | yes | ||
--in |
“text” | “names”[] or string | |||
--regex |
boolean | |||
--caseSensitive |
boolean | |||
--page |
string | A page id (pg-…) or a page name. | ||
--targets |
string[] |
ud replace --find "Sign in" --with "Log in"
ud document.replace --find "Button (\d+)" --replace "Action $1" --regex --in namesdocument.compareLive#
Compare with Live Page. Compare a frame with the running page: a screenshot, a pixel overlay, and the spacing, colour and font mismatches.
Since 0.8 · read-only · licence read · writes files · network
INT-3. Captures the URL in headless Chromium at the frame’s width (or viewport) and height, renders the frame, and compares them: regions of differing pixels (the NFR-8 tolerance, 8 px cells merged), a difference overlay image, and the frame’s texts matched with the page’s by content: spacing (position off by more than tolerance px), color (text colour) and font (family, size, style) mismatches, each with the node id, expected (design) and actual (page). The screenshot, render and overlay PNGs are written to a temporary folder.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | yes | The frame to compare. | |
--url |
string | yes | ||
--viewport |
integer or object | Viewport width, or {width, height} (default the frame’s size). | ||
--height |
integer | Viewport height (default the frame’s height). ≥ 200, ≤ 4000 | ||
--waitMs |
integer | ≥ 0, ≤ 30000 | ||
--tolerance |
number | 2 |
Position tolerance of the text match (px). ≥ 0 |
ud compare-live "Home/Desktop" http://localhost:5173/
ud document.compareLive --node nd-0123456789ab --url http://localhost:5173/ --viewport 1440system.digest#
Design System Digest. A compact digest of the file’s and its libraries’ variables, styles, components, scales and guidance.
Since 0.4 · read-only · licence read
What agents load first (AI-3, ud system): variables by collection with modes (values per mode, a|b when they differ), styles by type, components with variants and properties, spacing/radius/type scales, and guidance from descriptions. –budget caps the text in tokens (default 4000; lists are cut with “…(+n)”); –only picks parts (variables, styles, components, scales, guidance). The json member has everything uncut.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--budget |
integer | ≥ 100, ≤ 100000 | ||
--only |
“variables” | “styles” | “components” | “scales” | “guidance”[] or string |
ud system
ud system --budget 2000 --only variables,components
ud system.digest --jsonlint.run#
Lint Design. Check the design against the lint rules: tokens, styles, auto layout, contrast, touch targets, names, alt text.
Since 0.6 · read-only · licence read
CMD-36: detached-instance (warning), raw-color (warning), text-style (warning), missing-auto-layout (warning), contrast (error), touch-target (warning), spacing-scale (warning), unnamed-layer (info), missing-alt-text (warning), missing-accessible-name (warning), dormant-override (info), inert-reaction (warning), missing-variable-value (warning), noise-on-text (warning), text-on-path-overflow (warning). Each finding has rule, severity, nodeId, name, page, message and, for mechanical ones, fix {command, params, label} (lint.fix applies them). Levels and options come from .design-lint.json next to the design file or above it: {“rules”: {“unnamed-layer”: “off”, “contrast”: “error”, “touch-target”: {“level”: “warn”, “options”: {“min”: 48}}}, “ignore”: [“frame[name^="Scratch"]”], “spacingScale”: [0, 4, 8, 12, 16, 24, 32]}. ud lint exits 1 when there are errors.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--targets |
string[] | |||
--rules |
“detached-instance” | “raw-color” | “text-style” | “missing-auto-layout” | “contrast” | “touch-target” | “spacing-scale” | “unnamed-layer” | …[] | Only these rules. | ||
--config |
object | A .design-lint.json object ({rules, ignore, spacingScale}); default: the file found next to the design or above it. | ||
--configPath |
string | A config file to read instead (relative to the design file’s folder or absolute). |
ud lint.run
ud lint "Screens/Login" --json
ud lint.run --rules '["contrast", "touch-target"]'lint.fix#
Fix Lint Findings. Apply the mechanical fixes of lint findings (bind raw colours, apply text styles, rename, reset dormant overrides).
Since 0.6 · mutates · licence paid
CMD-36: runs the rules like lint.run and applies each finding’s fix in one transaction (one undo step): raw-color binds the paint to its variable (node.bind), text-style applies the matching style (style.apply), spacing-scale snaps to the nearest step, unnamed-layer renames from the first text, dormant-override resets the override. A fix that fails is reported and the others are kept. ud lint –fix runs it.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--targets |
string[] | |||
--rules |
“detached-instance” | “raw-color” | “text-style” | “missing-auto-layout” | “contrast” | “touch-target” | “spacing-scale” | “unnamed-layer” | …[] | Only these rules. | ||
--config |
object | A .design-lint.json object ({rules, ignore, spacingScale}); default: the file found next to the design or above it. | ||
--configPath |
string | A config file to read instead (relative to the design file’s folder or absolute). |
ud lint.fix --rules '["raw-color", "text-style"]'
ud lint "Screens/Login" --fixPages#
| Command | Summary |
|---|---|
page.create |
Add a page, last or after a given page. |
page.update |
Rename a page or set its canvas background. |
page.reorder |
Move a page after another page or to a position. |
page.delete |
Delete a page and everything on it. |
page.list |
The pages in order, with the number of top-level nodes on each. |
guide.add |
Add a ruler guide to a page or a frame (what dragging from a ruler does). |
guide.move |
Move a ruler guide of a page or a frame to a new offset. |
guide.remove |
Remove a ruler guide from a page or a frame. |
guide.list |
The ruler guides of a page or a frame, in index order. |
page.create#
Create Page. Add a page, last or after a given page.
Since 0.1 · mutates · licence paid
Creates a page. Without –name it is called “Page N”; without –after it goes last.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--name |
string | The page name. | ||
--after |
string | Place the new page after this one (id or name). |
ud page.create --name "Components" --after "Screens"page.update#
Update Page. Rename a page or set its canvas background.
Since 0.1 · mutates · licence paid
Changes a page’s name or backgrounds (a paint list; the canvas colour).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--page |
string | yes | A page id (pg-…) or a page name. | |
--name |
string | |||
--backgrounds |
paint[] |
ud page.update --page Screens --name "Mobile screens"page.reorder#
Reorder Page. Move a page after another page or to a position.
Since 0.1 · mutates · licence paid
Moves a page in the page list: –after
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--page |
string | yes | A page id (pg-…) or a page name. | |
--after |
string | Place the page after this one. | ||
--index |
integer | The position in the page list, 0 first. ≥ 0 |
ud page.reorder --page Components --index 0page.delete#
Delete Page. Delete a page and everything on it.
Since 0.1 · mutates · licence paid
Deletes a page with all its nodes. The last page cannot be deleted.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--page |
string | yes | A page id (pg-…) or a page name. |
ud page.delete --page "Old screens"page.list#
List Pages. The pages in order, with the number of top-level nodes on each.
Since 0.1 · read-only · licence read
Lists the pages of the document in their order.
Takes no parameters.
ud page.list --jsonguide.add#
Add Guide. Add a ruler guide to a page or a frame (what dragging from a ruler does).
Since 0.3 · mutates · licence paid
CAN-8: a guide is {axis, offset}: axis X is a vertical line at x = offset, Y a horizontal line at y = offset, in page units on a page and from the frame’s top-left corner on a frame. Guides are stored in the file.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--page |
string | The page whose guides these are (default: the first page). | ||
--node |
string | A frame whose guides these are, instead of a page. | ||
--axis |
“X” | “Y” | yes | X: a vertical guide at x = offset; Y: a horizontal one. | |
--offset |
number | yes |
ud guide.add --page Screens --axis X --offset 24
ud guide.add --node "Screens/Login" --axis Y --offset 120guide.move#
Move Guide. Move a ruler guide of a page or a frame to a new offset.
Since 0.3 · mutates · licence paid
Sets the offset of the guide at –index (its position in guide.list).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--page |
string | The page whose guides these are (default: the first page). | ||
--node |
string | A frame whose guides these are, instead of a page. | ||
--index |
integer | yes | ≥ 0 | |
--offset |
number | yes |
ud guide.move --page Screens --index 0 --offset 32guide.remove#
Remove Guide. Remove a ruler guide from a page or a frame.
Since 0.3 · mutates · licence paid
Removes the guide at –index; the later guides move up one index.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--page |
string | The page whose guides these are (default: the first page). | ||
--node |
string | A frame whose guides these are, instead of a page. | ||
--index |
integer | yes | ≥ 0 |
ud guide.remove --node "Screens/Login" --index 1guide.list#
List Guides. The ruler guides of a page or a frame, in index order.
Since 0.3 · read-only · licence read
Lists {axis, offset} of each guide; the index is the position in the list.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--page |
string | The page whose guides these are (default: the first page). | ||
--node |
string | A frame whose guides these are, instead of a page. |
ud guide.list --page Screens --jsonNodes#
| Command | Summary |
|---|---|
node.create |
Create a frame, group, section, shape, text, vector or boolean operation under a page or a container node. |
node.update |
Merge stored properties into nodes (the general setter behind the Plugin API). |
node.rename |
Rename one node. |
node.move |
Set the position of nodes (–to) or nudge them (–by), within their parent. |
node.resize |
Set the width and/or height of nodes, keeping the top-left corner or the centre in place. |
node.rotate |
Set the rotation of nodes in degrees. |
node.setVisible |
Show or hide nodes. |
node.setLocked |
Lock or unlock nodes against canvas edits. |
node.reparent |
Move nodes into another page or container, keeping their place on the canvas. |
node.reorder |
Change a node’s place among its siblings: to front or back, one step, a position, or next to a sibling. |
node.delete |
Delete nodes and everything inside them. |
node.duplicate |
Copy nodes with everything inside them, next to the originals. |
node.group |
Wrap nodes in a new group, frame or section sized to their bounds. |
node.ungroup |
Dissolve groups, frames, sections or boolean operations: their children move up, keeping their place on the canvas. |
node.align |
Align nodes to each other’s bounds, or to their parent. |
node.distribute |
Space three or more nodes evenly between the first and the last. |
node.describe |
One node fully: every property with defaults filled in, its children ids, page and name path. |
node.tree |
The layer tree under a node, a page or the whole document: id, type, name, position, size, layout and children. |
node.find |
The ids of the nodes matching a selector, in document order. |
node.presets |
The frame size presets: phones, tablets, desktops, watches, paper and social media. |
node.applyPreset |
Resize frames to a preset device, paper or social media size. |
vector.setPaths |
Replace the paths of a vector node with SVG path data. |
node.renameBatch |
Rename several layers at once: find and replace, and a pattern with numbering ($n, $nn) and the current name ($&). |
section.setReady |
Mark sections and frames “Ready for development”, or clear the mark. |
vector.setNetwork |
Replace the vector network of a vector node (vertices, straight and Bézier segments, fill regions). |
vector.editNetwork |
Apply pen-tool edits to a vector network in one step: vertices, handles, segments, splits, deletions, paint bucket. |
vector.flatten |
Bake shapes, groups or boolean operations into one vector node (Ctrl+E). |
vector.outlineStroke |
Turn strokes into filled vector geometry (Ctrl+Shift+O). |
vector.offset |
Grow or shrink the outline of shapes by a distance, with miter, round or bevel corners. |
vector.simplify |
Reduce the points of vector paths while keeping their shape within a tolerance. |
vector.join |
Join the open ends of vector paths, nearest first. |
vector.reverse |
Reverse the direction of vector paths (where dashes start, which end a path begins at). |
boolean.create |
Combine nodes into a live boolean operation: union, subtract, intersect or exclude. |
boolean.setOperation |
Change the operation of boolean operation nodes. |
node.rescale |
Scale nodes with their properties: size, position, strokes, effects, radii, text and vector coordinates (K). |
node.setAccessibility |
Set a node’s accessibility metadata: role, name, description, heading level, focus order, alt text, decorative. |
node.setStatus |
Mark frames, sections and components Ready for development or Completed, or clear the mark. |
annotation.add |
Attach a developer note to nodes, with pinned properties and a category. |
annotation.set |
Change one annotation of a node (label, markdown, pinned properties, category). |
annotation.remove |
Remove one annotation (by index) or all annotations of nodes. |
annotation.categories |
The annotation categories of the document (built in: behaviour, accessibility, interaction). |
annotation.addCategory |
Add an annotation category with a label and colour. |
annotation.removeCategory |
Remove an annotation category; annotations in it keep their text and lose the category. |
trace.add |
Link nodes to a Project Board item (REQ-n, #n) of a .pb board, or to a Software Board element of a .uml model. |
trace.remove |
Remove traces from nodes: one item, every item of a board or model, every trace of a kind, or all. |
trace.list |
The Project Board items and Software Board elements nodes trace to, with titles, states, types and names read from the files. |
trace.find |
The nodes of the document that trace to a Project Board item or a Software Board element (the reverse of trace.list). |
node.create#
Create Node. Create a frame, group, section, shape, text, vector or boolean operation under a page or a container node.
Since 0.1 · mutates · licence paid
Creates one node of a 0.2 type (FRAME, GROUP, SECTION, RECTANGLE, ELLIPSE, LINE, POLYGON, STAR, TEXT, VECTOR, BOOLEAN_OPERATION). Any stored property of FMT-001 §4.4 and §4.6 may be given besides the common ones; a FRAME without –fills starts white, as the Frame tool makes it. A TEXT takes –characters, –fontName, –fontSize and the other text properties, and is named after its text. A VECTOR takes –vectorPaths (path data is normalised to absolute M L C Z). A BOOLEAN_OPERATION takes –children (nodes of one parent, which move into it keeping their positions) and –booleanOperation; without –fills or –strokes it takes the bottom child’s paints. An image is a RECTANGLE with an image fill: use image.insert. Without –parent the node goes on the first page; without –after it goes on top.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--type |
“FRAME” | “GROUP” | “SECTION” | “RECTANGLE” | “ELLIPSE” | “LINE” | “POLYGON” | “STAR” | … | yes | The node type (0.4: FRAME, GROUP, SECTION, RECTANGLE, ELLIPSE, LINE, POLYGON, STAR, TEXT, VECTOR, BOOLEAN_OPERATION, COMPONENT, SLOT; instances with instance.create). | |
--parent |
string | The page or container node to create in (default: the first page). | ||
--name |
string | |||
--x |
number | |||
--y |
number | |||
--width |
number | ≥ 0 | ||
--height |
number | ≥ 0 | ||
--fills |
paint[] | |||
--strokes |
paint[] | |||
--strokeWeight |
number | ≥ 0 | ||
--cornerRadius |
number | ≥ 0 | ||
--opacity |
number | ≥ 0, ≤ 1 | ||
--visible |
boolean | |||
--locked |
boolean | |||
--rotation |
number | |||
--after |
string | Place the new node just above this sibling. | ||
--characters |
string | TEXT: the text. | ||
--fontName |
object | |||
--fontSize |
number | |||
--vectorPaths |
object[] | Figma’s vectorPaths: [{windingRule, data}] with SVG path data in the node’s coordinates. | ||
--booleanOperation |
“UNION” | “SUBTRACT” | “INTERSECT” | “EXCLUDE” | |||
--children |
string[] | BOOLEAN_OPERATION: the nodes it combines (one parent); they move into it. |
ud node.create --type FRAME --name Card --parent "Screens/Login" --x 24 --y 120 --width 342 --height 200
ud node.create --type RECTANGLE --parent nd-4e6a8c0d2f1b --fills '[{"type":"SOLID","color":{"r":0.3,"g":0.27,"b":0.9}}]'
ud node.create --type TEXT --parent "Screens/Login" --characters "Welcome back" --fontName '{"family":"Inter","style":"Semi Bold"}' --fontSize 28
ud node.create --type BOOLEAN_OPERATION --booleanOperation SUBTRACT --children '["nd-7b9d1f3a5c4e","nd-8c0e2a4b6d5f"]'node.update#
Update Node Properties. Merge stored properties into nodes (the general setter behind the Plugin API).
Since 0.1 · mutates · licence paid · selection
Applies a merge patch (FMT-001 §5.9) of stored properties to each target: a member set to null is removed, arrays replace. type, parent, index and id cannot be set here; use node.reparent and node.reorder.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--set |
object | yes | Stored properties to merge. |
ud node.update --node "Screens/Login/Button" --set '{"name":"Primary button","cornerRadius":12}'
ud node.update --query 'rectangle' --set '{"strokeWeight":2}'node.rename#
Rename Node. Rename one node.
Since 0.1 · mutates · licence paid · selection
Sets the layer name of one node.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--name |
string | yes |
ud node.rename --node nd-9d1f3b5c7e6a --name "Sign in button"node.move#
Move. Set the position of nodes (–to) or nudge them (–by), within their parent.
Since 0.1 · mutates · licence paid · selection
Changes x and y relative to the parent; it never re-parents (that is node.reparent). –by is what a drag or an arrow-key nudge does (CAN-3).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--to |
object | The new position. | ||
--by |
object | An offset added to the position. |
ud node.move --node "Screens/Login/Button" --to '{"x":24,"y":480}'
ud node.move --query 'frame[name="Login"] > rectangle' --by '{"x":0,"y":-8}'node.resize#
Resize. Set the width and/or height of nodes, keeping the top-left corner or the centre in place.
Since 0.1 · mutates · licence paid · selection
Sets width and height. –anchor center keeps the centre where it is (Alt-resize, CAN-3). Resizing a frame moves and resizes its children by their constraints (LAY-1; children in auto layout flow are laid out by the frame instead); –ignoreConstraints leaves them where they are (Ctrl held while resizing). A hug or fill axis that is resized becomes fixed.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--width |
number | ≥ 0 | ||
--height |
number | ≥ 0 | ||
--anchor |
“top-left” | “center” | "top-left" |
What stays in place. | |
--ignoreConstraints |
boolean | Do not apply the children’s constraints (Ctrl while resizing). |
ud node.resize --node "Screens/Login/Avatar" --width 96 --height 96 --anchor center
ud node.resize --node "Screens/Login" --width 1440 --ignoreConstraintsnode.rotate#
Rotate. Set the rotation of nodes in degrees.
Since 0.1 · mutates · licence paid · selection
Sets the rotation (counter-clockwise positive, as in Figma) in the range -180 to 180.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--angle |
number | yes | Degrees. |
ud node.rotate --node "Screens/Login/Avatar" --angle 45node.setVisible#
Show or Hide. Show or hide nodes.
Since 0.1 · mutates · licence paid · selection
Sets the visibility (the eye in the layers panel).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--visible |
boolean | yes |
ud node.setVisible --nodes '["nd-5f7b9d1e3a2c"]' --visible falsenode.setLocked#
Lock or Unlock. Lock or unlock nodes against canvas edits.
Since 0.1 · mutates · licence paid · selection
Sets the lock (the padlock in the layers panel). Locked nodes are skipped by canvas selection.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--locked |
boolean | yes |
ud node.setLocked --query 'frame[name="Login"]' --locked truenode.reparent#
Move into. Move nodes into another page or container, keeping their place on the canvas.
Since 0.1 · mutates · licence paid · selection
Re-parents nodes (FMT-001 node.move). With –keepPosition (the default) x and y are recomputed so the node does not move visually: at 0.1 parents translate but do not rotate their children. –index, –after or –before set the place among the new siblings; otherwise the node goes on top.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--parent |
string | yes | A page (pg-… or its name) or a container node (id, name path or ud:// link). | |
--index |
integer | Position among the new siblings, 0 at the back. ≥ 0 | ||
--after |
string | Place just above this sibling. | ||
--before |
string | Place just below this sibling. | ||
--keepPosition |
boolean | true |
Recompute x/y so the node stays where it is on the canvas. |
ud node.reparent --node "Screens/Login/Avatar" --parent "Screens/Login/Form"
ud node.reparent --nodes '["nd-7b9d1f3a5c4e","nd-8c0e2a4b6d5f"]' --parent Screens --index 0 --keepPosition falsenode.reorder#
Reorder. Change a node’s place among its siblings: to front or back, one step, a position, or next to a sibling.
Since 0.1 · mutates · licence paid · selection
Z-order (DOC-3): –to front|back|forward|backward, –index
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--index |
integer | Position among the siblings, 0 at the back. ≥ 0 | ||
--after |
string | Place just above this sibling. | ||
--before |
string | Place just below this sibling. | ||
--to |
“front” | “back” | “forward” | “backward” | Bring to front, send to back, bring forward or send backward. |
ud node.reorder --node "Screens/Login/Button" --to front
ud node.reorder --node nd-5f7b9d1e3a2c --index 0node.delete#
Delete. Delete nodes and everything inside them.
Since 0.1 · mutates · licence paid · selection
Removes the nodes and their descendants. Undo restores them with their ids.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text |
ud node.delete --query '[name^="Draft "]'node.duplicate#
Duplicate. Copy nodes with everything inside them, next to the originals.
Since 0.1 · mutates · licence paid · selection
Deep-copies each node (new ids, same names) just above its original in the same parent. –offset shifts the copies.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--offset |
object | Added to the position of each copy. |
ud node.duplicate --node "Screens/Login/Button" --offset '{"x":0,"y":64}'node.group#
Group Selection. Wrap nodes in a new group, frame or section sized to their bounds.
Since 0.1 · mutates · licence paid · selection
Group selection (Ctrl+G), frame selection (Ctrl+Alt+G) and section selection (DOC-7): the nodes must share a parent; the new container takes the union of their bounds and the nodes move into it with their positions kept (a group’s children keep x/y in the nearest frame’s space, FMT-001 §4.4.1; a frame’s become relative to it). It is placed where the top-most of them was.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--type |
“GROUP” | “FRAME” | “SECTION” | "GROUP" |
||
--name |
string |
ud node.group --nodes '["nd-7b9d1f3a5c4e","nd-8c0e2a4b6d5f"]' --name Fields
ud node.group --query 'frame[name="Login"] > rectangle' --type FRAME --name Cardnode.ungroup#
Ungroup. Dissolve groups, frames, sections or boolean operations: their children move up, keeping their place on the canvas.
Since 0.1 · mutates · licence paid · selection
Ungroup (Ctrl+Shift+G), “Remove frame” (DOC-7) and ungrouping a boolean operation (DRW-5): each child moves into the container’s parent at the container’s place in the z-order, with x and y adjusted so nothing moves; the container is deleted.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text |
ud node.ungroup --node "Screens/Login/Form"node.align#
Align. Align nodes to each other’s bounds, or to their parent.
Since 0.1 · mutates · licence paid · selection
Align left, horizontal centre, right, top, vertical centre or bottom (CAN-6). Several nodes align to the bounds of the selection (–to selection, the default); one node, or –to parent, aligns inside its parent frame.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--axis |
“left” | “hcenter” | “right” | “top” | “vcenter” | “bottom” | yes | ||
--to |
“selection” | “parent” | What to align to (default: the selection, or the parent for one node). |
ud node.align --query 'frame[name="Login"] > rectangle' --axis left
ud node.align --node "Screens/Login/Button" --axis hcenter --to parentnode.distribute#
Distribute Spacing. Space three or more nodes evenly between the first and the last.
Since 0.1 · mutates · licence paid · selection
Distribute horizontal or vertical spacing (CAN-6): the outermost nodes stay, the others get equal gaps.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--axis |
“horizontal” | “vertical” | yes |
ud node.distribute --query 'frame[name="Toolbar"] > *' --axis horizontalnode.describe#
Describe Node. One node fully: every property with defaults filled in, its children ids, page and name path.
Since 0.1 · read-only · licence read · selection
What ud inspect prints: the stored properties of FMT-001 §4.4 with the defaults of core.defaults filled in, plus children (ids, bottom first), page and path (Page/Frame/Child).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text |
ud node.describe --node "Screens/Login/Button" --jsonnode.tree#
Layer Tree. The layer tree under a node, a page or the whole document: id, type, name, position, size, layout and children.
Since 0.1 · read-only · licence read
What ud tree and get_metadata read. Without –node or –page the root is the document (type DOCUMENT) with one child per page (type PAGE). –depth limits the levels below the root; rows beyond it carry childCount instead of children. Positions and sizes are the derived ones (auto layout, hug and fill, groups); layout summarises auto layout and sizing: “column gap 16 pad 24 · fixed × hug”.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | The root node (or page) of the tree. | ||
--page |
string | A page id (pg-…) or a page name. | ||
--depth |
integer | Levels below the root to include (default: all). ≥ 0 |
ud node.tree --depth 2
ud node.tree --node "Screens/Login" --jsonnode.find#
Find Nodes. The ids of the nodes matching a selector, in document order.
Since 0.1 · read-only · licence read
Runs a selector of CLI-001 §6 over every page, or over –page only.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--query |
string | yes | A selector (CLI-001 §6): frame[name^=“Login”] > text | |
--page |
string | Search this page only. |
ud node.find --query 'frame[name^="Login"] > rectangle'
ud node.find --query 'ellipse' --page Screensnode.presets#
Frame Presets. The frame size presets: phones, tablets, desktops, watches, paper and social media.
Since 0.1 · read-only · licence read
Lists the presets of DRW-2 with id, name, category, width and height. node.applyPreset takes the id or the name.
Takes no parameters.
ud node.presets --jsonnode.applyPreset#
Apply Frame Preset. Resize frames to a preset device, paper or social media size.
Since 0.1 · mutates · licence paid · selection
Sets width and height from a preset of node.presets (DRW-2), keeping the top-left corner.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--preset |
string | yes | A preset id or name; see node.presets. |
ud node.applyPreset --node "Screens/Login" --preset iphone-16vector.setPaths#
Set Vector Paths. Replace the paths of a vector node with SVG path data.
Since 0.2 · mutates · licence paid · selection
Figma’s VectorNode.vectorPaths: each path is SVG path data in the node’s own coordinates with a winding rule. The data is normalised to absolute M, L, C and Z (relative commands, H/V, quadratics and arcs are converted). The pen tool and the vector network editor arrive in 0.2b; flatten (node.flatten) too.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--vectorPaths |
object[] | yes | Figma’s vectorPaths: [{windingRule, data}] with SVG path data in the node’s coordinates. |
ud vector.setPaths --node nd-1c3e5a7b9d0f --vectorPaths '[{"windingRule":"NONZERO","data":"M 0 0 L 24 0 L 12 18 Z"}]'node.renameBatch#
Rename Layers. Rename several layers at once: find and replace, and a pattern with numbering ($n, $nn) and the current name ($&).
Since 0.3 · mutates · licence paid · selection
DOC-6 batch rename. For each target, in –order (selection: as given; layers: document order), the current name (its default name when it has none) goes through –find/–replace (literal, or a regular expression with –regex, where $1 refers to a group), then through –pattern, where $n is the number (from –start, default 1), $nn the number padded to two digits ($nnn to three), $& the name after find/replace, and $$ a dollar. Nodes whose name does not change are left out of the result.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--find |
string | Text (or with –regex, a regular expression) to replace in each name. | ||
--replace |
string | "" |
Its replacement; with –regex, $1… refer to groups. | |
--regex |
boolean | false |
||
--pattern |
string | The new name: $n number, $nn padded number, $& current name. | ||
--start |
integer | 1 |
The first number. | |
--order |
“selection” | “layers” | "selection" |
Numbering order: as given, or document order. |
ud node.renameBatch --query 'frame[name^="Card"]' --pattern 'Card $nn'
ud node.renameBatch --nodes nd-1c3e5a7b9d0f,nd-9f1b3d5c7e2a --find Btn --replace Button
ud node.renameBatch --query 'text' --pattern '$& / $n' --start 0 --order layerssection.setReady#
Mark Ready for Development. Mark sections and frames “Ready for development”, or clear the mark.
Since 0.3 · mutates · licence paid · selection
DOC-8 and DEV-5: sets devStatus (FMT-001 §4.4.8) to {type: “READY_FOR_DEV”, at, description?} on sections and frames, or removes it with –ready false. at is the time the status was set, so the compare view can find the design as it was.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--ready |
boolean | yes | true marks Ready for development, false clears the status. | |
--description |
string | A note for developers. |
ud section.setReady --node "Screens/Checkout" --ready true --description "Desktop and mobile"
ud section.setReady --query 'section' --ready falsevector.setNetwork#
Set Vector Network. Replace the vector network of a vector node (vertices, straight and Bézier segments, fill regions).
Since 0.2b · mutates · licence paid · selection
DRW-4, FMT-001 §4.6.4: the whole network is one property and an edit replaces it. Vertices are points in the node’s coordinates (optional strokeCap, strokeJoin, cornerRadius, handleMirroring); segments join two vertices, straight or with tangentStart/tangentEnd handle offsets; regions are lists of loops of segment indexes with a windingRule and optional fills. The network is validated: indexes in range, no duplicate segment, every loop chains end to end and closes; degenerate parts (zero-length segments, unused vertices) only warn. vectorPaths is derived from it. With –fit (default) the node is re-based on the network’s bounds.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--network |
object | yes | Figma’s VectorNetwork: {vertices, segments, regions} in the node’s coordinates (FMT-001 §4.6.4). | |
--fit |
boolean | true |
Re-base the coordinates on the network’s bounds and move the node so nothing moves on the canvas (Figma’s behaviour); the result’s shift says by how much. |
ud vector.setNetwork --node nd-1c3e5a7b9d0f --network '{"vertices":[{"x":0,"y":0},{"x":24,"y":0},{"x":12,"y":18}],"segments":[{"start":0,"end":1},{"start":1,"end":2,"tangentStart":{"x":0,"y":8},"tangentEnd":{"x":6,"y":0}},{"start":2,"end":0}],"regions":[{"windingRule":"NONZERO","loops":[[0,1,2]]}]}'vector.editNetwork#
Edit Vector Network. Apply pen-tool edits to a vector network in one step: vertices, handles, segments, splits, deletions, paint bucket.
Since 0.2b · mutates · licence paid · selection
DRW-4: the pen tool’s edits as a list applied in one event (the network is one property). Coordinates are in the node’s own space, before the fit. Ops: addVertex {x, y, handleMirroring?} moveVertex {index, x, y} setVertex {index, handleMirroring?, …} setTangent {segment, end, x, y} (the vertex’s handleMirroring — or the node’s — moves the opposite handle: ANGLE keeps its length, ANGLE_AND_LENGTH mirrors it exactly, NONE leaves it) addSegment {start, end, tangentStart?, tangentEnd?} splitSegment {segment, t} deleteVertices {indices, heal?} (heal, the default: a vertex between two segments is bridged by one segment and regions keep their loops, as Figma; else its segments go) deleteSegments {indices} (regions using them go) toggleRegion {x, y} (paint bucket: removes the region under the point, or fills the closed area there with the node’s fills; crossing segments are split first) setRegionFills {region, fills} join {all?} (the nearest open ends, or all) reverse The result has the network, the shift the fit applied, the indexes of added vertices and segments, and what each toggleRegion did.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--ops |
object[] | yes | Edits applied in order, in the node’s coordinates before any fit: addVertex, moveVertex, setVertex, setTangent, addSegment, splitSegment, deleteVertices, deleteSegments, toggleRegion, setRegionFills, join, reverse. | |
--fit |
boolean | true |
Re-base the coordinates on the network’s bounds and move the node so nothing moves on the canvas (Figma’s behaviour); the result’s shift says by how much. |
ud vector.editNetwork --node nd-1c3e5a7b9d0f --ops '[{"op":"addVertex","x":0,"y":0},{"op":"addVertex","x":24,"y":0},{"op":"addSegment","start":0,"end":1,"tangentStart":{"x":8,"y":-10},"tangentEnd":{"x":-8,"y":-10}}]'
ud vector.editNetwork --node "Icons/Heart" --ops '[{"op":"toggleRegion","x":12,"y":12}]'vector.flatten#
Flatten. Bake shapes, groups or boolean operations into one vector node (Ctrl+E).
Since 0.2b · mutates · licence paid · selection
DRW-5, DRW-6, FMT-001 §4.6.5: the targets (siblings) are replaced, in one undo group, by one VECTOR whose network holds their geometry: a boolean operation’s result is baked (refitted to curves within 0.05 px), shapes and vectors keep their curves, groups contribute every child. The new node takes the top node’s name, appearance and paints (a group’s from its top child) and its place in the z-order; children painted differently keep their fills on their regions. Text is not flattened until 0.3. The vector gets a new id (node.delete + node.create).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text |
ud vector.flatten --node "Icons/Badge/Subtract"
ud vector.flatten --nodes '["nd-7b9d1f3a5c4e","nd-8c0e2a4b6d5f"]'vector.outlineStroke#
Outline Stroke. Turn strokes into filled vector geometry (Ctrl+Shift+O).
Since 0.2b · mutates · licence paid · selection
DRW-6: each target’s stroke — weight, alignment, caps, joins, miter limit, dashes, arrowheads — becomes the fill of a new VECTOR (refitted to curves within 0.05 px) whose fills are the stroke paints and which has no stroke. A node without fills is replaced by it (new id, same name and place); a node with fills keeps them, loses its strokes and gets the outline just above it. –keep leaves the node as it was (the Plugin API’s outlineStroke()). Nodes without a visible stroke are skipped with a warning. Returns the new vectors.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--keep |
boolean | false |
ud vector.outlineStroke --node "Icons/Arrow"
ud vector.outlineStroke --query 'vector[name^="Line"]' --keep truevector.offset#
Offset Path. Grow or shrink the outline of shapes by a distance, with miter, round or bevel corners.
Since 0.2b · mutates · licence paid · selection
DRW-6: the fill area of each target moves outwards by –distance px (inwards when negative); corners that open get the –join (MITER, limited by –miterLimit, default 4, then bevelled; ROUND; BEVEL). A vector is changed in place (its network replaced, refitted to curves within 0.05 px, re-based on its bounds); any other shape becomes a vector with the same appearance (new id). An open path is offset as a stroke of width 2 × |distance|. A shape shrunk past its thickness is left empty, with a warning.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--distance |
number | yes | ||
--join |
“MITER” | “ROUND” | “BEVEL” | "MITER" |
||
--miterLimit |
number | 4 |
≥ 1 |
ud vector.offset --node "Icons/Star" --distance 4 --join ROUND
ud vector.offset --node nd-1c3e5a7b9d0f --distance -2vector.simplify#
Simplify Path. Reduce the points of vector paths while keeping their shape within a tolerance.
Since 0.2b · mutates · licence paid · selection
DRW-6: every chain of segments between corners, ends and branch points is simplified within –tolerance px (default 0.5): straight runs drop points with Ramer–Douglas–Peucker, curved runs are flattened and refitted with as few Bézier segments as fit (Schneider). Corners (handles turning more than 10°) and regions are kept.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--tolerance |
number | 0.5 |
ud vector.simplify --node "Icons/Scribble" --tolerance 1vector.join#
Join Paths. Join the open ends of vector paths, nearest first.
Since 0.2b · mutates · licence paid · selection
DRW-6: open ends (vertices used by one segment) are joined in pairs, nearest pair first: ends closer than 0.01 px merge into one vertex, others get a straight segment. A vector without regions whose join closes a loop gets the closed areas as fill regions, as a path closed with the pen is filled.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text |
ud vector.join --node "Icons/Open path"vector.reverse#
Reverse Path Direction. Reverse the direction of vector paths (where dashes start, which end a path begins at).
Since 0.2b · mutates · licence paid · selection
DRW-6: every segment is walked the other way (start and end, and their handles, swapped; segments and vertices listed in reverse order) and every region loop is reversed. The shape and its fills do not change; dash patterns start from the other end.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text |
ud vector.reverse --node "Icons/Arrow"boolean.create#
Boolean Operation. Combine nodes into a live boolean operation: union, subtract, intersect or exclude.
Since 0.2b · mutates · licence paid · selection
DRW-5, FMT-001 §4.6.5: the targets (siblings) move into a new BOOLEAN_OPERATION placed where the top-most of them was; they stay editable and keep their positions on the canvas. The result is computed live from the children in paint order, bottom-up: SUBTRACT removes every later child from the bottom one, EXCLUDE keeps what an odd number of children cover. The node takes the bottom child’s fills and strokes (which paint the result) and is named after the operation unless –name is given. Ungroup it with node.ungroup; bake it with vector.flatten.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--operation |
“UNION” | “SUBTRACT” | “INTERSECT” | “EXCLUDE” | yes | UNION, SUBTRACT (the bottom node minus the others), INTERSECT or EXCLUDE. | |
--name |
string |
ud boolean.create --nodes '["nd-7b9d1f3a5c4e","nd-8c0e2a4b6d5f"]' --operation SUBTRACT
ud boolean.create --query 'frame[name="Icon"] > ellipse' --operation UNION --name Blobboolean.setOperation#
Set Boolean Operation. Change the operation of boolean operation nodes.
Since 0.2b · mutates · licence paid · selection
DRW-5: UNION, SUBTRACT, INTERSECT or EXCLUDE. A node still carrying its default name (Union, Subtract, Intersect, Exclude) is renamed after the new operation.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--operation |
“UNION” | “SUBTRACT” | “INTERSECT” | “EXCLUDE” | yes | UNION, SUBTRACT (the bottom node minus the others), INTERSECT or EXCLUDE. |
ud boolean.setOperation --node "Icons/Badge/Union" --operation EXCLUDEnode.rescale#
Scale. Scale nodes with their properties: size, position, strokes, effects, radii, text and vector coordinates (K).
Since 0.2b · mutates · licence paid · selection
DRW-9, Figma’s rescale(): every node of each target’s subtree is scaled by –factor — size, stroke weights and dash patterns, effect radii, spreads and offsets, corner radii, font sizes with letter spacing and line height in pixels, paragraph spacing, auto-layout padding and gaps, layout grids, vector network coordinates and vector paths. The target keeps –origin fixed (a page point; default its top-left corner); positions inside it scale with it.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--factor |
number | yes | ||
--origin |
object | The page point that stays fixed (default: each target’s top-left corner). |
ud node.rescale --node "Screens/Login/Card" --factor 2
ud node.rescale --query 'frame[name="Icon"]' --factor 0.5 --origin '{"x":100,"y":100}'node.setAccessibility#
Set Accessibility. Set a node’s accessibility metadata: role, name, description, heading level, focus order, alt text, decorative.
Since 0.6 · mutates · licence paid · selection · aliases a11y.set
DEV-8: the accessibility object of FMT-001 §4.4.8 ({role, name, description, headingLevel 1-6, focusOrder, altText, decorative}). Values merge into what is stored; null removes one. Code generation uses it (headings become h1-h6, roles pick elements, alt text and names become alt and aria-label) and ud lint checks it (missing-alt-text, missing-accessible-name).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--role |
string or null | ARIA role: button, link, heading, img, checkbox, switch, tab, textbox, … | ||
--name |
string or null | Accessible name. | ||
--description |
string or null | |||
--headingLevel |
integer or null | |||
--focusOrder |
integer or null | |||
--altText |
string or null | Alt text of an image. | ||
--decorative |
boolean or null | Hidden from assistive technology. |
ud node.setAccessibility --node "Screens/Login/Title" --role heading --headingLevel 1
ud node.setAccessibility --node "Screens/Login/Logo" --altText "Shop logo"
ud node.setAccessibility --query 'rectangle[name="Divider"]' --decorative truenode.setStatus#
Set Dev Status. Mark frames, sections and components Ready for development or Completed, or clear the mark.
Since 0.6 · mutates · licence paid · selection
DEV-5: sets devStatus {type, description?, at} (FMT-001 §4.4.8) on frames, sections, components and component sets; –status null clears it. at is the time it was set, so the compare view can show what changed since. section.setReady is the older form for READY_FOR_DEV.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--status |
“READY_FOR_DEV” | “COMPLETED” | null | yes | ||
--description |
string |
ud node.setStatus --node "Screens/Checkout" --status READY_FOR_DEV --description "Desktop and mobile"
ud node.setStatus --node "Screens/Checkout" --status COMPLETED
ud node.setStatus --node "Screens/Checkout" --status nullannotation.add#
Add Annotation. Attach a developer note to nodes, with pinned properties and a category.
Since 0.6 · mutates · licence paid · selection
DEV-7: appends {label, labelMarkdown, properties, categoryId} (Figma’s shape, FMT-001 §4.4.8) to the nodes’ annotations. –category takes a category id or label (built in: behaviour, accessibility, interaction).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--label |
string | |||
--labelMarkdown |
string | |||
--properties |
object[] | Pinned properties: [{“type”: “width”}, …]. | ||
--category |
string |
ud annotation.add --node "Screens/Login/Sign in" --label "Disabled until both fields are valid" --category behaviour
ud annotation.add --node "Screens/Login/Card" --properties '[{"type": "width"}, {"type": "cornerRadius"}]'annotation.set#
Edit Annotation. Change one annotation of a node (label, markdown, pinned properties, category).
Since 0.6 · mutates · licence paid · selection
DEV-7: edits annotations[index] of one node; null removes a member.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--index |
integer | yes | ≥ 0 | |
--label |
string or null | |||
--labelMarkdown |
string or null | |||
--properties |
object[] or null | |||
--category |
string or null |
ud annotation.set --node "Screens/Login/Sign in" --index 0 --label "Disabled until the form is valid"annotation.remove#
Remove Annotation. Remove one annotation (by index) or all annotations of nodes.
Since 0.6 · mutates · licence paid · selection
DEV-7: without –index every annotation of the nodes goes.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--index |
integer | ≥ 0 |
ud annotation.remove --node "Screens/Login/Sign in" --index 0
ud annotation.remove --query 'frame'annotation.categories#
Annotation Categories. The annotation categories of the document (built in: behaviour, accessibility, interaction).
Since 0.6 · read-only · licence read
DEV-7, FMT-001 §4.2 annotationCategories: id, label, colour and order of each category.
Takes no parameters.
ud annotation.categoriesannotation.addCategory#
Add Annotation Category. Add an annotation category with a label and colour.
Since 0.6 · mutates · licence paid
DEV-7: adds a category (an- id) to document.annotationCategories; the built-in ones are kept.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--label |
string | yes | ||
--color |
“yellow” | “orange” | “red” | “pink” | “violet” | “blue” | “teal” | “green” |
ud annotation.addCategory --label Content --color tealannotation.removeCategory#
Remove Annotation Category. Remove an annotation category; annotations in it keep their text and lose the category.
Since 0.6 · mutates · licence paid
DEV-7: removes the category from document.annotationCategories and its id from the annotations that used it.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--category |
string | yes |
ud annotation.removeCategory --category Contenttrace.add#
Add Trace. Link nodes to a Project Board item (REQ-n, #n) of a .pb board, or to a Software Board element of a .uml model.
Since 0.6 · mutates · licence paid · selection
INT-1: appends {file, item} to the nodes’ traces (FMT-001 §4.4.8). file is the .pb board, relative to the design file; item is the issue number (#12), its requirement id (DEV-4, the first word of the title) or its id (iss-…). INT-4: with –kind uml, file is a Software Board model (.uml) and item an element id (el-…) of a Component, Class, Interface, Use case or Actor; the trace is stored as {kind: “uml”, file, item}. –kind defaults to the file’s extension. trace.list reads the files and shows each item’s title and state, or each element’s type and name.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--kind |
“pb” | “uml” | pb: a Project Board item (default for .pb); uml: a Software Board element (default for .uml). | ||
--file |
string | yes | pattern \.(pb|uml)$ |
|
--item |
string | yes |
ud trace.add --node "Screens/Checkout" --file planning.pb --item "#42"
ud trace.add --node "Screens/Login" --file planning.pb --item DEV-4
ud trace.add --node "Screens/Login" --kind uml --file ui-designer.uml --item el-4f0c2a9d1b7etrace.remove#
Remove Trace. Remove traces from nodes: one item, every item of a board or model, every trace of a kind, or all.
Since 0.6 · mutates · licence paid · selection
INT-1: removes the traces matching –kind, –file and –item (all optional; none removes all).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--kind |
“pb” | “uml” | |||
--file |
string | |||
--item |
string |
ud trace.remove --node "Screens/Checkout" --file planning.pb --item "#42"
ud trace.remove --node "Screens/Checkout" --kind umltrace.list#
List Traces. The Project Board items and Software Board elements nodes trace to, with titles, states, types and names read from the files.
Since 0.6 · read-only · licence read
INT-1: every trace of the node (or of the document), with the item’s title and state folded from the .pb board (tree issues and WAL issue events). INT-4: a uml trace shows the element’s type, name and qualified name folded from the .uml model (tree elements and WAL element events). A file that cannot be read or an item it does not have is marked missing.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. |
ud trace.list
ud trace.list --node "Screens/Checkout"trace.find#
Find Traced Nodes. The nodes of the document that trace to a Project Board item or a Software Board element (the reverse of trace.list).
Since 1.2 · read-only · licence read
INT-4: the reverse lookup: every node whose traces name –item (with –kind, default pb, and –file when given), with its name, type and page. Software Board, or an agent, asks it which frames realise a model element.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--kind |
“pb” | “uml” | Default pb, or uml when –file is a .uml model. | ||
--file |
string | The .pb board or .uml model, relative to the design file; absent: any file. | ||
--item |
string | yes |
ud trace.find --kind uml --item el-4f0c2a9d1b7e
ud trace.find --file planning.pb --item DEV-4Text#
| Command | Summary |
|---|---|
text.set |
Replace the characters of text nodes, dropping or cutting their styled runs. |
text.edit |
Replace a range of a text node’s characters, keeping and shifting its styled runs (caret edits). |
text.setRange |
Set font, size, colour, spacing, case, decoration, link or text style on a range of a text node. |
text.setParagraph |
Set list, indentation and spacing on whole paragraphs of a text node. |
text.setFont |
Set the font family, style, size, line height and letter spacing of whole text nodes. |
text.align |
Set the horizontal and vertical alignment of text nodes. |
text.autoResize |
Set how text nodes size: auto width, auto height or fixed, with optional truncation. |
text.replaceFont |
Replace a font everywhere in the document (or on one page), in nodes and in styled runs. |
text.setFeatures |
Turn OpenType features (ligatures, tabular numbers, fractions, small caps, stylistic sets, case forms) on or off. |
text.setAxes |
Set variable font axes (weight, width, optical size, slant, custom axes) of text nodes. |
text.attachToPath |
Set a text along the outline of a line, ellipse, vector, star, polygon, rectangle or boolean, or along path data. |
text.detachFromPath |
Set text that follows a path straight again. |
text.set#
Set Text. Replace the characters of text nodes, dropping or cutting their styled runs.
Since 0.2 · mutates · licence paid · selection
Writes characters and styledRuns together (FMT-001 §4.6.6). Without –keepRuns the mixed styles are dropped and the text takes the node’s style; with it the runs are kept and cut to the new length. A layer whose name followed its text is renamed. Node-level text properties (font, size, alignment) are set with text.setFont, text.align or node.update. Caret edits in the editor use text.edit.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--characters |
string | yes | ||
--keepRuns |
boolean | false |
Keep the styled runs, cut to the new text. |
ud text.set --node "Screens/Login/Title" --characters "Welcome back"text.edit#
Edit Text. Replace a range of a text node’s characters, keeping and shifting its styled runs (caret edits).
Since 0.2 · mutates · licence paid · selection
The one command the canvas text editor uses for typing, deleting and pasting plain text (TXT-7): [start, end) in UTF-16 offsets is replaced by –insert. Runs after the edit shift; the inserted text takes the style of the character before it. An empty –insert deletes; start = end inserts. The result gives the caret after the insertion.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--start |
integer | yes | ≥ 0 | |
--end |
integer | yes | ≥ 0 | |
--insert |
string | yes |
ud text.edit --node nd-91c0d4e2aa17 --start 7 --end 7 --insert "dear "
ud text.edit --node nd-91c0d4e2aa17 --start 0 --end 5 --insert ""text.setRange#
Style Text Range. Set font, size, colour, spacing, case, decoration, link or text style on a range of a text node.
Since 0.2 · mutates · licence paid · selection
Mixed styles (TXT-2), as Figma’s setRange… functions: [start, end) in UTF-16 offsets gets the properties of –set; runs are split and merged, and a run property equal to the node’s value is dropped (FMT-001 §4.6.6). A null value resets a property to the node’s value in the range.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--start |
integer | yes | ≥ 0 | |
--end |
integer | yes | ≥ 0 | |
--set |
object | yes |
ud text.setRange --node "Screens/Login/Title" --start 0 --end 7 --set '{"fontName":{"family":"Inter","style":"Bold"}}'
ud text.setRange --node nd-91c0d4e2aa17 --start 8 --end 12 --set '{"hyperlink":{"type":"URL","value":"https://softforge.dev"},"textDecoration":"UNDERLINE"}'text.setParagraph#
Set Paragraph Style. Set list, indentation and spacing on whole paragraphs of a text node.
Since 0.2 · mutates · licence paid · selection
Paragraph properties (TXT-3) cover whole paragraphs (FMT-001 §4.6.6): name them by index (–paragraphs, 0 = first), or give a range and every paragraph it touches is styled. listOptions makes bulleted (UNORDERED) or numbered (ORDERED) lists; indentation nests them.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--paragraphs |
integer[] | Paragraph indexes (split on line breaks). | ||
--start |
integer | ≥ 0 | ||
--end |
integer | ≥ 0 | ||
--set |
object | yes |
ud text.setParagraph --node nd-91c0d4e2aa17 --paragraphs '[1,2,3]' --set '{"listOptions":{"type":"UNORDERED"}}'
ud text.setParagraph --node nd-91c0d4e2aa17 --start 0 --end 40 --set '{"paragraphSpacing":8}'text.setFont#
Set Font. Set the font family, style, size, line height and letter spacing of whole text nodes.
Since 0.2 · mutates · licence paid · selection · aliases text.font
The Text section’s font, style and size for whole nodes (CLI-001 §5.1). A new family keeps each run’s style (bold words stay bold); a new style or size replaces the run overrides of that property. Fonts are referred to by name; a font that is not installed renders with the fallback and is listed as missing (TXT-6). –lineHeight takes {unit: “AUTO”} or {unit: “PIXELS” | “PERCENT”, value}, –letterSpacing {unit: “PIXELS” | “PERCENT”, value} (TXT-4); they replace the run overrides of that property too.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--family |
string | |||
--style |
string | Figma style name: Regular, Semi Bold, Bold Italic, … | ||
--size |
number | |||
--lineHeight |
object | |||
--letterSpacing |
object |
ud text.setFont --node nd-91c0d4e2aa17 --family Inter --style "Semi Bold" --size 24
ud text.setFont --query 'text' --family Roboto
ud text.setFont --node nd-91c0d4e2aa17 --lineHeight '{"unit":"PERCENT","value":140}' --letterSpacing '{"unit":"PIXELS","value":-0.2}'text.align#
Align Text. Set the horizontal and vertical alignment of text nodes.
Since 0.2 · mutates · licence paid · selection
Paragraph alignment (TXT-3): horizontal LEFT, CENTER, RIGHT or JUSTIFIED; vertical TOP, CENTER or BOTTOM within a fixed-height text box.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--horizontal |
“LEFT” | “CENTER” | “RIGHT” | “JUSTIFIED” | |||
--vertical |
“TOP” | “CENTER” | “BOTTOM” |
ud text.align --node "Screens/Login/Forgot" --horizontal CENTERtext.autoResize#
Set Text Sizing. Set how text nodes size: auto width, auto height or fixed, with optional truncation.
Since 0.2 · mutates · licence paid · selection
TXT-1: WIDTH_AND_HEIGHT (auto width), HEIGHT (auto height, fixed width) or NONE (fixed size). With a fixed size, –truncation ENDING adds an ellipsis after –maxLines lines (null removes the limit). The derived size is computed by the text engine and not stored (FMT-001 §4.5).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--mode |
“NONE” | “WIDTH_AND_HEIGHT” | “HEIGHT” | “TRUNCATE” | yes | ||
--truncation |
“DISABLED” | “ENDING” | |||
--maxLines |
integer or null |
ud text.autoResize --node nd-91c0d4e2aa17 --mode HEIGHT
ud text.autoResize --node nd-91c0d4e2aa17 --mode NONE --truncation ENDING --maxLines 2text.replaceFont#
Replace Font. Replace a font everywhere in the document (or on one page), in nodes and in styled runs.
Since 0.2 · mutates · licence paid
TXT-6: a missing font can be replaced document-wide. –from names the family and optionally one style (without a style every style of the family matches); –to names the new family and optionally the style (without one each use keeps its style).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--from |
object | yes | ||
--to |
object | yes | ||
--page |
string | Only this page (id or name). |
ud text.replaceFont --from '{"family":"Brand Sans"}' --to '{"family":"Inter"}'
ud text.replaceFont --from '{"family":"Inter","style":"Semi Bold"}' --to '{"family":"Inter","style":"Bold"}' --page Screenstext.setFeatures#
Set OpenType Features. Turn OpenType features (ligatures, tabular numbers, fractions, small caps, stylistic sets, case forms) on or off.
Since 0.3 · mutates · licence paid · selection
TXT-4: –features maps four-letter OpenType tags to true (on), false (off) or null (back to the font’s default): liga, dlig (ligatures), tnum, pnum, lnum, onum (numbers), frac, sups, subs, smcp, c2sc (small caps), ss01…ss20 (stylistic sets), case (case-sensitive forms), zero (slashed zero). Stored in openTypeFeatures (FMT-001 §4.6.6).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--features |
object | yes | {tag: true | false | null}. |
ud text.setFeatures --node "Screens/Pricing/Total" --features '{"tnum": true, "liga": false}'
ud text.setFeatures --query 'text' --features '{"ss01": null}'text.setAxes#
Set Variable Font Axes. Set variable font axes (weight, width, optical size, slant, custom axes) of text nodes.
Since 0.3 · mutates · licence paid · selection
TXT-4: –axes maps four-character axis tags to values, or null to go back to the style’s value: wght (weight), wdth (width), opsz (optical size), slnt (slant), ital, and a font’s own axes (GRAD, …). Stored in fontVariations (FMT-001 §4.6.6); a font without the axis ignores it.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--axes |
object | yes | {tag: number | null}. |
ud text.setAxes --node "Screens/Login/Title" --axes '{"wght": 550}'
ud text.setAxes --query 'text' --axes '{"opsz": null}'text.attachToPath#
Attach Text to Path. Set a text along the outline of a line, ellipse, vector, star, polygon, rectangle or boolean, or along path data.
Since 1.2 · mutates · licence paid · selection
TXT-8: the text follows the outline of –source (copied into the text’s space as textPath.path and kept up to date while both layers are on the same page), or the SVG path data –path given in the text’s own coordinates. –startOffset moves the text along the path (px), –side LEFT (default) or RIGHT puts it on either side of the path’s direction, –align START, CENTER or END places the line on the path. Without –source and –path the options of an attached text change. The text becomes one auto-width line; characters past the end of the path are hidden (ud lint: text-on-path-overflow). text.detachFromPath sets it straight again.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | The TEXT node (id, name path or ud:// link). | ||
--source |
string | The layer whose outline the text follows (LINE, ELLIPSE, VECTOR, STAR, POLYGON, RECTANGLE or BOOLEAN_OPERATION). | ||
--path |
string | SVG path data in the text node’s own space, instead of –source. | ||
--startOffset |
number | Distance along the path, px. Default 0. | ||
--side |
“LEFT” | “RIGHT” | Side of the path the glyphs stand on, relative to its direction. Default LEFT. | ||
--align |
“START” | “CENTER” | “END” | Where the line sits on the path. Default START. |
ud text.attachToPath --node "Badge/Label" --source "Badge/Ring" --align CENTER
ud text.attachToPath --node nd-91c0d4e2aa17 --path "M 0 100 Q 100 0 200 100"
ud text.attachToPath --node nd-91c0d4e2aa17 --startOffset 24text.detachFromPath#
Detach Text from Path. Set text that follows a path straight again.
Since 1.2 · mutates · licence paid · selection
TXT-8: removes textPath; the text keeps its characters and styles and reads in a straight line again.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | The TEXT node (id, name path or ud:// link). | ||
--nodes |
string[] |
ud text.detachFromPath --node "Badge/Label"Layout#
| Command | Summary |
|---|---|
layout.set |
Turn auto layout on or off and set its direction, wrap, gap, padding, alignment and z-order. |
layout.remove |
Turn auto layout off; the children keep their current positions and sizes as stored values. |
layout.add |
Shift+A: give a frame auto layout inferred from its children, or wrap nodes in a new auto layout frame. |
layout.setSizing |
Set fixed, hug or fill per axis and the min/max width and height of nodes. |
layout.setPositioning |
Take children of auto layout frames out of flow (absolute, placed by constraints) or put them back. |
constraints.set |
Set how children follow their frame when it is resized: left, right, left and right, centre or scale per axis. |
grid.set |
Make frames grid auto layouts and set their rows, columns, gaps and track sizes. |
grid.place |
Place children of grid auto layouts in a row and column, with spans and alignment in the cell. |
layout.addGrid |
Add a column, row or uniform layout guide grid to frames (a preset or explicit values). |
layout.setGrid |
Change members of one layout grid of frames (by index, bottom first). |
layout.removeGrid |
Remove one layout grid of frames by index. |
layout.suggest |
What layout.add would choose (direction, gap, padding, alignment) and which children would move, without applying it. |
layout.set#
Set Auto Layout. Turn auto layout on or off and set its direction, wrap, gap, padding, alignment and z-order.
Since 0.3 · mutates · licence paid · selection
Auto layout of frames (LAY-2, LAY-4, LAY-6). –mode NONE | HORIZONTAL | VERTICAL | GRID (aliases none, row, horizontal, column, vertical, wrap = HORIZONTAL with wrap, grid). Turning auto layout on keeps the children’s visual order (they are reordered by position along the direction) and drops their stored x/y; turning it off writes their derived geometry as stored values, so nothing moves. –gap is a number or “auto” (space between; refused while a child fills the main axis, as in Figma). –padding is one number, [vertical, horizontal], [top, right, bottom, left] or {top, right, bottom, left}. –align is the 9-point alignment (top-left … bottom-right) or {primary, counter} (counter BASELINE aligns first baselines of a row). –alignContent spreads wrapped rows. –reverseZ paints the first item on top; –strokesInLayout counts strokes in the box; –clip clips content.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--mode |
“NONE” | “none” | “HORIZONTAL” | “horizontal” | “row” | “VERTICAL” | “vertical” | “column” | … | NONE, HORIZONTAL, VERTICAL or GRID (aliases: none, row, horizontal, column, vertical, wrap, grid). | ||
--wrap |
boolean | Wrap items into rows (horizontal layouts). | ||
--gap |
number or “auto” | Gap between items in px, or “auto” (space between). | ||
--rowGap |
number | Gap between wrapped rows (counterAxisSpacing). | ||
--padding |
number or number[] or object | One number (all sides), [vertical, horizontal], [top, right, bottom, left] (CSS order), or {top, right, bottom, left}. | ||
--align |
“top-left” | “top” | “top-right” | “left” | “center” | “right” | “bottom-left” | “bottom” | … or object | The 9-point alignment (top-left … bottom-right), or {primary, counter} in Figma’s values. | ||
--alignContent |
“AUTO” | “SPACE_BETWEEN” | Distribution of wrapped rows. | ||
--reverseZ |
boolean | First item on top (itemReverseZIndex). | ||
--strokesInLayout |
boolean | Include strokes in layout (strokesIncludedInLayout, LAY-6). | ||
--clip |
boolean | Clip content (clipsContent). | ||
--keepOrder |
boolean | When auto layout is turned on, keep the children’s order instead of sorting them by position (the Plugin API’s layoutMode). |
ud layout.set --node "Login/Form" --mode vertical --gap 16 --padding 24
ud layout.set --node "Toolbar" --mode row --gap auto --align center --padding '[8, 12]'layout.remove#
Remove Auto Layout. Turn auto layout off; the children keep their current positions and sizes as stored values.
Since 0.3 · mutates · licence paid · selection
Removes auto layout (Shift+Alt+A in Figma): layoutMode becomes NONE and every flow child gets its derived x, y, width and height written as stored values, so nothing moves. Fill sizings become fixed; a hug frame keeps its current size as a fixed size.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text |
ud layout.remove --node "Login/Form"layout.add#
Add Auto Layout. Shift+A: give a frame auto layout inferred from its children, or wrap nodes in a new auto layout frame.
Since 0.3 · mutates · licence paid · selection
Add auto layout (LAY-7). One frame without auto layout: auto layout is turned on with the direction, gap, padding and alignment inferred from its children’s positions (direction = the axis with the larger spread; gap = the median spacing; padding = the offsets of the content bounds), and the frame hugs its content. Anything else (several nodes, a frame that already has auto layout, a shape): the nodes, which must share a parent, are wrapped in a new auto layout frame that hugs them, placed where they were. The result names the frame and what was chosen.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--name |
string | Name of a new wrapping frame. |
ud layout.add --node "Login/Form"
ud layout.add --nodes '["nd-7b9d1f3a5c4e","nd-8c0e2a4b6d5f"]' --name Fieldslayout.setSizing#
Set Sizing. Set fixed, hug or fill per axis and the min/max width and height of nodes.
Since 0.3 · mutates · licence paid · selection
Sizing (LAY-3): –horizontal / –vertical FIXED | HUG | FILL. HUG applies to auto layout frames and texts (a text’s hug width is auto width, its hug height auto height); FILL to children in auto layout flow. Setting FILL on an axis where the parent hugs makes the parent fixed on that axis (an extra change in the same undo step, as Figma does). FIXED keeps the current derived size. –minWidth, –maxWidth, –minHeight, –maxHeight clamp every mode; null removes a limit.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--horizontal |
“FIXED” | “HUG” | “FILL” | |||
--vertical |
“FIXED” | “HUG” | “FILL” | |||
--minWidth |
number or null | |||
--maxWidth |
number or null | |||
--minHeight |
number or null | |||
--maxHeight |
number or null |
ud layout.setSizing --node "Card/Title" --horizontal FILL
ud layout.setSizing --node "Card" --vertical HUG --minHeight 120layout.setPositioning#
Set Absolute Position. Take children of auto layout frames out of flow (absolute, placed by constraints) or put them back.
Since 0.3 · mutates · licence paid · selection
LAY-5: ABSOLUTE keeps the child in its auto layout frame at its current place (its derived x, y and size are written as stored values) and lays it out by its constraints; AUTO returns it to the flow (its stored x/y are dropped). A fill sizing becomes fixed when the child leaves the flow.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--positioning |
“AUTO” | “ABSOLUTE” | yes |
ud layout.setPositioning --node "Card/Badge" --positioning ABSOLUTE
ud layout.setPositioning --node "Card/Badge" --positioning AUTOconstraints.set#
Set Constraints. Set how children follow their frame when it is resized: left, right, left and right, centre or scale per axis.
Since 0.3 · mutates · licence paid · selection
Constraints (LAY-1). –horizontal MIN | MAX | STRETCH | CENTER | SCALE (or left, right, left-right, center, scale); –vertical MIN | MAX | STRETCH | CENTER | SCALE (or top, bottom, top-bottom, center, scale). Resizing the frame (node.resize without –ignoreConstraints) moves and resizes the children accordingly; absolute children of auto layout frames follow their frame’s derived size.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--horizontal |
“MIN” | “MAX” | “STRETCH” | “CENTER” | “SCALE” | “left” | “right” | “left-right” | … | |||
--vertical |
“MIN” | “MAX” | “STRETCH” | “CENTER” | “SCALE” | “top” | “bottom” | “top-bottom” | … |
ud constraints.set --node "Card/Close" --horizontal right --vertical top
ud constraints.set --query 'frame[name="Hero"] > *' --horizontal STRETCHgrid.set#
Set Grid Layout. Make frames grid auto layouts and set their rows, columns, gaps and track sizes.
Since 0.3 · mutates · licence paid · selection
Grid auto layout (LAY-4). Turns layoutMode to GRID when it is not (children keep their visual order and are auto-placed row by row) and sets –rows, –columns (gridRowCount, gridColumnCount), –rowGap, –columnGap and the track sizes –rowSizes / –columnSizes: [{type: FIXED (px) | FLEX (fr) | HUG, value}], one per track (missing tracks are FLEX 1).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--rows |
integer | ≥ 1 | ||
--columns |
integer | ≥ 1 | ||
--rowGap |
number | ≥ 0 | ||
--columnGap |
number | ≥ 0 | ||
--rowSizes |
object[] | |||
--columnSizes |
object[] |
ud grid.set --node "Gallery" --rows 2 --columns 3 --rowGap 12 --columnGap 12
ud grid.set --node "Gallery" --columnSizes '[{"type":"FIXED","value":200},{"type":"FLEX","value":1},{"type":"HUG"}]'grid.place#
Place in Grid. Place children of grid auto layouts in a row and column, with spans and alignment in the cell.
Since 0.3 · mutates · licence paid · selection
LAY-4: –row and –column (0-based; null returns the child to auto-placement), –rowSpan, –columnSpan, and the alignment in the cell –horizontalAlign / –verticalAlign AUTO | MIN | CENTER | MAX. A child that fills an axis stretches to its cell.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--row |
integer or null | |||
--column |
integer or null | |||
--rowSpan |
integer | ≥ 1 | ||
--columnSpan |
integer | ≥ 1 | ||
--horizontalAlign |
“AUTO” | “MIN” | “CENTER” | “MAX” | |||
--verticalAlign |
“AUTO” | “MIN” | “CENTER” | “MAX” |
ud grid.place --node "Gallery/Hero" --row 0 --column 0 --columnSpan 2
ud grid.place --node "Gallery/Caption" --row null --column nulllayout.addGrid#
Add Layout Grid. Add a column, row or uniform layout guide grid to frames (a preset or explicit values).
Since 0.3 · mutates · licence paid · selection
Layout guides (LAY-8): appends to layoutGrids. –grid {pattern: COLUMNS | ROWS | GRID, alignment, count, gutterSize, offset (margin), sectionSize, visible, color} with Figma’s defaults for missing members, or –preset 12-columns | 8-rows | 8-grid. Guides are drawn by the editor only; they never render.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--grid |
object | |||
--preset |
“12-columns” | “8-rows” | “8-grid” |
ud layout.addGrid --node "Screens/Login" --preset 12-columns
ud layout.addGrid --node "Screens/Login" --grid '{"pattern":"ROWS","count":4,"gutterSize":16}'layout.setGrid#
Edit Layout Grid. Change members of one layout grid of frames (by index, bottom first).
Since 0.3 · mutates · licence paid · selection
LAY-8: merges –set into layoutGrids[–index]; changing the pattern fills the new pattern’s defaults.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--index |
integer | yes | ≥ 0 | |
--set |
object | yes |
ud layout.setGrid --node "Screens/Login" --index 0 --set '{"count":8,"gutterSize":16}'layout.removeGrid#
Remove Layout Grid. Remove one layout grid of frames by index.
Since 0.3 · mutates · licence paid · selection
LAY-8: removes layoutGrids[–index].
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--index |
integer | yes | ≥ 0 |
ud layout.removeGrid --node "Screens/Login" --index 0layout.suggest#
Suggest Auto Layout. What layout.add would choose (direction, gap, padding, alignment) and which children would move, without applying it.
Since 0.7 · read-only · licence read · selection
LAY-7, ai-agents §8 “Suggest auto layout”. One frame without auto layout: the inference over its children; several sibling nodes: the frame that would wrap them. Returns {frame?, wrap, mode, gap, padding, align, order, moves: [{id, name, dx, dy}], confidence, summary}: moves lists the children whose position would change by more than half a pixel. Nothing is changed; layout.add applies the same inference. ud_run layout.suggest {“node”: “nd-7b9d1f3a5c4e”}
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text |
ud layout.suggest --node "Login/Form"Appearance#
| Command | Summary |
|---|---|
fill.set |
Replace the fills of nodes with a paint list or one solid colour. |
fill.add |
Add a paint on top of the existing fills. |
fill.remove |
Remove one fill of a node by its position (0 is the bottom-most). |
stroke.set |
Set the stroke paints, weight, alignment, caps, joins, dashes and per-side weights of nodes. |
appearance.set |
Set opacity, blend mode, corner radii, corner smoothing, clipping or visibility of nodes. |
fill.setGradient |
Make a fill or stroke a gradient, or change its type, stops or geometry. |
gradient.setStop |
Change the colour, opacity or position of one gradient stop. |
gradient.addStop |
Add a stop to a gradient; its colour defaults to the gradient’s colour at that position. |
gradient.removeStop |
Remove a stop from a gradient (two stops always remain). |
image.replace |
Swap the image of an image fill, keeping its scale mode, crop and adjustments. |
image.setFilters |
Set exposure, contrast, saturation, temperature, tint, highlights and shadows of an image fill. |
image.setScaleMode |
Set how an image fills its node: fill, fit, crop (with a crop rectangle) or tile (with a scale), and its rotation. |
effect.add |
Add a drop shadow, inner shadow, layer or background blur (normal or progressive), noise or texture on top of a node’s effects. |
effect.set |
Change the members of one effect (type, colour, offset, blur, spread, progressive blur, noise, texture, visibility, blend mode). |
effect.remove |
Remove one effect from nodes. |
effect.reorder |
Move one effect to another place in the order effects apply. |
mask.set |
Make nodes masks of the siblings above them, or stop them masking. |
style.create |
Add a paint, text, effect or layout-grid style, from values or from a node (–from). |
style.update |
Rename a style or change its values; every node that uses it changes at once. |
style.delete |
Remove a style; nodes that used it keep the values they show. |
style.apply |
Apply a style to nodes: the reference and its current values (fill, stroke, effect, text or grid). |
style.detach |
Drop a style reference from nodes and keep its current values as plain values. |
style.list |
Local and library styles by type and name, with a value summary and the number of users. |
style.usedBy |
The nodes that use a style (any slot, styled runs included). |
fill.set#
Set Fill. Replace the fills of nodes with a paint list or one solid colour.
Since 0.1 · mutates · licence paid · selection
Sets the fills (FMT-001 §4.7, bottom first). –color makes one solid paint; –paints takes a JSON list of solid, gradient (GRADIENT_LINEAR, _RADIAL, _ANGULAR, _DIAMOND with gradientStops and gradientTransform) and image paints (IMAGE with the imageHash of an asset; image.insert adds the file).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--paints |
paint[] | |||
--color |
string or object | A colour: #rrggbb, #rrggbbaa, or {r, g, b} with channels in 0–1. | ||
--opacity |
number | Opacity of the paint(s), 0–1. ≥ 0, ≤ 1 |
ud fill.set --node "Screens/Login/Button" --color "#4F46E5"
ud fill.set --query 'rectangle[name^="Card"]' --paints '[{"type":"SOLID","color":{"r":1,"g":1,"b":1}}]'fill.add#
Add Fill. Add a paint on top of the existing fills.
Since 0.1 · mutates · licence paid · selection
Appends one paint (–paint JSON or –color) to each node’s fills; the new paint is the top-most.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--paint |
paint | |||
--color |
string or object | A colour: #rrggbb, #rrggbbaa, or {r, g, b} with channels in 0–1. | ||
--opacity |
number | Opacity of the paint(s), 0–1. ≥ 0, ≤ 1 |
ud fill.add --node nd-9d1f3b5c7e6a --color "#00000080"fill.remove#
Remove Fill. Remove one fill of a node by its position (0 is the bottom-most).
Since 0.1 · mutates · licence paid · selection
Removes the paint at –index from the node’s fills.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--index |
integer | yes | Position in the fills list, 0 first (bottom). ≥ 0 |
ud fill.remove --node "Screens/Login" --index 0stroke.set#
Set Stroke. Set the stroke paints, weight, alignment, caps, joins, dashes and per-side weights of nodes.
Since 0.1 · mutates · licence paid · selection
Sets any of the stroke paints (–paints or –color; solid, gradient or image, as fill.set), the weight in pixels, the alignment, the caps and joins of open paths, the dash pattern (dash and gap lengths; [] is solid), the miter limit, and per-side weights of frames and rectangles (STY-5).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--paints |
paint[] | |||
--color |
string or object | A colour: #rrggbb, #rrggbbaa, or {r, g, b} with channels in 0–1. | ||
--opacity |
number | Opacity of the paint(s), 0–1. ≥ 0, ≤ 1 | ||
--weight |
number | Stroke weight in pixels. ≥ 0 | ||
--align |
“INSIDE” | “CENTER” | “OUTSIDE” | Where the stroke sits on the outline. | ||
--cap |
“NONE” | “ROUND” | “SQUARE” | “ARROW_LINES” | “ARROW_EQUILATERAL” | “TRIANGLE_FILLED” | “CIRCLE_FILLED” | “DIAMOND_FILLED” | |||
--join |
“MITER” | “BEVEL” | “ROUND” | |||
--dash |
number[] | Dash and gap lengths in pixels; [] is solid. | ||
--miterLimit |
number | ≥ 1 | ||
--weights |
object | Per-side weights of frames and rectangles. |
ud stroke.set --node "Screens/Login/Form/Email" --color "#D1D5DB" --weight 1 --align INSIDE
ud stroke.set --node nd-1c3e5a7b9d0f --cap ROUND --join ROUND --dash '[4,2]'
ud stroke.set --node "Screens/Login/Card" --weights '{"bottom":2}'appearance.set#
Set Appearance. Set opacity, blend mode, corner radii, corner smoothing, clipping or visibility of nodes.
Since 0.1 · mutates · licence paid · selection
The Appearance section of the design panel: layer opacity, blend mode, corner radius (all corners, or each one, DRW-3), corner smoothing (0–1, 0.6 is iOS style), “clip content” of frames and visibility. Setting –cornerRadius clears the per-corner radii; a per-corner radius is written only when it differs.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--opacity |
number | Layer opacity, 0–1. ≥ 0, ≤ 1 | ||
--blendMode |
“PASS_THROUGH” | “NORMAL” | “DARKEN” | “MULTIPLY” | “LINEAR_BURN” | “COLOR_BURN” | “LIGHTEN” | “SCREEN” | … | |||
--cornerRadius |
number | ≥ 0 | ||
--topLeftRadius |
number | ≥ 0 | ||
--topRightRadius |
number | ≥ 0 | ||
--bottomRightRadius |
number | ≥ 0 | ||
--bottomLeftRadius |
number | ≥ 0 | ||
--cornerSmoothing |
number | ≥ 0, ≤ 1 | ||
--clipsContent |
boolean | |||
--visible |
boolean |
ud appearance.set --node "Screens/Login/Button" --opacity 0.9 --cornerRadius 8
ud appearance.set --node "Screens/Login/Card" --topLeftRadius 16 --topRightRadius 16 --cornerSmoothing 0.6fill.setGradient#
Set Gradient. Make a fill or stroke a gradient, or change its type, stops or geometry.
Since 0.2 · mutates · licence paid · selection
Gradients (STY-1, STY-2): the paint at –index (default 0, bottom) of the fills (or –target strokes) becomes a linear, radial, angular or diamond gradient. A solid paint turns into a gradient from its colour to the same colour transparent. –stops replaces the stops; the geometry is –transform (Figma’s 2×3 gradientTransform), –angle (degrees, 0 = to top, linear only) or –handles in the node’s unit square, as the canvas handles drag them.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--index |
integer | 0 |
Index of the paint in the list (0 = bottom). ≥ 0 | |
--target |
“fills” | “strokes” | "fills" |
Which paint list: fills or strokes. | |
--type |
“GRADIENT_LINEAR” | “GRADIENT_RADIAL” | “GRADIENT_ANGULAR” | “GRADIENT_DIAMOND” | |||
--stops |
object[] | |||
--transform |
number[][] | A 2×3 matrix [[a, b, c], [d, e, f]] in the node’s unit square. | ||
--angle |
number | Linear gradients: degrees, 0 = to top, 90 = to the right. | ||
--handles |
object | Gradient handles in the node’s unit square: start and end of the line (centre and edge for radial), and the width handle. |
ud fill.setGradient --node "Screens/Login/Button" --type GRADIENT_LINEAR --angle 90
ud fill.setGradient --node nd-9d1f3b5c7e6a --stops '[{"position":0,"color":{"r":1,"g":0,"b":0,"a":1}},{"position":1,"color":{"r":0,"g":0,"b":1,"a":1}}]'
ud fill.setGradient --node nd-9d1f3b5c7e6a --handles '{"start":{"x":0.5,"y":0},"end":{"x":0.5,"y":1}}'gradient.setStop#
Edit Gradient Stop. Change the colour, opacity or position of one gradient stop.
Since 0.2 · mutates · licence paid · selection
What dragging a stop on the canvas or editing it in the picker does (STY-2). Stops stay sorted by position; the result gives the stop’s index after sorting.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--index |
integer | 0 |
Index of the paint in the list (0 = bottom). ≥ 0 | |
--target |
“fills” | “strokes” | "fills" |
Which paint list: fills or strokes. | |
--stop |
integer | yes | Index of the stop, in position order. ≥ 0 | |
--color |
object | |||
--position |
number | ≥ 0, ≤ 1 |
ud gradient.setStop --node nd-9d1f3b5c7e6a --stop 1 --position 0.8 --color '{"r":0,"g":0,"b":1,"a":0.5}'gradient.addStop#
Add Gradient Stop. Add a stop to a gradient; its colour defaults to the gradient’s colour at that position.
Since 0.2 · mutates · licence paid · selection
Clicking the gradient line on the canvas adds a stop there (STY-2). Without –color the stop takes the colour the gradient already has at –position, so the gradient looks the same until the stop is edited.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--index |
integer | 0 |
Index of the paint in the list (0 = bottom). ≥ 0 | |
--target |
“fills” | “strokes” | "fills" |
Which paint list: fills or strokes. | |
--position |
number | yes | ≥ 0, ≤ 1 | |
--color |
object |
ud gradient.addStop --node nd-9d1f3b5c7e6a --position 0.5gradient.removeStop#
Remove Gradient Stop. Remove a stop from a gradient (two stops always remain).
Since 0.2 · mutates · licence paid · selection
Deleting a selected stop on the canvas (STY-2). A gradient keeps at least two stops.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--index |
integer | 0 |
Index of the paint in the list (0 = bottom). ≥ 0 | |
--target |
“fills” | “strokes” | "fills" |
Which paint list: fills or strokes. | |
--stop |
integer | yes | Index of the stop, in position order. ≥ 0 |
ud gradient.removeStop --node nd-9d1f3b5c7e6a --stop 1image.replace#
Replace Image. Swap the image of an image fill, keeping its scale mode, crop and adjustments.
Since 0.2 · mutates · licence paid · selection
“Replace image” in the Fill section: the image paint at –index (default: the first image fill) takes the new image; scale mode, crop, rotation and filters stay. The new file is stored and registered as image.insert does.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--index |
integer | ≥ 0 | ||
--bytes |
string | The image file, base64 or a data: URL (PNG, JPEG, WebP, GIF, AVIF; 10 MB at most). | ||
--asset |
string | An image already in the document’s assets folder. pattern ^sha256-[0-9a-f]{64}$ |
||
--mime |
“image/png” | “image/jpeg” | “image/jpg” | “image/webp” | “image/gif” | “image/avif” | Checked against the bytes. | ||
--name |
string |
ud image.replace --node "Screens/Login/Logo" --bytes "$(base64 -w0 logo-v2.png)"image.setFilters#
Adjust Image. Set exposure, contrast, saturation, temperature, tint, highlights and shadows of an image fill.
Since 0.2 · mutates · licence paid · selection
Image adjustments (STY-3), each from -1 to 1 (0 is unchanged); the given filters merge into the paint’s, and null resets one. –index picks the image fill (default: the first).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--index |
integer | ≥ 0 | ||
--filters |
object | yes |
ud image.setFilters --node "Screens/Login/Logo" --filters '{"exposure":0.2,"contrast":0.1}'image.setScaleMode#
Set Image Scale Mode. Set how an image fills its node: fill, fit, crop (with a crop rectangle) or tile (with a scale), and its rotation.
Since 0.2 · mutates · licence paid · selection
STY-3: FILL covers the node, FIT shows the whole image, CROP uses –imageTransform (the crop rectangle as a 2×3 matrix), TILE repeats it at –scalingFactor. –rotation turns the image by 90° steps. –index picks the image fill (default: the first).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--index |
integer | ≥ 0 | ||
--scaleMode |
“FILL” | “FIT” | “CROP” | “TILE” | |||
--scalingFactor |
number | |||
--imageTransform |
number[][] | A 2×3 matrix [[a, b, c], [d, e, f]] in the node’s unit square. | ||
--rotation |
0 | 90 | 180 | 270 |
ud image.setScaleMode --node "Screens/Login/Logo" --scaleMode FIT
ud image.setScaleMode --node nd-5f7b9d1e3a2c --scaleMode TILE --scalingFactor 0.5effect.add#
Add Effect. Add a drop shadow, inner shadow, layer or background blur (normal or progressive), noise or texture on top of a node’s effects.
Since 0.2 · mutates · licence paid · selection
Effects (STY-6) apply in list order. –type adds the default effect of that type (a 4 px drop shadow of black at 25 %, as the “+” of the Effects section); –effect gives the whole effect, Figma’s shape (FMT-001 §4.7.5); both together start from the default and override it. A member the type does not take is refused. STY-9: a blur with “blurType”:“PROGRESSIVE” goes from startRadius at startOffset to radius at endOffset ({x, y} in 0–1 of the node’s box; defaults 0, (0, 0) and (0, 1)). NOISE: noiseSize 1–10 px per grain, density 0–1, noiseType MONOTONE (color), DUOTONE (color on secondaryColor) or MULTITONE (hues around color), opacity, blendMode. TEXTURE: noiseSize, radius 0–20 px of displacement, clipToShape.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--type |
“DROP_SHADOW” | “INNER_SHADOW” | “LAYER_BLUR” | “BACKGROUND_BLUR” | “NOISE” | “TEXTURE” | |||
--effect |
object |
ud effect.add --node "Screens/Login/Button" --type DROP_SHADOW
ud effect.add --node nd-9d1f3b5c7e6a --effect '{"type":"DROP_SHADOW","color":{"r":0,"g":0,"b":0,"a":0.2},"offset":{"x":0,"y":8},"radius":24,"spread":-4}'
ud effect.add --node "Screens/Login/Header" --effect '{"type":"LAYER_BLUR","blurType":"PROGRESSIVE","radius":16,"startOffset":{"x":0.5,"y":0},"endOffset":{"x":0.5,"y":1}}'
ud effect.add --node "Screens/Login/Card" --effect '{"type":"NOISE","noiseSize":2,"density":0.4,"noiseType":"MONOTONE","color":{"r":0,"g":0,"b":0,"a":0.3}}'effect.set#
Edit Effect. Change the members of one effect (type, colour, offset, blur, spread, progressive blur, noise, texture, visibility, blend mode).
Since 0.2 · mutates · licence paid · selection
Merges –set into the effect at –index (0 = first applied); colour and offset are replaced whole. Changing the type between shadows keeps the values; to another kind, the members the new type does not take are dropped and its defaults filled. “blurType”:“PROGRESSIVE” fills startRadius, startOffset and endOffset; back to NORMAL drops them.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--index |
integer | yes | ≥ 0 | |
--set |
object | yes |
ud effect.set --node "Screens/Login/Button" --index 0 --set '{"radius":12,"offset":{"x":0,"y":6}}'
ud effect.set --node nd-9d1f3b5c7e6a --index 1 --set '{"visible":false}'
ud effect.set --node nd-9d1f3b5c7e6a --index 0 --set '{"blurType":"PROGRESSIVE","startRadius":0,"radius":24}'effect.remove#
Remove Effect. Remove one effect from nodes.
Since 0.2 · mutates · licence paid · selection
Removes the effect at –index (0 = first applied).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--index |
integer | yes | ≥ 0 |
ud effect.remove --node "Screens/Login/Button" --index 0effect.reorder#
Reorder Effects. Move one effect to another place in the order effects apply.
Since 0.2 · mutates · licence paid · selection
Moves the effect at –from to –to (indexes in the list, 0 = first applied), as dragging in the Effects section.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--from |
integer | yes | ≥ 0 | |
--to |
integer | yes | ≥ 0 |
ud effect.reorder --node "Screens/Login/Button" --from 1 --to 0mask.set#
Use as Mask. Make nodes masks of the siblings above them, or stop them masking.
Since 0.2 · mutates · licence paid · selection
DRW-8 (FMT-001 §4.4.4): a mask clips the siblings above it, up to the end of its parent. –maskType is ALPHA (the mask’s opacity), VECTOR (its outline) or LUMINANCE (its brightness).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--isMask |
boolean | yes | ||
--maskType |
“ALPHA” | “VECTOR” | “LUMINANCE” |
ud mask.set --node "Screens/Login/Avatar" --isMask true --maskType VECTOR
ud mask.set --node nd-5f7b9d1e3a2c --isMask falsestyle.create#
Create Style. Add a paint, text, effect or layout-grid style, from values or from a node (–from).
Since 0.4 · mutates · licence paid
Creates a style (VAR-1, FMT-001 §4.9). Names group by “/”: Brand/Primary, Heading/H1. Values come from –paints (or –color), –text, –effects or –layoutGrids, or from a node with –from (its fills, or strokes with –slot stroke; its text properties and their variable bindings; its effects; its layout grids). –apply also applies the new style to –from. Paints keep their own variable bindings (boundVariables inside the paint), so a style can be bound to variables.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--type |
“PAINT” | “TEXT” | “EFFECT” | “GRID” | yes | ||
--name |
string | yes | ||
--description |
string | |||
--from |
string | Take the values from this node. | ||
--slot |
“fill” | “stroke” | “effect” | “text” | “grid” | Which reference: fill (fillStyleId), stroke, effect, text or grid (default: from the style’s type). | ||
--apply |
boolean | Apply the new style to –from. | ||
--paints |
paint[] | |||
--color |
string or object | One solid paint: #RRGGBB[AA] or {r,g,b}. | ||
--text |
object | Text properties of a TEXT style (FMT-001 §4.6.6): fontName, fontSize, lineHeight, letterSpacing, … | ||
--effects |
object[] | |||
--layoutGrids |
object[] |
ud style.create --type PAINT --name Brand/Primary --color '#4F46E5'
ud style.create --type TEXT --name Heading/H1 --text '{"fontName": {"family": "Inter", "style": "Bold"}, "fontSize": 32, "lineHeight": {"unit": "PIXELS", "value": 40}}'
ud style.create --type EFFECT --name Elevation/1 --from "Components/Card" --applystyle.update#
Update Style. Rename a style or change its values; every node that uses it changes at once.
Since 0.4 · mutates · licence paid
Edits a style in place (VAR-1, op style.update): –set takes name, description, hiddenFromPublishing and the values (paints or color, text, effects, layoutGrids). A style change updates every user, because the style wins when it resolves.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--style |
string | yes | A style id (st-…, lib-…/st-… for a library’s) or name (Brand/Primary). | |
--set |
object | yes |
ud style.update --style Brand/Primary --set '{"color": "#4338CA"}'
ud style.update --style Heading/H1 --set '{"text": {"fontSize": 36}}'style.delete#
Delete Style. Remove a style; nodes that used it keep the values they show.
Since 0.4 · mutates · licence paid
Removes a style (op style.delete). Its users are detached first, as style.detach does: each keeps the values it shows now as plain values and drops the reference, so nothing changes on the canvas.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--style |
string | yes | A style id (st-…, lib-…/st-… for a library’s) or name (Brand/Primary). |
ud style.delete --style Brand/Oldstyle.apply#
Apply Style. Apply a style to nodes: the reference and its current values (fill, stroke, effect, text or grid).
Since 0.4 · mutates · licence paid · selection
Sets fillStyleId (or strokeStyleId, effectStyleId, textStyleId, gridStyleId) and writes the style’s values as the plain fallback (FMT-001 §4.4.5). –slot stroke applies a paint style to strokes. Library styles are named by their qualified id (lib-…/st-…) once imported (library.import).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--style |
string | yes | A style id (st-…, lib-…/st-… for a library’s) or name (Brand/Primary). | |
--slot |
“fill” | “stroke” | “effect” | “text” | “grid” | Which reference: fill (fillStyleId), stroke, effect, text or grid (default: from the style’s type). |
ud style.apply --node "Screens/Login/Button" --style Brand/Primary
ud style.apply --query 'text[name^="Title"]' --style Heading/H1
ud style.apply --node "Screens/Login/Card" --style Border/Subtle --slot strokestyle.detach#
Detach Style. Drop a style reference from nodes and keep its current values as plain values.
Since 0.4 · mutates · licence paid · selection
Removes fillStyleId (or the –slot’s reference; default every slot) and writes the values the node shows now, so it looks the same without the style.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--slot |
“fill” | “stroke” | “effect” | “text” | “grid” | “all” |
ud style.detach --node "Screens/Login/Button" --slot fillstyle.list#
List Styles. Local and library styles by type and name, with a value summary and the number of users.
Since 0.4 · read-only · licence read
Lists styles (VAR-1): local ones and those imported from libraries (qualified ids lib-…/st-…).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--type |
“PAINT” | “TEXT” | “EFFECT” | “GRID” |
ud style.list --json
ud style.list --type TEXTstyle.usedBy#
Style Users. The nodes that use a style (any slot, styled runs included).
Since 0.4 · read-only · licence read
Lists the nodes whose fillStyleId, strokeStyleId, effectStyleId, textStyleId or gridStyleId (or a styled run’s) names the style. get_variable_defs is built on it.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--style |
string | yes | A style id (st-…, lib-…/st-… for a library’s) or name (Brand/Primary). |
ud style.usedBy --style Heading/H1 --jsonAssets#
| Command | Summary |
|---|---|
image.insert |
Add an image: a new rectangle with an image fill, or the image as the fill of an existing node. |
image.insert#
Place Image. Add an image: a new rectangle with an image fill, or the image as the fill of an existing node.
Since 0.2 · mutates · licence paid
An image is a rectangle with an image fill (FMT-001 §4.6.1). The bytes are stored in
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--parent |
string | Where the new rectangle goes (default: the first page). | ||
--node |
string | Put the image in this node’s fills instead of creating a rectangle. | ||
--after |
string | Place the new rectangle just above this sibling. | ||
--bytes |
string | The image file, base64 or a data: URL (PNG, JPEG, WebP, GIF, AVIF; 10 MB at most). | ||
--asset |
string | An image already in the document’s assets folder. pattern ^sha256-[0-9a-f]{64}$ |
||
--mime |
“image/png” | “image/jpeg” | “image/jpg” | “image/webp” | “image/gif” | “image/avif” | Checked against the bytes. | ||
--name |
string | Layer name (the file name); also kept in the asset metadata. | ||
--x |
number | |||
--y |
number | |||
--width |
number | |||
--height |
number | |||
--scaleMode |
“FILL” | “FIT” | “CROP” | “TILE” | "FILL" |
ud image.insert --parent "Screens/Login" --bytes "$(base64 -w0 logo.png)" --name logo.png --x 159 --y 72
ud image.insert --node "Screens/Login/Avatar" --asset sha256-9c2f0e6b1a7d3c5e8f4b2a1d0c9e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e --scaleMode FILLSelection#
| Command | Summary |
|---|---|
selection.get |
The ids of the selected nodes of the live editor (empty headless). |
selection.set |
Select nodes in the live editor, so an agent can point at what it is talking about. |
selection.matching |
The layers with the same fill, stroke, effect, font, type or properties as a node; a live editor selects them. |
selection.get#
Get Selection. The ids of the selected nodes of the live editor (empty headless).
Since 0.1 · read-only · licence read
Prints the editor’s selection. Headless, or with nothing selected, the list is empty.
Takes no parameters.
ud selection.get --jsonselection.set#
Select. Select nodes in the live editor, so an agent can point at what it is talking about.
Since 0.1 · read-only · licence read · selection · aliases select
Resolves the targets and asks the host to select them. The result lists the ids; headless nothing else happens.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text |
ud selection.set --query 'frame[name="Login"] > *'
ud select --node "Screens/Login/Button"selection.matching#
Select Matching Layers. The layers with the same fill, stroke, effect, font, type or properties as a node; a live editor selects them.
Since 0.3 · read-only · licence read · selection
DOC-10 “Select all with same …”. The reference is –node, else the first selected node. –by fill, stroke (paints and weight), effect, font (text nodes using one of its fonts), type, or properties (fills, strokes, effects, corner radius, opacity); instance arrives with components in 0.4. –scope page (default: the reference’s page), parent (its siblings) or selection (inside the selected nodes: “select all layers of the same type inside a selection”). The result lists the ids in document order, the reference included; the editor applies them as its selection, like selection.set; headless nothing else happens.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | The reference node (default: the first selected node). | ||
--by |
“fill” | “stroke” | “effect” | “font” | “instance” | “type” | “properties” | yes | ||
--scope |
“page” | “parent” | “selection” | "page" |
ud selection.matching --node "Screens/Login/Primary" --by fill
ud selection.matching --by type --scope selectionView#
| Command | Summary |
|---|---|
view.zoomTo |
Scroll and zoom the live editor to the given nodes (a no-op headless). |
view.zoomTo#
Zoom to Selection. Scroll and zoom the live editor to the given nodes (a no-op headless).
Since 0.1 · read-only · licence read · editor UI only
Pointer feedback only (CMD-20): the host zooms its viewport to the nodes; the document never changes.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text |
ud view.zoomTo --node "Screens/Login"Export#
| Command | Summary |
|---|---|
export.addSetting |
Add an export setting (format, scale or size, suffix) to nodes. |
export.setSetting |
Change one export setting of nodes. |
export.removeSetting |
Remove one export setting from nodes. |
export.render |
Plan the export of nodes to PNG, JPG, WebP, SVG or PDF files: one job per export setting. |
copy.as |
Copy nodes as UDX, CSS, SVG or PNG: text for UDX and CSS, a render plan for SVG and PNG. |
udx.export |
Write nodes (or a page’s top-level nodes) as UDX markup. |
codegen.snippet |
Code for a node: CSS, HTML + CSS, React (inline, CSS modules, Tailwind), custom element, SwiftUI or Compose. |
codegen.generate |
Write the code of a frame or component into a folder, touching only the generated regions. |
codegen.inspect |
What a developer needs of a node: CSS, Tailwind, iOS/Android/Flutter values, tokens, styles, assets, component. |
export.addSetting#
Add Export Setting. Add an export setting (format, scale or size, suffix) to nodes.
Since 0.2 · mutates · licence free · selection
EXP-1: a node can carry several export settings (FMT-001 §4.4.6, Figma’s shape); “Export” renders them all. Format PNG, JPG, WEBP, SVG or PDF; constraint SCALE (0.01–4) or a fixed WIDTH or HEIGHT; suffix added to the file name; SVG options outline text, id attributes, simplify stroke (EXP-2).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--setting |
object | yes |
ud export.addSetting --node "Screens/Login" --setting '{"format":"PNG","suffix":"@2x","constraint":{"type":"SCALE","value":2}}'
ud export.addSetting --node "Screens/Login/Logo" --setting '{"format":"SVG","svgOutlineText":true}'export.setSetting#
Edit Export Setting. Change one export setting of nodes.
Since 0.2 · mutates · licence free · selection
Merges –set into the export setting at –index (0 = first); the constraint is replaced whole.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--index |
integer | yes | ≥ 0 | |
--set |
object | yes |
ud export.setSetting --node "Screens/Login" --index 0 --set '{"constraint":{"type":"WIDTH","value":1080},"suffix":"-1080w"}'export.removeSetting#
Remove Export Setting. Remove one export setting from nodes.
Since 0.2 · mutates · licence free · selection
Removes the export setting at –index (0 = first).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--index |
integer | yes | ≥ 0 |
ud export.removeSetting --node "Screens/Login" --index 1export.render#
Export. Plan the export of nodes to PNG, JPG, WebP, SVG or PDF files: one job per export setting.
Since 0.2 · read-only · licence read · writes files · editor host only
EXP-1, CMD-32. This command validates and returns a plan, {jobs: [{nodeId, name, format, scale, constraint, suffix, fileName, path?, contentsOnly, useAbsoluteBounds, svg?}]}; the host or ud then renders each job with the render layer (SvgWriter, resvg for raster, PdfWriter) and writes the files. Without –format each node’s export settings are used (a node without settings exports PNG at 1×); –format and –scale export once in that format. –page without nodes exports every top-level node of the page that has export settings (batch export). PDF (EXP-1, EXP-3): one page per node at 1 pt = 1 px (the scale does not apply), vector text with embedded subset fonts (–outline-text draws outlines), shadows and blurs as images; –format pdf –page without nodes plans one multi-page PDF of the page’s top-level frames in reading order (–order position, top-left to bottom-right) or along its prototype flows (–order flow), in job.pdf.pages.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--page |
string | A page (id or name): with no nodes, its top-level nodes that have export settings. | ||
--format |
“PNG” | “JPG” | “WEBP” | “SVG” | “PDF” | “png” | “jpg” | “webp” | … | |||
--scale |
number | ≥ 0.01, ≤ 4 | ||
--out |
string | Folder for the files (relative to the design file). | ||
--useSettings |
boolean | true |
Use the nodes’ export settings when –format is not given. | |
--order |
“position” | “flow” | PDF of a page: frames in reading order (position, default) or along the prototype flows (flow). | ||
--outlineText |
boolean | PDF: draw text as outlines instead of embedding subset fonts. |
ud export.render --node "Screens/Login" --format png --scale 2 --out exports
ud export.render --page Screens --out exports
ud export --page Screens --format pdf --order flow --out screens.pdfcopy.as#
Copy As. Copy nodes as UDX, CSS, SVG or PNG: text for UDX and CSS, a render plan for SVG and PNG.
Since 0.2 · read-only · licence read · selection
EXP-7 and CAN-7. udx and css return the text ({format, mimeType, text}); the host puts it on the clipboard. svg and png return a plan ({format, mimeType, jobs}) that the host renders with the render layer and copies (the same jobs as export.render, without files). Pasting UDX back is udx.insert.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--format |
“svg” | “png” | “css” | “udx” | yes | ||
--scale |
number | ≥ 0.01, ≤ 4 |
ud copy.as --node "Screens/Login/Button" --format css
ud copy.as --node "Screens/Login" --format udxudx.export#
Export UDX. Write nodes (or a page’s top-level nodes) as UDX markup.
Since 0.2 · read-only · licence read
UDX (CLI-001 §7) is the HTML-like text form of nodes: elements frame, group, section, rect (rectangle), ellipse, line, polygon, star, vector (d), text, image (src), boolean; shorthands x, y, w, h, fill, stroke, stroke-w, radius, opacity, blend, shadow, blur, layout, gap, pad, align, font, weight, size, lh, ls, style="@Text/Style"; any other stored property as a kebab-case attribute (JSON for structured values); runs and
inside text. Run ud help udx for the grammar. Every stored property is written, so udx.insert of the text gives the same nodes (CMD-34). –ids writes id attributes, which udx.replace uses to keep nodes.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--page |
string | With no nodes: every top-level node of this page. | ||
--ids |
boolean | false |
Write id attributes. |
ud udx.export --node "Screens/Login"
ud udx.export --page Screens --idscodegen.snippet#
Code Snippet. Code for a node: CSS, HTML + CSS, React (inline, CSS modules, Tailwind), custom element, SwiftUI or Compose.
Since 0.6 · read-only · licence read · selection
DEV-2: generates code for a node and its children. Auto layout becomes flex (grid layout CSS grid), other children are absolutely positioned; values bound to variables use the variable’s code syntax (var(–name)); text styles, images (as asset paths under assets/) and accessibility metadata (DEV-8: headings, roles, alt text, names, focus order) are carried. Instances with a code-map entry (DEV-4, ud.codeMap or the component’s codeMap) become their code components with props; –options ‘{“useCodeMap”: false}’ turns that off. Returns {code, language, files, mapped, unmapped, assets, variables}.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--language |
“css” | “html” | “react” | “react-modules” | “tailwind” | “custom-element” | “swiftui” | “compose” | "react" |
css, html (HTML + CSS), react (TSX, inline styles), react-modules (TSX + CSS module), tailwind (TSX + Tailwind classes), custom-element (SoftForge page contract), swiftui, compose. | |
--options |
object |
ud codegen.snippet --node "Screens/Login" --language react
ud snippet "Screens/Login" --language tailwind
ud codegen.snippet --node nd-4e6a8c0d2f1b --language custom-element --options '{"prefix": "app"}'codegen.generate#
Generate Code. Write the code of a frame or component into a folder, touching only the generated regions.
Since 0.6 · read-only · licence paid · writes files
DEV-3 “Generate Code”: writes the files of codegen.snippet for a node into –out (relative to the design file’s folder, or absolute). Each file’s generated code sits between markers (/* ud:generated
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | yes | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | |
--language |
“css” | “html” | “react” | “react-modules” | “tailwind” | “custom-element” | “swiftui” | “compose” | yes | css, html (HTML + CSS), react (TSX, inline styles), react-modules (TSX + CSS module), tailwind (TSX + Tailwind classes), custom-element (SoftForge page contract), swiftui, compose. | |
--out |
string | yes | Output folder (relative to the design file’s folder, or absolute). | |
--dryRun |
boolean | |||
--options |
object |
ud codegen.generate --node "Screens/Login" --language react --out src/screens --dryRun true
ud codegen "Screens/Login" --framework react-modules --out src/screenscodegen.inspect#
Inspect for Developers. What a developer needs of a node: CSS, Tailwind, iOS/Android/Flutter values, tokens, styles, assets, component.
Since 0.6 · read-only · licence read · selection
DEV-1 Inspect: the box model; the CSS declarations and Tailwind classes; the same properties as iOS (pt), Android (dp, sp) and Flutter (logical px) values with the tokens’ code syntax; the variables bound (name, collection, resolved value, code syntax per platform) and the styles used; the assets to export; the component with its property values and its code-map snippet; accessibility, annotations and dev status. –platform limits the code rows to one platform.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--platform |
“web” | “ios” | “android” | “flutter” | |||
--options |
object |
ud codegen.inspect --node "Screens/Login/Sign in"
ud inspect "Screens/Login/Sign in" --fields code --platform iosImport#
| Command | Summary |
|---|---|
udx.insert |
Build nodes from UDX markup under a page or container (also how UDX is pasted). |
udx.replace |
Replace a node and its subtree with UDX markup, keeping the nodes whose id attributes match. |
import.svg |
Import SVG markup as editable frames, groups, shapes, vectors, gradients and text. |
import.figma |
Import a Figma file through the REST API: pages, components, styles, variables, auto layout, images and prototype links. |
import.sketch |
Import a .sketch file: pages, artboards, shapes, text, symbols and overrides, shared styles, swatches and images. |
import.penpot |
Import a Penpot export: pages, boards with flex and grid layout, shapes, text, components, colours and typographies. |
import.html |
Capture a running web page with headless Chromium and rebuild it as editable frames, one per viewport width. |
page.capture |
Take a PNG screenshot of a running web page with headless Chromium. |
udx.insert#
Insert UDX. Build nodes from UDX markup under a page or container (also how UDX is pasted).
Since 0.2 · mutates · licence paid
UDX (CLI-001 §7) is the HTML-like text form of nodes: elements frame, group, section, rect (rectangle), ellipse, line, polygon, star, vector (d), text, image (src), boolean; shorthands x, y, w, h, fill, stroke, stroke-w, radius, opacity, blend, shadow, blur, layout, gap, pad, align, font, weight, size, lh, ls, style="@Text/Style"; any other stored property as a kebab-case attribute (JSON for structured values); runs and
inside text. Run ud help udx for the grammar. The nodes are created parent first with new ids (–keepIds keeps free id attributes); –x/–y move the first top-level node there and the others with it. Images with src=“path” are read from the workspace and data: URLs are decoded; both are stored in the assets folder.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--parent |
string | Where the nodes go (default: the first page). | ||
--after |
string | Place the nodes just above this sibling. | ||
--text |
string | yes | UDX markup. | |
--x |
number | |||
--y |
number | |||
--keepIds |
boolean | false |
Keep id attributes that are free. |
ud udx.insert --parent "Screens" --text '<frame name="Card" w="320" h="200" fill="#FFFFFF" radius="12" />'
ud udx.insert --parent "Screens/Login" --x 24 --y 96 --text "$(cat card.udx)"udx.replace#
Replace with UDX. Replace a node and its subtree with UDX markup, keeping the nodes whose id attributes match.
Since 0.2 · mutates · licence paid
UDX (CLI-001 §7) is the HTML-like text form of nodes: elements frame, group, section, rect (rectangle), ellipse, line, polygon, star, vector (d), text, image (src), boolean; shorthands x, y, w, h, fill, stroke, stroke-w, radius, opacity, blend, shadow, blur, layout, gap, pad, align, font, weight, size, lh, ls, style="@Text/Style"; any other stored property as a kebab-case attribute (JSON for structured values); runs and
inside text. Run ud help udx for the grammar. The UDX has one top-level element. Nodes of the old subtree whose id appears on an element of the same type are kept and updated in place (properties not written in the UDX are removed, so they take their defaults); the top-level element without an id keeps the replaced node when the types match. Other old nodes are deleted and other elements created. Export with udx.export –ids, edit, replace.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | yes | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | |
--text |
string | yes | ||
--keepIds |
boolean | true |
Keep matching ids (false: build everything new). |
ud udx.replace --node "Screens/Login/Card" --text "$(cat card.udx)"import.svg#
Import SVG. Import SVG markup as editable frames, groups, shapes, vectors, gradients and text.
Since 0.2 · mutates · licence paid
EXP-4. The SVG is read by our own parser through an allowlist (ARC-001 §13): rect, circle, ellipse and line become native shapes where exact, paths and polygons become vectors (path data normalised to absolute M L C Z), groups become groups with their transforms baked in, linear and radial gradients become gradient paints, a rectangular clip-path becomes a clipping frame and any other one a vector mask, text becomes text, and embedded PNG, JPEG, WebP and GIF images become image fills stored in the assets folder. Scripts, style sheets, event handlers, foreignObject, links to other files and entity declarations are dropped, each with a warning. The result is one frame of the SVG’s size.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--parent |
string | Where the frame goes (default: the first page). | ||
--after |
string | Place it just above this sibling. | ||
--text |
string | yes | The SVG markup. | |
--x |
number | |||
--y |
number | |||
--name |
string | Name of the frame (default: the SVG’s title, else SVG). |
ud import.svg --parent "Screens/Login" --x 159 --y 72 --text "$(cat logo.svg)"
ud import svg logo.svgimport.figma#
Import Figma File. Import a Figma file through the REST API: pages, components, styles, variables, auto layout, images and prototype links.
Since 0.8 · mutates · licence paid · writes files · network
EXP-5, S17. Fetches the file of a figma.com/design URL with a personal access token (token; the editor keeps it in SecretStorage, ud reads –token or FIGMA_TOKEN) and builds new pages: frames, groups, sections, shapes, vectors (fill geometry), booleans, text with styled runs, components and component sets with their property definitions, instances with component properties and overrides, paint/text/effect/grid styles, variable collections with modes and aliases (the variables endpoint needs an Enterprise token; without it styles are imported and the report says so), auto layout and constraints, image fills (downloaded into the assets folder), exportSettings, interactions and flows. Figma’s names are kept. A URL with node-id imports that node only; pages imports some pages. Library components not in the file are rebuilt from their first instance on an “Imported components” page. Every approximation or omission is an issue of the report: {severity, nodeId, name, issue, kind: approximated|skipped}; approximatedRatio is shown against the 5 % target. dryRun maps without writing (and without downloading images). data takes a REST response (GET /v1/files/:key?geometry=paths) instead of fetching: offline imports and tests. .fig files are not read (SRS Appendix D 12).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--url |
string | A figma.com/design/ |
||
--token |
string | Personal access token (default: the stored one, FIGMA_TOKEN for ud). | ||
--pages |
string[] | Page names or ids to import (default every page). | ||
--depth |
integer | Tree depth to fetch (REST depth). ≥ 1 | ||
--images |
boolean | true |
Download image fills and renders (false: image fills are left out and reported). | |
--dryRun |
boolean | false |
Map and report, write nothing. | |
--data |
object | A REST file response (or {file, variables, styleNodes}) to import instead of fetching. |
ud import figma https://www.figma.com/design/AbC123xyz/App --token "$FIGMA_TOKEN"
ud import.figma --url https://www.figma.com/design/AbC123xyz/App?node-id=1-2 --dryRun trueimport.sketch#
Import Sketch File. Import a .sketch file: pages, artboards, shapes, text, symbols and overrides, shared styles, swatches and images.
Since 1.2 · mutates · licence paid · writes files
EXP-8. Reads a .sketch file (document version 50+, Sketch 70+): pages → pages; artboards → frames and symbol masters → components; groups (smart layout → auto layout, approximated); rectangles, ovals, polygons, stars and triangles → shapes (edited ones and shape paths → vectors from their curve points); shape groups → boolean operations; text → text with styled runs (font, size, line height, letter spacing, colour, alignment, decoration); symbol instances → instances with their overrides (text, nested symbol swaps, images, layer and text styles); fills, borders, shadows, inner shadows and blurs; resizing constraints; shared layer and text styles → styles; swatches → COLOR variables of a “Colors” collection; images → the assets folder; prototype links and flow homes. Fonts are matched against the font index; missing ones are listed. Every approximation or omission (tints, noise fills, hotspots, unsupported export presets) is an issue of the report, against the 5 % target. path is read through the host (relative to the design’s folder); data takes the file as base64. dryRun maps without writing.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--path |
string | The .sketch file (absolute, or relative to the design’s folder). | ||
--data |
string | The file as base64 (or a data: URL), instead of reading path. | ||
--pages |
string[] | Page names or ids to import (default every page). | ||
--images |
boolean | true |
Store the images in the assets folder (false: image fills are left out and reported). | |
--report |
string | Also write the report as JSON to this path (relative to the design’s folder). | ||
--dryRun |
boolean | false |
Map and report, write nothing. |
ud import sketch design.sketch app.design --report import-report.json
ud import.sketch --path design.sketch --dryRun trueimport.penpot#
Import Penpot File. Import a Penpot export: pages, boards with flex and grid layout, shapes, text, components, colours and typographies.
Since 1.2 · mutates · licence paid · writes files
EXP-8. Reads a Penpot export: the 2.x .penpot file (manifest.json and one JSON per page, object, component, colour and typography) or the legacy .zip (one JSON per file). Pages → pages; boards → frames (flex layout → auto layout, grid layout → grid layout, constraints); groups, rect, circle, path (content segments → vector paths), bool (union, difference, intersection, exclude) and image layers; text → text with styled runs from the content tree; main components → components and copies → instances whose changed layers become overrides (nested swaps included); fills (colour, gradients, images), strokes, shadows, blur, opacity and blend modes; colours → COLOR variables and typographies → text styles; images → the assets folder; interactions and flows. svg-raw layers become placeholder frames. Every approximation or omission is an issue of the report, against the 5 % target. path is read through the host; data takes the file as base64. dryRun maps without writing.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--path |
string | The .penpot or .zip export (absolute, or relative to the design’s folder). | ||
--data |
string | The file as base64 (or a data: URL), instead of reading path. | ||
--pages |
string[] | Page names or ids to import (default every page). | ||
--images |
boolean | true |
Store the images in the assets folder (false: image fills are left out and reported). | |
--report |
string | Also write the report as JSON to this path (relative to the design’s folder). | ||
--dryRun |
boolean | false |
Map and report, write nothing. |
ud import penpot app.penpot app.design --pages Screens
ud import.penpot --path exports/app.zip --dryRun trueimport.html#
Import Web Page. Capture a running web page with headless Chromium and rebuild it as editable frames, one per viewport width.
Since 0.8 · mutates · licence paid · network
INT-1, AI-001 §9.1. Loads the URL (http(s), or a local .html file or folder, served for the time of the capture) in headless Chromium at each viewport width, waits for the network to be idle and the web fonts to load, and walks the DOM: flex containers become auto layout (direction, gap, padding, alignment, wrap), grids become grid layout, block flow becomes vertical auto layout where the boxes line up, anything else absolute positions; text becomes text with styled runs (family, weight, size, line height, letter spacing, colour, decoration, links), images and CSS background images become image fills stored in the assets folder, inline SVG becomes vectors, borders, radii, shadows, gradients, opacity and blend modes come across. Hidden, empty and zero-size elements are left out (listed in the report). One frame per viewport, named “
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--url |
string | yes | http(s) URL, file: URL, or a path to an .html file or folder. | |
--viewports |
integer[] | [1440] |
Viewport widths, one frame each. | |
--height |
integer | Viewport height (default 900). ≥ 200, ≤ 4000 | ||
--reference |
boolean | false |
Name the frame “Reference: |
|
--page |
string | The page to import into (default the first). | ||
--x |
number | |||
--y |
number | |||
--fullPage |
boolean | true |
The whole scroll height (false: the viewport only). | |
--waitMs |
integer | Extra wait after load (animations, lazy content). ≥ 0, ≤ 30000 | ||
--selector |
string | Capture only the first element matching this CSS selector. |
ud import html http://localhost:5173/pricing --viewport 390,1440
ud import.html --url http://localhost:5173/ --reference truepage.capture#
Capture Web Page. Take a PNG screenshot of a running web page with headless Chromium.
Since 0.8 · read-only · licence read · writes files · network
INT-1. Loads the URL in headless Chromium at the viewport width (and height, default 900), waits for the network to be idle and the web fonts to load, and writes a PNG: out (relative to the document’s folder), else a temporary file. fullPage takes the whole scroll height. The result is the file’s path and the image size.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--url |
string | yes | ||
--viewport |
integer | 1440 |
≥ 200, ≤ 3840 | |
--height |
integer | ≥ 200, ≤ 4000 | ||
--fullPage |
boolean | false |
||
--waitMs |
integer | ≥ 0, ≤ 30000 | ||
--out |
string | Where to write the PNG (default a temporary file). |
ud capture http://localhost:5173/ --out shot.png --viewport 390
ud page.capture --url http://localhost:5173/ --viewport 1440Prototyping#
| Command | Summary |
|---|---|
prototype.export |
Export the prototype as a static site (index.html, player, state.json, images, fonts) any static host can serve. |
flow.create |
Add a prototype flow: a named starting frame on a page, with a description, device and background. |
flow.update |
Rename a flow, move its starting frame, or change its description, device or background. |
flow.delete |
Remove a flow starting point (the frames and their interactions stay). |
flow.list |
The prototype flows of a page (or of every page) with their starting frames. |
reaction.add |
Add an interaction (trigger and actions) to nodes: navigate, overlays, back, scroll to, change to, links, variables, conditions. |
reaction.set |
Change the trigger or the actions of one interaction of nodes (by its index in reaction.list). |
reaction.remove |
Remove one interaction (by index) or all interactions of nodes. |
reaction.list |
The interactions of a node: stored reactions, and what it plays with destinations named (instances include their variant’s). |
node.setScroll |
Make frames scroll (overflow none, horizontal, vertical, both) and set how layers move when their parent scrolls. |
node.setOverlay |
How a frame shows when opened as an overlay: position, background dimming, close on outside click. |
prototype.run |
Play a flow headless with steps (click, hover, key, wait, back…) and report the screens, the final state and its hotspots. |
prototype.flows |
Every flow with its starting frame and the screens it reaches (the player’s frame counter). |
prototype.motion |
The animated interactions of a node as keyframe tracks with easing, CSS @keyframes, motion.dev code and hints. |
prototype.export#
Export Prototype Site. Export the prototype as a static site (index.html, player, state.json, images, fonts) any static host can serve.
Since 0.8 · read-only · licence read · writes files
PRO-9. Writes a folder that plays the prototype in a browser without the editor: index.html (the player, data-transport=“static”), player.js and lib/ (the player’s ES modules, HarfBuzz and the segmenter in lib/wasm/), preview.css, state.json (the document cut down to the pages of the exported flows, plus the pages of the main components their instances use; no comments, no history), assets/ (the images those pages use) and fonts/ (the faces of their text, only when the font’s licence allows embedding, OS/2 fsType; others fall back to Inter and are listed in notes). flows and pages narrow what goes out (default every page with a flow). baseUrl sets
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--out |
string | yes | The folder (relative to the document’s folder). | |
--flows |
string[] | Flow ids or names (default every flow). | ||
--pages |
string[] | Page ids or names (default the flows’ pages). | ||
--embedFonts |
boolean | true |
Copy the font files the licence allows (false: none; the player falls back to Inter if bundled). | |
--baseUrl |
string | |||
--title |
string | The page title (default the document’s name). |
ud prototype export --out site --flow "Checkout flow"
ud prototype.export --out docs/prototype --baseUrl /my-app/prototype/flow.create#
Add Flow Starting Point. Add a prototype flow: a named starting frame on a page, with a description, device and background.
Since 0.5 · mutates · licence paid
PRO-6, FMT-001 §4.12. The flow starts at –node (a top-level frame); its page is the frame’s page unless –page is given. –device takes a preset name (“iPhone 15”) or Figma’s {type: NONE|PRESET|CUSTOM|PRESENTATION, presetIdentifier?, size?, rotation?}; –background a colour for the player.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--page |
string | A page id (pg-…) or a page name. | ||
--name |
string | yes | ||
--node |
string | yes | The starting frame. | |
--description |
string | |||
--device |
string or object | Device frame of the player: {type: NONE|PRESET|CUSTOM|PRESENTATION, rotation?: NONE|CCW_90, presetIdentifier?, size?: {width, height}}, or a preset name such as “iPhone 15”. | ||
--background |
string or object | Background of the player: #RRGGBB[AA] or {r, g, b, a}. |
ud flow.create --name "Checkout flow" --node Screens/Welcome --description "Sign in and pay"
ud flow.create --name Onboarding --node nd-6b8d0f2a4c1e --device "iPhone 15" --background "#111827"flow.update#
Update Flow. Rename a flow, move its starting frame, or change its description, device or background.
Since 0.5 · mutates · licence paid
–set takes name, node (the starting frame), description, device (preset name or {type, rotation}) and background (a colour); null unsets description, device and background.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--flow |
string | yes | A flow id (fl-…) or name. | |
--set |
object | yes |
ud flow.update --flow "Checkout flow" --set '{"name":"Purchase","node":"Screens/Home"}'
ud flow.update --flow fl-1a2b3c4d5e6f --set '{"device":"iPhone 15"}'flow.delete#
Remove Flow. Remove a flow starting point (the frames and their interactions stay).
Since 0.5 · mutates · licence paid
Removes the flow (FMT-001 §5.11.8). The frames and their reactions are not touched.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--flow |
string | yes | A flow id (fl-…) or name. |
ud flow.delete --flow "Checkout flow"flow.list#
List Flows. The prototype flows of a page (or of every page) with their starting frames.
Since 0.5 · read-only · licence read
Each flow with id, name, page, starting frame (id and name), description, device and background, in order.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--page |
string | A page id (pg-…) or a page name. |
ud flow.list --json
ud flow.list --page Screensreaction.add#
Add Interaction. Add an interaction (trigger and actions) to nodes: navigate, overlays, back, scroll to, change to, links, variables, conditions.
Since 0.5 · mutates · licence paid · selection
PRO-1, PRO-2, PRO-3. –trigger: click, hover, while-hovering, press, while-pressing, drag, mouse-enter, mouse-leave, mouse-down, mouse-up, key:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--trigger |
string or object | yes | A trigger: click, hover, while-hovering, press, while-pressing, drag, mouse-enter, mouse-leave, mouse-down, mouse-up, key: |
|
--action |
object | An action: Figma’s shape ({type: NODE|BACK|CLOSE|URL|SET_VARIABLE|SET_VARIABLE_MODE|CONDITIONAL, …}) or a shorthand ({navigate: dest, transition: “smart”, duration: 300}, {overlay: dest}, {back: true}, {set: variable, value}, {if: …, then: […], else: […]}, …). | ||
--actions |
object[] |
ud reaction.add --node "Sign in/Sign in button" --trigger click --action '{"navigate":"Home","transition":"smart","duration":300}'
ud reaction.add --node "Sign in/Help" --trigger click --action '{"overlay":"Help"}'
ud reaction.add --node Welcome --trigger after-delay:2000 --action '{"navigate":"Sign in","transition":"dissolve"}'reaction.set#
Edit Interaction. Change the trigger or the actions of one interaction of nodes (by its index in reaction.list).
Since 0.5 · mutates · licence paid · selection
–set takes trigger, action or actions in the forms of reaction.add; what is left out stays.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--index |
integer | yes | ≥ 0 | |
--set |
object | yes |
ud reaction.set --node "Cart/Checkout" --index 0 --set '{"action":{"navigate":"Checkout","transition":"push","direction":"left"}}'
ud reaction.set --node Welcome --index 0 --set '{"trigger":"after-delay:3000"}'reaction.remove#
Remove Interaction. Remove one interaction (by index) or all interactions of nodes.
Since 0.5 · mutates · licence paid · selection
–index removes one interaction (reaction.list shows the indexes); –all removes every interaction of the nodes.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--index |
integer | ≥ 0 | ||
--all |
boolean |
ud reaction.remove --node "Home/Cart" --index 0
ud reaction.remove --query 'frame[name="Help"] *' --allreaction.list#
List Interactions. The interactions of a node: stored reactions, and what it plays with destinations named (instances include their variant’s).
Since 0.5 · read-only · licence read · selection
reactions is the stored list (Figma’s shape); resolved is what the node plays: for an instance its own interactions plus those of its main component’s variant for other triggers (CMP-8), each with a summary (“On click → Navigate to Cart (Smart animate 300ms)”) and destination names.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text |
ud reaction.list --node "Home/Cart button"
ud reaction.list --node nd-6b8d0f2a4c1e --jsonnode.setScroll#
Set Scroll Behaviour. Make frames scroll (overflow none, horizontal, vertical, both) and set how layers move when their parent scrolls.
Since 0.5 · mutates · licence paid · selection
PRO-5. –overflow NONE|HORIZONTAL|VERTICAL|BOTH sets overflowDirection on frames: in the prototype they scroll their content and clip to their box. –behavior SCROLLS|FIXED|STICKY_SCROLLS sets scrollBehavior on layers: FIXED stays in place while the parent scrolls, STICKY_SCROLLS scrolls until it reaches the frame’s edge and stays there.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--overflow |
“NONE” | “HORIZONTAL” | “VERTICAL” | “BOTH” | “none” | “horizontal” | “vertical” | “both” | |||
--behavior |
“SCROLLS” | “FIXED” | “STICKY_SCROLLS” | “scrolls” | “fixed” | “sticky” |
ud node.setScroll --node Home/Products --overflow VERTICAL
ud node.setScroll --node Home/Products/Header --behavior STICKY_SCROLLSnode.setOverlay#
Set Overlay Settings. How a frame shows when opened as an overlay: position, background dimming, close on outside click.
Since 0.5 · mutates · licence paid · selection
PRO-4. –position CENTER|TOP_LEFT|TOP_CENTER|TOP_RIGHT|BOTTOM_LEFT|BOTTOM_CENTER|BOTTOM_RIGHT|MANUAL (overlayPositionType); –background NONE, a colour ("#00000066") or {type: SOLID_COLOR, color} (overlayBackground); –closeOnOutside true|false (overlayBackgroundInteraction CLOSE_ON_CLICK_OUTSIDE). –manualPosition {x, y} sets MANUAL and writes the offset from the trigger into every OVERLAY action that opens the frame (overlayRelativePosition, as Figma stores it).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--position |
“CENTER” | “TOP_LEFT” | “TOP_CENTER” | “TOP_RIGHT” | “BOTTOM_LEFT” | “BOTTOM_CENTER” | “BOTTOM_RIGHT” | “MANUAL” | … | |||
--background |
string or object | |||
--closeOnOutside |
boolean | |||
--manualPosition |
object |
ud node.setOverlay --node Help --position BOTTOM_CENTER --background "#00000066" --closeOnOutside true
ud node.setOverlay --node Menu --manualPosition '{"x":0,"y":48}'prototype.run#
Run Prototype. Play a flow headless with steps (click, hover, key, wait, back…) and report the screens, the final state and its hotspots.
Since 0.5 · read-only · licence read
PRO-10. Starts at –flow (id or name) or –node (a frame), plays –steps and returns {flow, start, screens (visited, in order), steps (one row each: handled, screen, overlays, transitions, warnings), final (the Screen: nodeId, name, overlays, scroll, variables, modes, variants, history, index), hotspots, urls, warnings}. Steps: click|hover|press|release:“Name” or nd-… or x,y (screen px); drag:“Name”,dx,dy; scroll:[target,]dx,dy; key:Enter; wait:ms (runs after-delay timers); timeout (fires the next timer); back; outside (click outside the top overlay); unhover; restart. Nothing is written. ud prototype run renders the final screen (–out shot.png); with render the plan carries {format, scale, out}.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--flow |
string | A flow id (fl-…) or name; default the first flow, else the first frame. | ||
--node |
string | Start at this frame instead. | ||
--steps |
string or any[] | Steps: ‘click:“Sign in”;wait:300;back’ or [{click: “Sign in”}, {wait: 300}, {key: “Enter”}, {scroll: {dy: 200}}, {back: true}, {outside: true}]. | ||
--render |
boolean or object | |||
--mode |
string | Variable modes: Collection=Mode[,…]. | ||
--modes |
object | Variable modes: collection id → mode id. |
ud prototype run --flow "Checkout flow" --steps 'click:"Get started";click:"Sign in";wait:300' --out shot.png
ud prototype.run --flow "Checkout flow" --steps '[{"click":"Get started"},{"key":"Escape"}]' --jsonprototype.flows#
Prototype Flows. Every flow with its starting frame and the screens it reaches (the player’s frame counter).
Since 0.5 · read-only · licence read
Each flow of flow.list plus screens: the top-level frames reachable from the start by navigate and swap actions (through overlays and conditional branches), in the order the player counts them (“3 / 5”).
Takes no parameters.
ud prototype flows --jsonprototype.motion#
Motion Context. The animated interactions of a node as keyframe tracks with easing, CSS @keyframes, motion.dev code and hints.
Since 0.5 · read-only · licence read · selection
CLI-001 §3.11 (get_motion_context). For each interaction of the node (a frame: and of its layers; –recursive for any node) with a transition: the source, trigger, from and to screens, type, duration (ms; a spring’s settle time), easing (cubic Bézier or spring), and tracks (node, property, from, to) as the player plays them; then css (@keyframes per node, selected by [data-node-id]), motionDev (animate(…) calls) and hints for implementing them.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id, a name path or a ud:// link. | ||
--query |
string | |||
--recursive |
boolean |
ud prototype.motion --node "Sign in" --json
ud get_motion_context --nodeId nd-6b8d0f2a4c1eHistory and versions#
| Command | Summary |
|---|---|
version.save |
Name the current state of the document as a version, with a title and a description. |
version.list |
The named versions, oldest first, with who saved them, when, and whether the WAL can still show them. |
version.show |
One named version and, while the WAL holds it, the document at that version. |
history.list |
The changes of the WAL: who, when and what, grouped by transaction and by session, with the hash after each. |
history.restore |
Make the document what it was at a point of the history, as one new change (nothing is rewritten). |
document.diff |
The structural changes between two points of the history (seq, state hash, version) or a point and now. |
document.compare |
Top-level frames that changed between two versions (or since they were marked Ready for dev), for a side-by-side compare. |
version.save#
Save to Version History. Name the current state of the document as a version, with a title and a description.
Since 0.3 · mutates · licence free
Saves a named version (COL-2, FMT-001 §4.14): a version.save event whose treeHash is the tree hash of the document just before it. Versions are listed by ud versions and the history panel, survive consolidation, and can be previewed (ud versions show) and restored (ud restore <vs-…>). Save one before a large change.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--title |
string | yes | The version’s title. | |
--description |
string | What the version is (default empty). |
ud version.save --title "Login v2" --description "Before the auto layout pass"
ud version save "Login v2"version.list#
List Versions. The named versions, oldest first, with who saved them, when, and whether the WAL can still show them.
Since 0.3 · read-only · licence read
Lists tree.versions (COL-2). previewable is true while the WAL still holds the version’s version.save event; an older version is still listed (consolidation keeps versions) and ud versions show reads it from git history. seq is the version.save event’s number: the version is the document just before it.
Takes no parameters.
ud version.list --json
ud versionsversion.show#
Show Version. One named version and, while the WAL holds it, the document at that version.
Since 0.3 · read-only · licence read
The version’s title, description, author, time and treeHash, and whether it can be previewed from the WAL. When it can, state summarises the document as it was (the document just before the version.save event, checked against treeHash; a mismatch is a warning). ud versions show also reads versions older than the WAL from git.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--id |
string | yes | The version id (vs-…). pattern ^vs- |
ud version.show --id vs-2a4c6e8b0d1f --json
ud versions show vs-2a4c6e8b0d1f --udxhistory.list#
Show History. The changes of the WAL: who, when and what, grouped by transaction and by session, with the hash after each.
Since 0.3 · read-only · licence read
The history panel’s list (COL-1): one group per transaction (its undo label, actor, time, seq range, a summary such as “Changed fill of Button”, and the state hash after it), and sessions of one actor without a 30-minute gap. –since keeps the groups after a seq, –limit the most recent ones. Points older than the WAL base are in git. Preview a point with ud render –at <seq|hash|vs-…>; restore it with ud restore.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--since |
integer | Only changes after this seq. ≥ 0 | ||
--limit |
integer | At most this many groups, the most recent. ≥ 1 |
ud history.list --since 120 --json
ud history --limit 20history.restore#
Restore Version. Make the document what it was at a point of the history, as one new change (nothing is rewritten).
Since 0.3 · mutates · licence paid
COL-1 “restore a point as a new change”: computes the events that turn the current document into the one at the point (after event –seq, at a state –hash, or a –version) and commits them as one group labelled “Restore
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--seq |
integer | The document after this event. ≥ 0 | ||
--hash |
string | The point with this state hash. pattern ^sha256: |
||
--version |
string | A named version (the document just before its version.save). pattern ^vs- |
||
--at |
string | seq, sha256:… or vs-…, whichever it is. |
ud history.restore --version vs-2a4c6e8b0d1f
ud restore 118document.diff#
Compare Versions. The structural changes between two points of the history (seq, state hash, version) or a point and now.
Since 0.5 · read-only · licence read
CMD-35. a and b are points of the WAL: a seq (12), a state hash (sha256:…), a version (vs-…), or current (default b). Returns {changes: [{kind: created|deleted|changed|moved, entity, id, name, type, page, props, details (renames, text edits: from → to)}], summary}. ud diff also compares files and git revisions (rev:path) and writes the visual diff (before, after, and an overlay with changed regions outlined) with –image.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--a |
string | yes | A point: seq, sha256:…, vs-… or current. | |
--b |
string | A point (default current). | ||
--image |
boolean | ud diff writes images; the command ignores it. |
ud document.diff --a 12 --b 20 --json
ud diff 12 current --image diff.pngdocument.compare#
Compare with Revision. Top-level frames that changed between two versions (or since they were marked Ready for dev), for a side-by-side compare.
Since 0.6 · read-only · licence read
COL-5, DEV-5, CMD-35. a and b are points of the WAL (a seq, sha256:…, vs-…) or current (b’s default); a = ready compares each frame marked “Ready for dev” with itself when it was marked (its devStatus.at), so the changes made after the hand-off stand out. Returns {frames: [{nodeId, name, page, change: added|removed|changed|unchanged, changes, ready?}], summary}; –scope changed (default) leaves out unchanged frames. ud compare also compares files and git revisions and renders each frame at both points with an overlay of the changed regions (images under
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--a |
string | yes | The earlier point: seq, sha256:…, vs-…, current, or ready (DEV-5). | |
--b |
string | The later point (default current). | ||
--page |
string | A page id (pg-…) or a page name. | ||
--node |
string | Compare this top-level frame only. | ||
--scope |
“changed” | “all” | "changed" |
changed: frames that changed; all: every frame. |
ud document.compare --a 12 --page Screens --json
ud document.compare --a ready
ud compare HEAD~1 current --page ScreensVariables and styles#
| Command | Summary |
|---|---|
collection.create |
Add a variable collection with its modes (Light/Dark, Compact/Comfortable, brands). |
collection.update |
Rename a collection, choose its default mode, or hide it from publishing. |
collection.delete |
Remove a collection and its variables; bindings fall back to their plain values. |
mode.add |
Add a mode to a collection; its variables use the default mode’s values until set. |
mode.rename |
Rename a mode of a collection. |
mode.remove |
Remove a mode and its values; frames that chose it fall back to the default mode. |
variable.create |
Add a variable to a collection, with a value for the default mode and optionally for each mode. |
variable.update |
Rename a variable or change its description, scopes, code syntax or values. |
variable.setValue |
Set a variable’s value, alias or expression for one mode. |
variable.delete |
Remove a variable; bindings and aliases fall back to plain values or the type’s zero. |
variable.list |
Collections with their modes and variables, values per mode (aliases as $name) and resolved values. |
variable.resolve |
The value a variable takes for a node (its mode) or a mode, following aliases. |
variable.usedBy |
Nodes bound to a variable, and the styles and variables that refer to it. |
node.bind |
Bind a property of nodes to a variable (fills[0].color, itemSpacing, topLeftRadius, characters, …). |
node.unbind |
Remove a property’s variable binding; the current value stays as a plain value. |
node.setMode |
Choose a collection’s mode for frames (and their children) or a page (explicitVariableModes). |
tokens.export |
Export variables as DTCG, Style Dictionary, Tokens Studio, CSS, SCSS, Tailwind, Swift, Kotlin or Flutter. |
tokens.import |
Import DTCG, Style Dictionary or Tokens Studio JSON as collections, modes and variables. |
collection.create#
Create Variable Collection. Add a variable collection with its modes (Light/Dark, Compact/Comfortable, brands).
Since 0.4 · mutates · licence paid
A collection groups variables that share modes (VAR-2, FMT-001 §4.10). –modes names the modes in order (default one mode, “Mode 1”); –defaultMode names the default (default: the first).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--name |
string | yes | ||
--modes |
string[] | Mode names in order (default: [“Mode 1”]). | ||
--defaultMode |
string | The default mode’s name (default: the first). | ||
--hiddenFromPublishing |
boolean |
ud collection.create --name color --modes Light,Dark
ud collection.create --name spacecollection.update#
Update Variable Collection. Rename a collection, choose its default mode, or hide it from publishing.
Since 0.4 · mutates · licence paid
Changes a collection’s own members (FMT-001 §5.11.6). Modes change through mode.add, mode.rename and mode.remove.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--collection |
string | yes | A collection id (vc-…, lib-…/vc-… for a library’s) or name. | |
--name |
string | |||
--defaultMode |
string | |||
--hiddenFromPublishing |
boolean |
ud collection.update --collection color --defaultMode Darkcollection.delete#
Delete Variable Collection. Remove a collection and its variables; bindings fall back to their plain values.
Since 0.4 · mutates · licence paid
Removes the collection and every variable in it (FMT-001 §5.11.6). Nodes bound to them keep the plain values written next to the bindings (§4.4.5).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--collection |
string | yes | A collection id (vc-…, lib-…/vc-… for a library’s) or name. |
ud collection.delete --collection colormode.add#
Add Mode. Add a mode to a collection; its variables use the default mode’s values until set.
Since 0.4 · mutates · licence paid
Adds a mode at the end of the collection (FMT-001 §5.11.6, op mode.create). Variables without a value for it resolve to the default mode’s value; set them with variable.setValue.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--collection |
string | yes | A collection id (vc-…, lib-…/vc-… for a library’s) or name. | |
--name |
string | yes |
ud mode.add --collection color --name "High contrast"mode.rename#
Rename Mode. Rename a mode of a collection.
Since 0.4 · mutates · licence paid
Renames a mode (op mode.update).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--collection |
string | yes | A collection id (vc-…, lib-…/vc-… for a library’s) or name. | |
--mode |
string | yes | A mode id (md-…) or name (Dark). | |
--name |
string | yes |
ud mode.rename --collection color --mode "Mode 1" --name Lightmode.remove#
Remove Mode. Remove a mode and its values; frames that chose it fall back to the default mode.
Since 0.4 · mutates · licence paid
Removes a mode (op mode.delete) and the values for it. The last mode and the default mode cannot be removed (choose another default first with collection.update –defaultMode).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--collection |
string | yes | A collection id (vc-…, lib-…/vc-… for a library’s) or name. | |
--mode |
string | yes | A mode id (md-…) or name (Dark). |
ud mode.remove --collection color --mode "High contrast"variable.create#
Create Variable. Add a variable to a collection, with a value for the default mode and optionally for each mode.
Since 0.4 · mutates · licence paid
Adds a variable (VAR-2): –type COLOR, FLOAT, STRING or BOOLEAN. –value is the default mode’s value; –values sets modes by name or id. A value “$name” aliases another variable of the same type (VAR-3): semantic tokens alias primitives. Colours take #RRGGBB, #RRGGBBAA or {r,g,b,a}. Names group by “/” and are unique within the collection.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--collection |
string | yes | A collection id (vc-…, lib-…/vc-… for a library’s) or name. | |
--name |
string | yes | ||
--type |
“COLOR” | “FLOAT” | “STRING” | “BOOLEAN” | yes | ||
--value |
any | A value of the variable’s type: #RRGGBB[AA] or {r,g,b,a} for COLOR, a number for FLOAT, a string, a boolean; “$name” (or {type: VARIABLE_ALIAS, id}) aliases another variable; {type: EXPRESSION, expression} computes a FLOAT or STRING (VAR-10). | ||
--values |
object | Mode name or id → value or “$alias”. | ||
--description |
string | |||
--scopes |
“ALL_SCOPES” | “TEXT_CONTENT” | “CORNER_RADIUS” | “WIDTH_HEIGHT” | “GAP” | “ALL_FILLS” | “FRAME_FILL” | “SHAPE_FILL” | …[] | Where the variable is offered (VAR-5); default [“ALL_SCOPES”]. | ||
--codeSyntax |
object | Code syntax per platform: {“WEB”: “var(–color-bg)”} (VAR-5). | ||
--hiddenFromPublishing |
boolean |
ud variable.create --collection Colors --name color/brand --type COLOR --value '#4F46E5'
ud variable.create --collection color --name color/bg/surface --type COLOR --values '{"Light": "$palette/gray/0", "Dark": "$palette/gray/900"}' --scopes '["FRAME_FILL","SHAPE_FILL"]'
ud variable.create --collection space --name space/4 --type FLOAT --value 16 --codeSyntax '{"WEB": "var(--space-4)"}'variable.update#
Update Variable. Rename a variable or change its description, scopes, code syntax or values.
Since 0.4 · mutates · licence paid
Changes a variable (op variable.update, FMT-001 §5.11.6). –set takes name, description, scopes, codeSyntax (a merge: null removes a platform), hiddenFromPublishing and values (mode name or id → value or “$alias”). The type never changes.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--variable |
string | yes | A variable id (vr-…, lib-…/vr-…), its name (color/bg/surface), or collection/name (Colors/color/bg/surface). | |
--set |
object | yes |
ud variable.update --variable color/bg/surface --set '{"description": "Page and card backgrounds", "scopes": ["FRAME_FILL"]}'
ud variable.update --variable space/4 --set '{"codeSyntax": {"WEB": "var(--space-4)"}}'variable.setValue#
Set Variable Value. Set a variable’s value, alias or expression for one mode.
Since 0.4 · mutates · licence paid
Sets the value for a mode (default: the collection’s default mode): exactly one of –value, –alias or –expression. –alias names another variable of the same type (VAR-3). –expression (FLOAT and STRING, VAR-10) computes the value from numbers, “strings”, + - * /, parentheses, min, max, round(x[, decimals]), floor, ceil, abs and other FLOAT or STRING variables by name or collection/name ({…} around names with spaces); + joins strings. An alias or expression that would make a cycle is refused (usage, alias_cycle). Other modes keep their values (valuesByMode merges per mode).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--variable |
string | yes | A variable id (vr-…, lib-…/vr-…), its name (color/bg/surface), or collection/name (Colors/color/bg/surface). | |
--mode |
string | A mode id (md-…) or name (Dark). | ||
--value |
any | A value of the variable’s type: #RRGGBB[AA] or {r,g,b,a} for COLOR, a number for FLOAT, a string, a boolean; “$name” (or {type: VARIABLE_ALIAS, id}) aliases another variable; {type: EXPRESSION, expression} computes a FLOAT or STRING (VAR-10). | ||
--alias |
string | A variable id (vr-…, lib-…/vr-…), its name (color/bg/surface), or collection/name (Colors/color/bg/surface). | ||
--expression |
string | An expression for a FLOAT or STRING variable (VAR-10), e.g. spacing/base * 2 or round(size/body * 1.25). |
ud variable.setValue --variable color/brand --mode Dark --value '#818CF8'
ud variable.setValue --variable color/bg/surface --mode Dark --alias palette/gray/900
ud variable.setValue --variable spacing/lg --mode Compact --expression "spacing/base * 2"variable.delete#
Delete Variable. Remove a variable; bindings and aliases fall back to plain values or the type’s zero.
Since 0.4 · mutates · licence paid
Removes a variable (FMT-001 §5.11.6). Nodes bound to it keep their plain values; variables aliasing it resolve to the type’s zero until they are changed (variable.usedBy lists the users first).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--variable |
string | yes | A variable id (vr-…, lib-…/vr-…), its name (color/bg/surface), or collection/name (Colors/color/bg/surface). |
ud variable.delete --variable color/oldvariable.list#
List Variables. Collections with their modes and variables, values per mode (aliases as $name) and resolved values.
Since 0.4 · read-only · licence read
Lists local collections and those of the libraries the file uses (qualified ids lib-…/vc-…), with every variable’s stored values per mode and the resolved value per mode (VAR-3).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--collection |
string | A collection id (vc-…, lib-…/vc-… for a library’s) or name. |
ud variable.list --json
ud variable.list --collection colorvariable.resolve#
Resolve Variable. The value a variable takes for a node (its mode) or a mode, following aliases.
Since 0.4 · read-only · licence read
Resolves a variable (FMT-001 §4.10): the mode is –mode, else the nearest explicit mode of –node or its ancestors and page, else the collection’s default. Returns the value, the mode and the alias chain; for an expression (VAR-10) also the expression, and the error when it does not evaluate (the value is then the type’s zero).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--variable |
string | yes | A variable id (vr-…, lib-…/vr-…), its name (color/bg/surface), or collection/name (Colors/color/bg/surface). | |
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--mode |
string | A mode id (md-…) or name (Dark). |
ud variable.resolve --variable color/bg/surface --mode Dark
ud variable.resolve --variable color/bg/surface --node "Screens/Settings"variable.usedBy#
Variable Users. Nodes bound to a variable, and the styles and variables that refer to it.
Since 0.4 · read-only · licence read
Lists what uses a variable: nodes whose bindings name it (paints, effects, grids and runs included), styles whose values bind it, and variables that alias it. get_variable_defs is built on it.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--variable |
string | yes | A variable id (vr-…, lib-…/vr-…), its name (color/bg/surface), or collection/name (Colors/color/bg/surface). |
ud variable.usedBy --variable color/brand --jsonnode.bind#
Bind to Variable. Bind a property of nodes to a variable (fills[0].color, itemSpacing, topLeftRadius, characters, …).
Since 0.4 · mutates · licence paid · selection
Binds a property to a variable (VAR-4, FMT-001 §4.4.5): the binding goes into boundVariables (inside the paint, effect or grid for fills[i].color, effects[i].radius, …) and the resolved value is written as the plain fallback. The variable’s type must match (COLOR for colours, FLOAT for numbers, BOOLEAN for visible, STRING for characters and font family/style) and its scopes must allow the property (VAR-5; –force skips the scope check).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--property |
string | yes | fills[0].color, strokes[0].color, effects[0].radius, itemSpacing, paddingLeft, cornerRadius, width, opacity, visible, characters, fontSize, … | |
--variable |
string | yes | A variable id (vr-…, lib-…/vr-…), its name (color/bg/surface), or collection/name (Colors/color/bg/surface). | |
--force |
boolean | Bind even when the variable’s scopes exclude the property. |
ud node.bind --node "Screens/Login" --property "fills[0].color" --variable color/bg/surface
ud node.bind --query 'frame[name="Card"]' --property itemSpacing --variable space/4
ud node.bind --node "Screens/Login/Title" --property characters --variable copy/login/titlenode.unbind#
Detach Variable. Remove a property’s variable binding; the current value stays as a plain value.
Since 0.4 · mutates · licence paid · selection
Removes the binding of a property (VAR-4); the plain value written next to it stays.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--property |
string | yes |
ud node.unbind --node "Screens/Login" --property "fills[0].color"node.setMode#
Set Variable Mode. Choose a collection’s mode for frames (and their children) or a page (explicitVariableModes).
Since 0.4 · mutates · licence paid · aliases page.setMode
Sets explicitVariableModes (VAR-6, FMT-001 §4.4.5): the frame and everything inside it resolve the collection’s variables in that mode, unless a descendant chooses another. –page sets it for a page. –mode null clears it (back to the parent’s mode, else the default). ud render –mode previews modes without changing the file.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--page |
string | A page id (pg-…) or a page name. | ||
--collection |
string | yes | A collection id (vc-…, lib-…/vc-… for a library’s) or name. | |
--mode |
string or null | yes |
ud node.setMode --node "Screens/Settings dark" --collection color --mode Dark
ud page.setMode --page "Dark screens" --collection color --mode Dark
ud node.setMode --node "Screens/Settings dark" --collection color --mode nulltokens.export#
Export Tokens. Export variables as DTCG, Style Dictionary, Tokens Studio, CSS, SCSS, Tailwind, Swift, Kotlin or Flutter.
Since 0.6 · read-only · licence read · writes files
VAR-9: the local variables as design tokens. dtcg (W3C Design Tokens JSON: $type, $value, aliases as {collection.path}, other modes and code syntax in $extensions[“com.softforge”]), style-dictionary, tokens-studio (one set per collection and mode), css (custom properties: :root for the default modes, [data-theme="
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--format |
“dtcg” | “style-dictionary” | “tokens-studio” | “css” | “scss” | “tailwind” | “swift” | “kotlin” | … | yes | ||
--out |
string | File (or folder) to write, relative to the design file’s folder or absolute. | ||
--collections |
string[] | Collection names or ids (default: all). | ||
--modes |
string[] | Mode names (default: all). |
ud tokens.export --format css --out src/styles/tokens.css
ud export --format tokens --tokens-format dtcg --out tokens.jsontokens.import#
Import Tokens. Import DTCG, Style Dictionary or Tokens Studio JSON as collections, modes and variables.
Since 0.6 · mutates · licence paid
VAR-9: reads tokens (–text, or –path relative to the design file’s folder) and creates or updates collections, modes and variables. DTCG and Style Dictionary group by collection when the file says so ($extensions[“com.softforge”], as tokens.export writes it); otherwise every token goes into –collection (default Tokens) with one mode. Tokens Studio sets “
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--format |
“dtcg” | “style-dictionary” | “tokens-studio” | |||
--text |
string | The JSON. | ||
--path |
string | A file to read, relative to the design file’s folder or absolute. | ||
--collection |
string | Collection for tokens that name none (default Tokens). | ||
--dryRun |
boolean |
ud tokens.import --path tokens.json --dryRun true
ud import tokens tokens.studio.json --format tokens-studioLibraries#
| Command | Summary |
|---|---|
library.list |
Libraries this file uses (with update status) and the workspace libraries it could add. |
library.add |
Use another .design file’s library: by path, document id or library name. |
library.remove |
Stop using a library: its reference and copies go; references fall back to plain values. |
library.enable |
Offer a library in the Assets panel and searches, or hide it (its copies stay). |
library.import |
Copy library items (components, styles, variables, collections) and their dependencies into this file. |
library.updates |
For each library: current, updates (with the changed components, styles and variables) or missing. |
library.accept |
Take a library’s update into this file: all changes, or the chosen ids (one undo step). |
library.search |
Find components, variables and styles of this file and its libraries by name, description and usage. |
library.publish |
Mark this file as a library of the workspace (document.library), or stop publishing it. |
library.list#
List Libraries. Libraries this file uses (with update status) and the workspace libraries it could add.
Since 0.4 · read-only · licence read
added: the libraries of tree.libraries with their status (current, updates, missing) and imported counts. available: other .design files of the workspace that publish a library (document.library), then the ud.libraries setting’s files, 50 per page (–offset). get_libraries is built on it (CLI-001 §3.10).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--offset |
integer | ≥ 0 | ||
--limit |
integer | ≥ 1, ≤ 200 |
ud library.list --jsonlibrary.add#
Add Library. Use another .design file’s library: by path, document id or library name.
Since 0.4 · mutates · licence paid
Adds a library reference (VAR-7, op library.add): the path relative to this file, the library’s document id and its tree hash as acceptedHash. Nothing is copied yet: library.import (or instance.create / style.apply of a library item) takes what the file uses.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--path |
string | |||
--documentId |
string | |||
--name |
string |
ud library.add --path ../design-system.design
ud library add "Starter DS"library.remove#
Remove Library. Stop using a library: its reference and copies go; references fall back to plain values.
Since 0.4 · mutates · licence paid
Removes the library reference and its imported copies (op library.remove). Bindings and styles that named its items fall back to their plain values; instances of its components show “Missing component”.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--library |
string | yes | A library of this file: its lib-… id, name, document id or path. |
ud library.remove --library "Starter DS"library.enable#
Enable Library. Offer a library in the Assets panel and searches, or hide it (its copies stay).
Since 0.4 · mutates · licence paid
Sets enabled (op library.update). A disabled library is not searched and not offered; what the file already uses keeps working.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--library |
string | yes | A library of this file: its lib-… id, name, document id or path. | |
--enabled |
boolean | yes |
ud library.enable --library "Starter DS" --enabled falselibrary.import#
Import from Library. Copy library items (components, styles, variables, collections) and their dependencies into this file.
Since 0.4 · mutates · licence paid
Takes items of a library into tree.libraries[…].imported (FMT-001 §4.11) through a library.accept event: a component with its descendants and the components, styles and variables it uses; a style with its variables; a variable with its collection and alias targets; a collection with its variables. Items are named by id or name. Then refer to them with qualified ids: lib-…/nd-… (instance.create), lib-…/st-… (style.apply), lib-…/vr-… (node.bind).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--library |
string | yes | A library of this file: its lib-… id, name, document id or path. | |
--ids |
string[] | yes |
ud library.import --library "Starter DS" --ids '["Button", "color"]'
ud library.import --library lib-1f3b5d7a9c0e --ids '["vr-7b9d1f3a5c7e"]'library.updates#
Library Updates. For each library: current, updates (with the changed components, styles and variables) or missing.
Since 0.4 · read-only · licence read
Compares each library’s current tree hash with acceptedHash (VAR-8) and lists what accepting would change in the copies this file uses: [{kind, id, name, change: added|changed|removed}].
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--library |
string | A library of this file: its lib-… id, name, document id or path. |
ud library updates
ud library.updates --library "Starter DS" --jsonlibrary.accept#
Accept Library Update. Take a library’s update into this file: all changes, or the chosen ids (one undo step).
Since 0.4 · mutates · licence paid
Writes library.accept (FMT-001 §5.11.7) with the new copies and the library’s current tree hash. –ids accepts some changes only (VAR-8); the hash then stays, so the rest is still offered. Without –library every library with updates.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--library |
string | A library of this file: its lib-… id, name, document id or path. | ||
--ids |
string[] |
ud library accept
ud library.accept --library "Starter DS" --ids '["st-4d6f8a0c2e1b"]'library.search#
Search Design System. Find components, variables and styles of this file and its libraries by name, description and usage.
Since 0.4 · read-only · licence read
The search_design_system engine (CLI-001 §3.9): one result list per query, ranked by name, description, aliases (code syntax, property names) and usage. Keys are local ids, or qualified ids lib-…/… for library items (library.import or instance.create take them). –libraries limits to library keys (document ids) or lib-… ids; “local” is this file.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--queries |
object[] | yes | ||
--libraries |
string[] | |||
--limit |
integer | ≥ 1, ≤ 100 |
ud library.search --queries '[{"entity": "component", "query": "button"}, {"entity": "variable", "query": "surface"}]'library.publish#
Publish as Library. Mark this file as a library of the workspace (document.library), or stop publishing it.
Since 0.4 · mutates · licence paid
Writes document.library {name, description} (FMT-001 §4.2, VAR-7): other .design files of the workspace then list it (library.list, get_libraries) and can add it. Items with hiddenFromPublishing are not offered. –unpublish removes it.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--name |
string | |||
--description |
string | |||
--unpublish |
boolean |
ud library.publish --name "Starter DS" --description "Tokens, text styles and base components"
ud library publish --unpublishComponents#
| Command | Summary |
|---|---|
component.create |
Turn frames into components (Ctrl+Alt+K); other layers are wrapped in a frame first. |
component.combine |
Combine components into a component set whose variants they become. |
component.addProperty |
Add a text, boolean, instance swap or slot property to a component or component set. |
component.editProperty |
Rename a component property or change its default, description or preferred values. |
component.deleteProperty |
Remove a component property definition. |
component.bindLayer |
Drive a layer’s text, visibility or nested instance by a component property (componentPropertyReferences). |
component.restore |
Put a deleted main component back from its snapshot (Figma’s “Restore component”). |
component.list |
The components and component sets of the file and of its libraries, for the Assets panel and scripts. |
components.usage |
Instances of this file’s components here and in the workspace’s design files, detached copies, top overrides. |
component.create#
Create Component. Turn frames into components (Ctrl+Alt+K); other layers are wrapped in a frame first.
Since 0.4 · mutates · licence paid · selection
Create component (CMP-1, FMT-001 §5.11.3): a FRAME becomes a COMPONENT with the same id, so nothing that refers to it breaks. Any other layer (a group, a shape, text, an instance) is first wrapped in a frame of its bounds, which then becomes the component. With several targets, –mode each (the default) makes one component per target (“Create multiple components”); –mode single wraps them all in one frame, one component. –name names the components. A component already selected stays as it is. Layers of an instance cannot become components (detach first).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--mode |
“each” | “single” | "each" |
One component per target, or one for all of them. | |
--name |
string | Name of the new components. |
ud component.create --node "Screens/Login/Button"
ud component.create --query 'frame[name^="Icon/"]'
ud component.create --nodes '["nd-7b9d1f3a5c4e","nd-8c0e2a4b6d5f"]' --mode single --name Cardcomponent.combine#
Combine as Variants. Combine components into a component set whose variants they become.
Since 0.4 · mutates · licence paid · selection
Combine as variants (CMP-1, CMP-4, FMT-001 §5.11.3): a new COMPONENT_SET takes the components, in their order, as variants. The set is a vertical auto layout (gap 16, padding 16) placed where they were. Variant properties come from the components’ names, “Size=md, State=Default”: every variant must name the same properties. Components whose names are not variant names (none of them may be) become “Property 1=
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--name |
string | Name of the set (default “Component Set”). |
ud component.combine --query 'component[name^="Size="]' --name Button
ud component.combine --nodes '["nd-7b9d1f3a5c4e","nd-8c0e2a4b6d5f"]'component.addProperty#
Add Component Property. Add a text, boolean, instance swap or slot property to a component or component set.
Since 0.4 · mutates · licence paid · selection
Adds a component property definition (CMP-5, FMT-001 §4.8): the key is “
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | The component or component set (a variant means its set). | ||
--name |
string | yes | ||
--type |
“TEXT” | “BOOLEAN” | “INSTANCE_SWAP” | “SLOT” | “VARIANT” | yes | ||
--defaultValue |
any | TEXT: string, BOOLEAN: boolean, INSTANCE_SWAP: component reference, VARIANT: a value. | ||
--description |
string | |||
--preferredValues |
object[] | INSTANCE_SWAP: the components offered first ({type, key}, key a component id). |
ud component.addProperty --node "Components/Button" --name Label --type TEXT --defaultValue Button
ud component.addProperty --node nd-8a3f1c5e7b92 --name "Show icon" --type BOOLEAN --defaultValue falsecomponent.editProperty#
Edit Component Property. Rename a component property or change its default, description or preferred values.
Since 0.4 · mutates · licence paid · selection
Edits a component property definition (CMP-5). –key takes the key or the name. Renaming keeps the 4-hex suffix, so the key becomes “
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | The component or component set (a variant means its set). | ||
--key |
string | yes | The property key or name. | |
--name |
string | |||
--defaultValue |
any | |||
--description |
string | |||
--preferredValues |
object[] | INSTANCE_SWAP: the components offered first ({type, key}, key a component id). |
ud component.editProperty --node "Components/Button" --key Label --name Text --defaultValue "Sign in"
ud component.editProperty --node nd-8a3f1c5e7b92 --key "Show icon#5d02" --description "Leading icon"component.deleteProperty#
Delete Component Property. Remove a component property definition.
Since 0.4 · mutates · licence paid · selection
Deletes a component property (CMP-5, FMT-001 §5.11.3 component.property.delete). Layer references to it and values in instances stay and have no effect. Deleting a VARIANT property also removes it from the variants’ names.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | The component or component set (a variant means its set). | ||
--key |
string | yes | The property key or name. |
ud component.deleteProperty --node "Components/Button" --key "Show icon"component.bindLayer#
Bind Layer to Property. Drive a layer’s text, visibility or nested instance by a component property (componentPropertyReferences).
Since 0.4 · mutates · licence paid · selection
Writes componentPropertyReferences on a layer inside a component (FMT-001 §4.4.5, CMP-5): characters ← a TEXT property (a text layer), visible ← a BOOLEAN property, mainComponent ← an INSTANCE_SWAP property (a nested instance). –key takes the key or the name; null unbinds.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A layer inside a component. | ||
--property |
“characters” | “visible” | “mainComponent” | yes | ||
--key |
string or null | yes | The property key or name; null removes the binding. |
ud component.bindLayer --node "Components/Button/Label" --property characters --key Label
ud component.bindLayer --node nd-2b7d9e4f6a10 --property visible --key "Show icon#5d02"component.restore#
Restore Component. Put a deleted main component back from its snapshot (Figma’s “Restore component”).
Since 0.4 · mutates · licence paid
A main component deleted while instances used it lives on as a snapshot in tree.deletedComponents (FMT-001 §4.16), and its instances render from it. component.restore puts the snapshot’s nodes back with their ids: under –parent when given, else where it was, else on its old page. Instances need no change.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--id |
string | yes | The deleted component’s id (a key of tree.deletedComponents). | |
--parent |
string | Where to put it (default: where it was). | ||
--after |
string | A sibling to place it after (with –parent). |
ud component.restore --id nd-8a3f1c5e7b92
ud component.restore --id nd-8a3f1c5e7b92 --parent "Components"component.list#
List Components. The components and component sets of the file and of its libraries, for the Assets panel and scripts.
Since 0.4 · read-only · licence read
Lists what can be instantiated (CMP-7): standalone components and component sets (with their variants and the values of each, so variant pickers can be built), their property definitions (key, name, type, default, variant options), description, documentation links and instance count. Library components (tree.libraries[*].imported) come after the local ones with qualified ids. –page limits the local ones to a page; –query filters by name (case-insensitive substring); –libraries false leaves libraries out. Deleted components are not listed.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--page |
string | A page id (pg-…) or a page name. | ||
--query |
string | Case-insensitive part of the name. | ||
--libraries |
boolean | true |
ud component.list
ud component.list --query button --jsoncomponents.usage#
Component Usage. Instances of this file’s components here and in the workspace’s design files, detached copies, top overrides.
Since 0.6 · read-only · licence read
CMP-9: for each component and component set of this file (or –component): the instances in this file, the instances in every other .design file of the workspace that uses this file as a library (by document id), the frames that are detached copies (from the WAL’s instance.detach events and frames named like the component), and the overrides used most (property values as property:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--component |
string | A component or set (id or name). |
ud components usage
ud components.usage --component Button --jsonInstances#
| Command | Summary |
|---|---|
instance.create |
Place an instance of a component (local, from a library, or a variant of a set). |
instance.setProperties |
Set component property values on instances; a variant property switches the variant. |
instance.reset |
Reset all overrides of instances, those of one layer, or single properties. |
instance.swap |
Show another component in instances, keeping the overrides whose layers match by name. |
instance.detach |
Turn instances into frames whose layers are real nodes (Ctrl+Alt+B). |
instance.push |
Copy an instance’s overrides into its main component, then reset them (“Push changes to main component”). |
instance.main |
The main component of an instance: id, name, where it comes from, set and variant values. |
instance.create#
Create Instance. Place an instance of a component (local, from a library, or a variant of a set).
Since 0.4 · mutates · licence paid
Creates an INSTANCE (CMP-2, FMT-001 §4.8): its layers are derived from the main component and follow it. –component takes an id, a library-qualified id (lib-…/nd-…), a name, or “Set/Prop=Value, …” for a variant; –variant and the VARIANT entries of –properties pick a variant too; the other –properties entries (by key or name) set TEXT, BOOLEAN and INSTANCE_SWAP values. Without –parent the instance goes on the main component’s page (next to it), or on the first page.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--component |
string | yes | A component: its id, a library-qualified id (lib-…/nd-…), a name, or a set and variant (“Button/Size=lg, State=Default”). | |
--parent |
string | The page or frame to place it in. | ||
--after |
string | A sibling to place it after. | ||
--x |
number | |||
--y |
number | |||
--name |
string | |||
--variant |
string or object | “Size=lg, State=Default” or {“Size”:“lg”}. | ||
--properties |
object | Property values by key or name: TEXT a string, BOOLEAN a boolean, INSTANCE_SWAP a component; a VARIANT property picks the variant. |
ud instance.create --component Button --parent "Screens/Login" --x 24 --y 320 --properties '{"Label":"Sign in"}'
ud instance.create --component "Button/Size=lg, State=Default"
ud instance.create --component lib-1f3b5d7a9c0e/nd-8a3f1c5e7b92instance.setProperties#
Set Instance Properties. Set component property values on instances; a variant property switches the variant.
Since 0.4 · mutates · licence paid · selection
Sets the instance’s componentProperties (CMP-5) by key or name: TEXT a string, BOOLEAN true/false, INSTANCE_SWAP a component. A VARIANT property (CMP-4) switches the instance to the variant with the new values (the other variant properties keep theirs); overrides whose layers match by name in the new variant are kept, the others dropped. A nested instance (a derived id) takes the change as an override of the outer instance.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--properties |
object | yes | Property values by key or name: TEXT a string, BOOLEAN a boolean, INSTANCE_SWAP a component; a VARIANT property picks the variant. |
ud instance.setProperties --node "Screens/Login/Sign in" --properties '{"Label":"Log in","Show icon":true}'
ud instance.setProperties --query 'instance[of="Button"]' --properties '{"Size":"lg"}'instance.reset#
Reset Overrides. Reset all overrides of instances, those of one layer, or single properties.
Since 0.4 · mutates · licence paid · selection
“Reset all overrides” and per-property reset (CMP-3, FMT-001 §5.11.4 instance.reset). On an instance: without –path and –keys every override goes (dormant ones too); –path resets one layer (an override path such as nd-2b7d9e4f6a10 or nd-5a1c3e7f9b20/nd-0d2f4b6a8c1e); –keys resets those properties only, and without –path also the instance’s own stored properties of those names. On a layer of an instance (a derived id) it resets that layer.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--path |
string | An override path under the instance. | ||
--keys |
string[] | Only these properties. |
ud instance.reset --node "Screens/Login/Sign in"
ud instance.reset --node nd-e7a9c1b3d5f0/nd-2b7d9e4f6a10 --keys '["fills"]'instance.swap#
Swap Instance. Show another component in instances, keeping the overrides whose layers match by name.
Since 0.4 · mutates · licence paid · selection
Swap instance (CMP-6, FMT-001 §5.11.4 instance.swap): the instance’s main component becomes –component; overrides of layers that have a layer with the same names in the new component are kept, the others dropped. A nested instance — given as a derived id, or as –path under the instance — swaps as an override of the outer instance.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text | ||
--component |
string | yes | A component: its id, a library-qualified id (lib-…/nd-…), a name, or a set and variant (“Button/Size=lg, State=Default”). | |
--path |
string | A nested instance’s override path. |
ud instance.swap --node "Screens/Login/Sign in" --component "Button/Size=lg"
ud instance.swap --node nd-e7a9c1b3d5f0 --path nd-5a1c3e7f9b20 --component Icon/Closeinstance.detach#
Detach Instance. Turn instances into frames whose layers are real nodes (Ctrl+Alt+B).
Since 0.4 · mutates · licence paid · selection
Detach instance (CMP-6, FMT-001 §5.11.4 instance.detach): the instance becomes a FRAME with the same id, its main component’s root properties copied onto it, and its layers — as they show, properties and overrides applied — become real nodes with new ids. Nested instances stay instances (with the overrides that reached them). Content placed in slots moves under the new slot nodes. Works on instances of deleted and library components too.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--nodes |
string[] | |||
--query |
string | A selector (CLI-001 §6): frame[name^=“Login”] > text |
ud instance.detach --node "Screens/Login/Sign in"
ud instance.detach --query 'instance[of="Card"]'instance.push#
Push Changes to Main Component. Copy an instance’s overrides into its main component, then reset them (“Push changes to main component”).
Since 0.4 · mutates · licence paid · selection
CMP-3 “Push changes to main component”: the instance’s overrides are written into the main component’s layers (a nested instance’s into that instance’s overrides in the main component), its own changed properties (fills, size, …; not its name or position) into the main component’s root, and the instance is reset. –keys limits it to those properties. The main component must be in this file (not a library copy or a deleted component). Returns the main component id, the override paths pushed and the root properties pushed.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. | ||
--keys |
string[] |
ud instance.push --node "Screens/Login/Sign in"instance.main#
Go to Main Component. The main component of an instance: id, name, where it comes from, set and variant values.
Since 0.4 · read-only · licence read · selection
“Go to main component” (CMP-6): the component an instance shows. source is “local” (a node of this file), “deleted” (the snapshot of a deleted component, FMT-001 §4.16; component.restore brings it back) or “library” (an imported copy; libraryId names the library). Works on nested instances (derived ids) too.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. |
ud instance.main --node "Screens/Login/Sign in" --jsonComments#
| Command | Summary |
|---|---|
comment.add |
Start a comment thread pinned to a node or to a point of a page. |
comment.reply |
Reply to a comment thread. |
comment.update |
Edit a comment’s message, mentions or meta, or move a thread’s pin. |
comment.react |
Add or remove your reaction (+1, eyes, tada, …) on a comment. |
comment.resolve |
Resolve a comment thread, or reopen it with –resolved false. |
comment.delete |
Delete a comment; deleting a thread deletes its replies. |
comment.list |
Comment threads with their replies, pins and reactions, filtered by page, node, state or person. |
comment.add#
Add Comment. Start a comment thread pinned to a node or to a point of a page.
Since 0.6 · mutates · licence free
COL-3, FMT-001 §4.13. –node pins the thread to a node (it follows the node; –offset {x, y} from the node’s top-left corner, or –x/–y on the page, converted to an offset; default the corner); –page with –x and –y pins it to a point. Mentions: @Name or @“Two Words” in the message, and –mentions. Review findings carry –category, –severity (info, warning, error) and –finding-id, stored in the comment’s meta (a UI Designer extension of the format) so the comments panel can filter them and offer “Apply fix”. The author and time are the event’s (git author or –as).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | The node to pin the thread to (id, name path or ud:// link). | ||
--page |
string | A page id (pg-…) or a page name. | ||
--x |
number | Page x of the pin. | ||
--y |
number | Page y of the pin. | ||
--offset |
object | With –node: the pin’s offset from the node’s top-left corner. | ||
--message |
string | yes | The text; mention people with @Name or @“Two Words”. | |
--mentions |
string[] | Names mentioned (git authors), in addition to the @mentions of the message. | ||
--category |
string | Review finding category (accessibility, contrast, spacing, naming, …): stored in meta, a UI Designer extension of FMT-001 §4.13. | ||
--severity |
“info” | “warning” | “error” | Review finding severity, stored in meta. | ||
--findingId |
string | The finding’s id (F12, a11y-contrast-3), stored in meta; fixes are described “fix: |
ud comment.add --node "Login/Sign in" --message "Should this be full width on desktop? @Ada"
ud comments add --node nd-8a3f1c5e7b92 --message "Contrast 3.1:1 is below 4.5:1" --category accessibility --severity errorcomment.reply#
Reply to Comment. Reply to a comment thread.
Since 0.6 · mutates · licence free
COL-3. Adds a reply to the thread (a reply’s id names its thread). Replies are ordered by time, then id.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--thread |
string | yes | A comment id (cn-…). pattern ^cn[-:] |
|
--message |
string | yes | The text; mention people with @Name or @“Two Words”. | |
--mentions |
string[] | Names mentioned (git authors), in addition to the @mentions of the message. | ||
--category |
string | Review finding category (accessibility, contrast, spacing, naming, …): stored in meta, a UI Designer extension of FMT-001 §4.13. | ||
--severity |
“info” | “warning” | “error” | Review finding severity, stored in meta. | ||
--findingId |
string | The finding’s id (F12, a11y-contrast-3), stored in meta; fixes are described “fix: |
ud comment.reply --thread cn-8b0d2f4a6c1e --message "Done in 0.6 @Grace"
ud comments reply cn-8b0d2f4a6c1e --message "Fixed"comment.update#
Edit Comment. Edit a comment’s message, mentions or meta, or move a thread’s pin.
Since 0.6 · mutates · licence free
COL-3, FMT-001 §5.11.9. A new message sets editedAt and re-reads its @mentions (with –mentions); –anchor moves a thread’s pin: {nodeId, offset: {x, y}} or {pageId, x, y}.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--comment |
string | yes | A comment id (cn-…). pattern ^cn[-:] |
|
--message |
string | The text; mention people with @Name or @“Two Words”. | ||
--anchor |
object | {nodeId, offset: {x, y}} pinned to a node, or {pageId, x, y} pinned to a point of the page. | ||
--mentions |
string[] | Names mentioned (git authors), in addition to the @mentions of the message. | ||
--category |
string | Review finding category (accessibility, contrast, spacing, naming, …): stored in meta, a UI Designer extension of FMT-001 §4.13. | ||
--severity |
“info” | “warning” | “error” | Review finding severity, stored in meta. | ||
--findingId |
string | The finding’s id (F12, a11y-contrast-3), stored in meta; fixes are described “fix: |
ud comment.update --comment cn-8b0d2f4a6c1e --message "Full width on desktop too? @Ada @Grace"
ud comment.update --comment cn-8b0d2f4a6c1e --anchor '{"pageId":"pg-6f7e8d9c0b1a","x":120,"y":40}'comment.react#
React to Comment. Add or remove your reaction (+1, eyes, tada, …) on a comment.
Since 0.6 · mutates · licence free
COL-3, FMT-001 §5.11.9. Reactions are short codes without colons ("+1", “eyes”; 👍 and :+1: are read as +1); each person reacts once per code. –on true adds, –on false removes, no –on toggles. A separate event from comment.update, so that two people’s reactions on two branches both survive a merge.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--comment |
string | yes | A comment id (cn-…). pattern ^cn[-:] |
|
--reaction |
string | yes | A short code: +1, -1, eyes, tada, heart, rocket, … | |
--on |
boolean | Add (true) or remove (false); default toggles. |
ud comment.react --comment cn-8b0d2f4a6c1e --reaction +1
ud comment.react --comment cn-8b0d2f4a6c1e --reaction eyes --on falsecomment.resolve#
Resolve Thread. Resolve a comment thread, or reopen it with –resolved false.
Since 0.6 · mutates · licence free
COL-3. Sets the thread’s resolved flag (comment.update). A reply’s id resolves its thread. Resolved threads are hidden by ud comments –open and the comments panel’s default filter.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--thread |
string | yes | A comment id (cn-…). pattern ^cn[-:] |
|
--resolved |
boolean | true |
false reopens. |
ud comment.resolve --thread cn-8b0d2f4a6c1e
ud comments resolve cn-8b0d2f4a6c1e --resolved falsecomment.delete#
Delete Comment. Delete a comment; deleting a thread deletes its replies.
Since 0.6 · mutates · licence free
COL-3, FMT-001 §5.11.9. Undo restores the thread with its replies.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--comment |
string | yes | A comment id (cn-…). pattern ^cn[-:] |
ud comment.delete --comment cn-8b0d2f4a6c1ecomment.list#
Comments. Comment threads with their replies, pins and reactions, filtered by page, node, state or person.
Since 0.6 · read-only · licence read
COL-3. Returns {threads: [{id, anchor, position: {pageId, x, y}, resolved, by, at, editedAt?, message, mentions, reactions, meta?, replies: […]}], open, resolved}, ordered by time. position is where the pin is now (a node’s bounds plus the offset). –open leaves out resolved threads; –mine
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--page |
string | A page id (pg-…) or a page name. | ||
--node |
string | Threads pinned to this node or inside it. | ||
--open |
boolean | Only threads that are not resolved. | ||
--mine |
string or boolean | A person’s name (true: the actor): threads they started, replied to or are mentioned in. |
ud comment.list --open --json
ud comments --page Screens --openHandoff and code#
| Command | Summary |
|---|---|
codemap.get |
Code-map entries of the file’s components, or of one component, instance or the instances under a node. |
codemap.set |
Map a component (or set) to a code component and its properties to props. |
codemap.remove |
Remove the code-map entry of a component or component set. |
codemap.suggest |
Propose code-map entries from the workspace’s code components, with confidence. |
codemap.resolve |
The code component and props an instance maps to, with its snippet. |
codemap.list |
Components and sets with whether they are mapped to code and how many instances use them. |
codemap.get#
Get Code Map. Code-map entries of the file’s components, or of one component, instance or the instances under a node.
Since 0.6 · read-only · licence read
DEV-4: the code-map entries (component, source, language, label, props, template; from the file or the ud.codeMap setting) keyed by component id (lib-…/nd-… for library components). With –node: that component’s entry; for a frame or page, the entries its instances use plus {instances: {id: {component, source, label, snippet}}} as get_code_connect_map returns them.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A component, instance, frame or page (default: every component). |
ud codemap.get
ud codemap.get --node "Screens/Login"codemap.set#
Set Code Map Entry. Map a component (or set) to a code component and its properties to props.
Since 0.6 · mutates · licence paid
DEV-4 (add_code_connect_map): writes codeMap on the component or component set (an instance names its main component’s set). –componentName is the code component (Button, x-button), –source its file, –label Figma’s Code Connect label (React, Web Components, Vue, SwiftUI, Compose, …) or –language (tsx, js, swift, kotlin). –props maps component property keys to props: {“Size”: {“prop”: “size”, “values”: {“sm”: “sm”}}, “Label#1b68”: {“prop”: “children”}, “Icon#4274”: {“prop”: “icon”, “when”: true}}. –template (with –templateDataJson) replaces the rendering: {{name}} takes a prop, a property name, children or a template data key. Library components are mapped in their library file or in the ud.codeMap setting.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--component |
string | yes | A component or component set (id, lib-…/nd-… or name), or an instance (its main component’s set). | |
--componentName |
string | yes | The code component’s name (or custom element tag). | |
--source |
string | Its source file, relative to the workspace root. | ||
--language |
string | tsx, jsx, ts, js, html, vue, svelte, swift, kotlin, dart. | ||
--label |
“React” | “Web Components” | “Vue” | “Svelte” | “Storybook” | “Javascript” | “Swift” | “Swift UIKit” | … | |||
--props |
object | Component property key (Size, Label#1b68) → {prop, values?, when?}. | ||
--template |
string | A snippet template with {{placeholders}} (Code Connect). | ||
--templateDataJson |
string | JSON data the template can use. |
ud codemap.set --component Button --componentName Button --source src/components/Button.tsx --label React --props '{"Size": {"prop": "size"}, "Label#1b68": {"prop": "children"}}'
ud codemap set Button Button src/ui/Button.tsxcodemap.remove#
Remove Code Map Entry. Remove the code-map entry of a component or component set.
Since 0.6 · mutates · licence paid
DEV-4: deletes codeMap from the component or set (entries in the ud.codeMap setting stay).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--component |
string | yes | A component or component set (id, lib-…/nd-… or name), or an instance (its main component’s set). |
ud codemap.remove --component Buttoncodemap.suggest#
Suggest Code Map Entries. Propose code-map entries from the workspace’s code components, with confidence.
Since 0.6 · read-only · licence read
DEV-4 (get_code_connect_suggestions): scans the workspace for code components — TS/JS exports (export function Button, export const Button =, export default), custom element registrations (customElements.define(“x-button”, …)), SwiftUI views and Compose functions — and matches them to the design components by name and property names. Each suggestion has a confidence (0–1) and a proposed props mapping; confirm one with codemap.set.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | A component or component set (id, lib-…/nd-… or name), or an instance (its main component’s set). | ||
--min |
number | Lowest confidence listed (default 0.4). ≥ 0, ≤ 1 |
ud codemap.suggest
ud codemap suggest --node Buttoncodemap.resolve#
Resolve Code Map. The code component and props an instance maps to, with its snippet.
Since 0.6 · read-only · licence read
DEV-4: resolves an instance through its component’s code-map entry (ud.codeMap first, then the file): Button(Size=sm, Label=“Go”) with {“Size”: {“prop”: “size”}, “Label#1b68”: {“prop”: “children”}} gives {component: “Button”, props: {size: “sm”}, children: “Go”, snippet: “<Button size="sm">Go”}.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--node |
string | yes | A node id (nd-… or nd:…), a name path from the page (Home/Header/Logo), or a ud:// link. |
ud codemap.resolve --node "Screens/Login/Submit"codemap.list#
List Code Map. Components and sets with whether they are mapped to code and how many instances use them.
Since 0.6 · read-only · licence read
DEV-4 (list_file_components_for_code_connect): every component and component set (library copies too), mapped or not, with the code component, source and label of its entry and the number of instances in this file.
Takes no parameters.
ud codemap listSession and AI#
| Command | Summary |
|---|---|
proposal.list |
The editor’s proposals (AI panel turns, –proposal auto sessions): id, actor, label, status, fork point and head. |
proposal.open |
Fork the open document into a new proposal; writes that name its id go to the fork, not the file. |
proposal.review |
The change list of a proposal (text changes, renames, hidden nodes, plugin data called out), changed frames and conflicts. |
proposal.accept |
Apply a proposal to the document as one undo step, rebased over the edits made since it was forked. |
proposal.discard |
Drop a proposal: nothing of it reaches the document; the agent’s next call gets conflict. |
proposal.list#
List Proposals. The editor’s proposals (AI panel turns, –proposal auto sessions): id, actor, label, status, fork point and head.
Since 0.7 · read-only · licence read · editor host only
AI-5. Proposals are forks of the open document held by the editor: an AI panel turn, or an external agent’s ud mcp –proposal auto session, writes into one; the user accepts or discards it. Lists the open ones first, then the recently closed ones: {proposals: [{id, actor, label, mode, status: working|review|accepted|discarded, baseSeq, baseHash, seq, hash, groups, events, nodesCreated}]}. Only the live editor answers.
Takes no parameters.
ud proposal list
ud proposal.list --jsonproposal.open#
Open Proposal. Fork the open document into a new proposal; writes that name its id go to the fork, not the file.
Since 0.7 · read-only · licence read · editor host only
AI-5, ai-agents §6.5 step 1. The editor forks the document at its current seq and returns {id, baseSeq, baseHash}; calls that carry the id (ud mcp –proposal
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--label |
string | What the proposal is for (the prompt’s first line). | ||
--mode |
“panel” | “auto” | "panel" |
panel: the AI panel; auto: an external agent’s session. | |
--model |
string | The model that writes it (shown in the Accept label). | ||
--actor |
string | Who writes into it (default: the caller’s actor). | ||
--maxNodesCreated |
integer | Nodes one turn may create. ≥ 0 |
ud proposal.open --label "Login screen" --jsonproposal.review#
Review Proposal. The change list of a proposal (text changes, renames, hidden nodes, plugin data called out), changed frames and conflicts.
Since 0.7 · read-only · licence read · editor host only
ai-agents §6.5 step 3, §6.1 step 4. Returns {proposal, changes: {groups: [{kind, frame, rows}], counts, summary}, frames: [{nodeId, name, change, before?, after?, overlay?}], conflicts: [{nodeId, property, userValue, proposalValue}]}. The kinds text, rename, hidden, pluginData, codeMap, description and comment come first; then added, changed, removed, moved. –images adds before/after PNGs (data URLs) of each changed top-level frame.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--id |
string | yes | The proposal id (pp- and 12 hex), from proposal.list. pattern ^pp-[0-9a-f]{12}$ |
|
--images |
boolean | Include before/after images (data URLs). | ||
--size |
integer | Image size on the long side (default 512). ≥ 32, ≤ 2048 |
ud proposal review pp-4b8e1d2c7a90
ud proposal.review --id pp-4b8e1d2c7a90 --images --jsonproposal.accept#
Accept Proposal. Apply a proposal to the document as one undo step, rebased over the edits made since it was forked.
Since 0.7 · mutates · licence paid · editor host only
ai-agents §6.5 step 4. The proposal’s events are re-applied on the current document and committed as one undo group signed by the proposal’s actor (“AI panel ·
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--id |
string | yes | The proposal id (pp- and 12 hex), from proposal.list. pattern ^pp-[0-9a-f]{12}$ |
|
--label |
string | The undo label’s text (default: the proposal’s label). | ||
--useProposalValues |
object[] | Conflicts where the proposal’s value wins. |
ud proposal accept pp-4b8e1d2c7a90
ud proposal.accept --id pp-4b8e1d2c7a90 --useProposalValues '[{"nodeId":"nd-…","property":"name"}]'proposal.discard#
Discard Proposal. Drop a proposal: nothing of it reaches the document; the agent’s next call gets conflict.
Since 0.7 · read-only · licence read · editor host only
ai-agents §6.5 step 5. The fork is dropped. An agent still writing into it is answered conflict (proposal_discarded) so it re-reads; with –proposal auto its next write opens a new proposal.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--id |
string | yes | The proposal id (pp- and 12 hex), from proposal.list. pattern ^pp-[0-9a-f]{12}$ |
ud proposal discard pp-4b8e1d2c7a90