Pull Figma files into agent-readable local folders
Project description
ExtraFigma
A pull-only CLI that converts Figma files into agent-readable local folders. Drop the output into your project and let Claude Code (or any AI coding agent) implement pixel-perfect frontend code from the design.
Install
pip install extrafigma
# or
uvx extrafigma --help
Quick start
extrafigma pull "https://www.figma.com/design/abc123/My-App" ./my-design
On first run you'll be prompted for a Figma Personal Access Token. Get one at Figma → Settings → Security → Personal Access Tokens (scopes needed: file_content:read, file_metadata:read).
The token is stored at ~/.config/extrafigma/credentials.json and reused for all future pulls.
What gets extracted
my-design/
CLAUDE.md ← instructions for AI agents
index.md ← overview of all pages and frames
tokens/
colors.json ← named color styles → hex values
typography.json ← named text styles → font properties
assets/
icon-name.svg ← exported SVG icons (VECTOR nodes)
pages/
Page-1/
page.md
Hero.frame.json ← distilled layout tree (CSS-friendly)
Hero.png ← 2× frame render (visual ground truth)
frame.json structure
Every frame is distilled to a CSS-friendly layout tree:
{
"type": "FRAME",
"name": "Hero",
"width": 1440,
"height": 900,
"layout": { "mode": "flex", "direction": "column", "gap": 24 },
"background": "colors/brand-primary",
"borderRadius": 0,
"children": [
{
"type": "TEXT",
"content": "Welcome",
"style": "typography/heading-xl",
"color": "colors/gray-800"
}
]
}
Named Figma Styles become tokens (colors/brand-primary, typography/heading-xl). Raw hex values that weren't saved as styles are flagged with # not in tokens.
Auth commands
extrafigma auth login # interactive prompt
extrafigma auth login --pat <token> # non-interactive (CI-friendly)
extrafigma auth status # check stored PAT
extrafigma auth logout # remove stored PAT
Rate limits
Figma's REST API limits GET /v1/files calls based on your seat type:
| Seat | Limit |
|---|---|
| View / Collab | 6 per month |
| Dev / Full (Starter) | 10 per minute |
| Dev / Full (Professional) | 15 per minute |
Use an account with an editor seat on the file for meaningful usage.
Known limitations
- Design tokens require named Figma Styles. If the designer applied colors directly without saving them as named styles, tokens will be empty. Variables (Figma Professional+) are not supported — use Styles instead.
- SVG export skips remote library components. Icons that are instances of components from external shared libraries cannot be exported via the REST API. They'll appear as
INSTANCEnodes in the frame JSON. - x/y positions are canvas-space coordinates. For absolute-layout frames, subtract the parent's x/y to get relative positions.
How it works
GET /v1/files/:key— fetches the full document tree- Batch-fetches style node data to resolve exact color/font values
- Distills each top-level frame to a CSS-friendly JSON tree
- Exports frame PNGs at 2× resolution
- Exports VECTOR nodes as SVGs in a second pass
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file extrafigma-0.1.2.tar.gz.
File metadata
- Download URL: extrafigma-0.1.2.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d93509aa0c7d15e27cedc733148de88fab1c35c8845e030fa5c8837b576b514b
|
|
| MD5 |
2c49d663d065db82f17dc5027ee3f2a5
|
|
| BLAKE2b-256 |
d3fd5331be6045ddbb1d42c320724d6e72fdf581bbf5f1331d9a6f046f20b4a8
|
File details
Details for the file extrafigma-0.1.2-py3-none-any.whl.
File metadata
- Download URL: extrafigma-0.1.2-py3-none-any.whl
- Upload date:
- Size: 20.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a987794921a1275bc7fdaf5172f487f95e691c8547d7a2791f1050ca910e3de
|
|
| MD5 |
f65bcca6b2514a3a4fa7ffbb743a6c33
|
|
| BLAKE2b-256 |
007390a8e3bc4d7bcfcb996b471428f7c4c4516b4e6f647dbf507a528f3ad9c2
|