Documentation
¶
Overview ¶
Command figma-map maps Figma design components to code components using a vision LLM, producing a reviewable binding and deterministic codegen.
Directories
¶
| Path | Synopsis |
|---|---|
|
Command bench scores how close an implementation is to a Figma design using an INDEPENDENT metric (pixel diff), so it does not favor figma-map's own reconcile oracle.
|
Command bench scores how close an implementation is to a Figma design using an INDEPENDENT metric (pixel diff), so it does not favor figma-map's own reconcile oracle. |
|
Package cmd wires the figma-map CLI.
|
Package cmd wires the figma-map CLI. |
|
internal
|
|
|
binding
Package binding models the persistent figma-map.binding.yaml artifact that maps a Figma component library to a code component library.
|
Package binding models the persistent figma-map.binding.yaml artifact that maps a Figma component library to a code component library. |
|
clibind
Package clibind binds a typed input struct to cobra flags and positional arguments using struct tags, so a single struct defines parameters for both the CLI and the MCP tool (whose JSON schema the MCP SDK derives from the same struct).
|
Package clibind binds a typed input struct to cobra flags and positional arguments using struct tags, so a single struct defines parameters for both the CLI and the MCP tool (whose JSON schema the MCP SDK derives from the same struct). |
|
codegen
Package codegen renders a JSX snippet from a matched component binding and a set of inferred prop values.
|
Package codegen renders a JSX snippet from a matched component binding and a set of inferred prop values. |
|
codegen/ir
Package ir defines the target-neutral tree that Service.Codegen builds by walking a Figma node.
|
Package ir defines the target-neutral tree that Service.Codegen builds by walking a Figma node. |
|
codegen/targets/htmlrender
Package htmlrender renders the codegen ir.Node tree as standalone HTML: real style="" attributes (kebab-case CSS), HTML-entity text escaping, no component-import wrapper.
|
Package htmlrender renders the codegen ir.Node tree as standalone HTML: real style="" attributes (kebab-case CSS), HTML-entity text escaping, no component-import wrapper. |
|
codegen/targets/jsx
Package jsx renders the codegen ir.Node tree as TSX: JSX markup with camelCase inline style object literals.
|
Package jsx renders the codegen ir.Node tree as TSX: JSX markup with camelCase inline style object literals. |
|
config
Package config loads figma-map configuration from a YAML file with environment-variable overrides.
|
Package config loads figma-map configuration from a YAML file with environment-variable overrides. |
|
figma
Package figma defines the domain model for a Figma document and the Source interface that abstracts where that data comes from.
|
Package figma defines the domain model for a Figma document and the Source interface that abstracts where that data comes from. |
|
llm
Package llm wraps an OpenAI-compatible chat client for vision calls that return structured JSON.
|
Package llm wraps an OpenAI-compatible chat client for vision calls that return structured JSON. |
|
matcher
Package matcher decides which code component a Figma image corresponds to.
|
Package matcher decides which code component a Figma image corresponds to. |
|
op
Package op is the convergence layer: each operation is declared once as an Op[In,Out], and both the CLI subcommand and the MCP tool are generated from it.
|
Package op is the convergence layer: each operation is declared once as an Op[In,Out], and both the CLI subcommand and the MCP tool are generated from it. |
|
release
Package release fetches and verifies figma-map release artifacts from GitHub Releases — shared by cmd/update.go (the CLI binary itself) and internal/service (the backend bundle and Figma plugin bundle), so all three components agree on one download/checksum/extract implementation instead of three copies drifting apart.
|
Package release fetches and verifies figma-map release artifacts from GitHub Releases — shared by cmd/update.go (the CLI binary itself) and internal/service (the backend bundle and Figma plugin bundle), so all three components agree on one download/checksum/extract implementation instead of three copies drifting apart. |
|
render
Package render drives headless Chrome to render the agent's output and read the real, computed values from the DOM.
|
Package render drives headless Chrome to render the agent's output and read the real, computed values from the DOM. |
|
scaffold
Package scaffold bootstraps figma-map into a target project: the skill, a starter config, MCP server registration, and a CLAUDE.md section.
|
Package scaffold bootstraps figma-map into a target project: the skill, a starter config, MCP server registration, and a CLAUDE.md section. |
|
service
Package service holds all of figma-map's logic behind one type.
|
Package service holds all of figma-map's logic behind one type. |
|
storybook
Package storybook builds a catalog of code components by reading a running Storybook's index.json, screenshotting each story, and parsing the real import statement from the story source file.
|
Package storybook builds a catalog of code components by reading a running Storybook's index.json, screenshotting each story, and parsing the real import statement from the story source file. |
Click to show internal directories.
Click to hide internal directories.

