Figma Design creation and editing
React Forge builds a local React model for Figma Design, then applies it only when you explicitly call publish() or a publishing CLI/MCP operation. It uses the official remote Figma MCP server. Connect Figma in Codex or Claude Code first, use the official Figma MCP whoami result to select a plan key, and use that application's existing authorization. Live authentication currently uses macOS Keychain and has been validated on macOS arm64 with Node.js 24; the local Office/PDF six-host support does not establish Figma authentication on every host.
Here selectedPlanKey is the plan key you explicitly selected from the official Figma account response. CredentialSource.Codex, ClaudeCode, and Auto are available; automatic selection stays pinned for the session. React Forge does not refresh or rewrite the connected application's credentials. An expired or rejected credential may be reread once; reconnect Figma in that application if authorization is still unavailable.
Reopen and edit
openFigma() accepts a Design URL or file key string, or a parsed .figma.json receipt object. It does not read a receipt from a path string. refresh({ pageId }) reads a page before inspection; refresh({ pageId, nodeIds }) narrows reads to selected IDs and ancestors, and refresh({ resources: true }) reads variables and styles. Choose an existing target from inspect(), mount only the intended region, then publish. Within a mounted frame, target={remoteId} explicitly selects an existing child. Properties you omit and children you do not select remain under the original author's control; removing an owned container that holds unselected children is rejected.
You can pass a Design URL or file key string directly instead of the parsed receipt. A receipt must contain a fileKey to reopen it this way. The export publishes the selected change and writes a new receipt; it does not create a binary .fig file.
Pages, Auto Layout frames, text, vector shapes, images, components, variants/instances, variables, and styles are available. nodeKey links local component, style, and variable references. Use fonts actually available in the Figma file and register PNG/JPEG images explicitly; Figma image uploads have their own resource limits.
Publication outcomes and receipts
Publication reports complete, partial, or unknown. A .figma.json receipt records the file key and URL when known, plus the revision, confirmed node bindings, image hashes, and outcome; it is not a .fig export and contains no authentication token. Confirmed changes from a partial result can remain on the remote file. A FigmaPublishError also carries its receipt, including when saving the receipt file fails after Figma changed.
For an unknown outcome with a file key, reopen the file from the parsed receipt or its Design URL and inspect the remote result before another write. If create_new_file failed ambiguously, the receipt may have neither fileKey nor url and cannot be passed to openFigma(). Check the selected Figma account and destination for the intended file. Only after you identify the file reliably should you reopen it by its Design URL or key and inspect its contents. If you cannot establish whether creation succeeded, keep the outcome unknown and do not repeat the create operation. Never blindly repeat ambiguous file or node creation. Cancellation prevents later batches but does not undo completed remote changes.
See CLI and MCP for their explicit publication operations. No Figma file is created or changed by ordinary local Office/PDF exports.