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
Release files for extrafigma 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| extrafigma-0.1.2.tar.gz | 18.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| extrafigma-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.3 kB
Release files / extrafigma-0.1.2.tar.gz
| Download URL | extrafigma-0.1.2.tar.gz |
|---|---|
| Size | 18.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d93509aa0c7d15e27cedc733148de88fab1c35c8845e030fa5c8837b576b514b
|
|
BLAKE2b-256 checksum How to use checksums |
d3fd5331be6045ddbb1d42c320724d6e72fdf581bbf5f1331d9a6f046f20b4a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / extrafigma-0.1.2-py3-none-any.whl
| Download URL | extrafigma-0.1.2-py3-none-any.whl |
|---|---|
| Size | 20.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a987794921a1275bc7fdaf5172f487f95e691c8547d7a2791f1050ca910e3de
|
|
BLAKE2b-256 checksum How to use checksums |
007390a8e3bc4d7bcfcb996b471428f7c4c4516b4e6f647dbf507a528f3ad9c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|