Skip to content

figma

figma comments

List and post comments on Figma files.

figma comments list

List all comments on a Figma file.

Arguments

NameTypeRequiredDescription
fileKeystringyesFigma file key (from the file URL)

Environment Variables

NameTypeRequiredDefaultDescription
FIGMA_API_KEYstringyesFigma personal access token

Options

FlagTypeDefaultDescription
--formatstringjsonOutput format: json or table

Output

Type: unknown

Examples

sh
# List comments as JSON
figma comments list abc123 --format json

# List comments as table
figma comments list abc123 --format table

figma comments post

Post a comment on a Figma file.

Arguments

NameTypeRequiredDescription
fileKeystringyesFigma file key (from the file URL)

Environment Variables

NameTypeRequiredDefaultDescription
FIGMA_API_KEYstringyesFigma personal access token

Options

FlagTypeDefaultDescription
--messagestringComment text (required)
--node-idstringPin comment to a specific node ID

Output

Type: unknown

Examples

sh
# Post a general comment
figma comments post abc123 --message Looks good!

# Post a comment pinned to a node
figma comments post abc123 --message Check this spacing --node-id 1:42

figma components

List and inspect published Figma components.

figma components get

Get details for a specific published component.

Arguments

NameTypeRequiredDescription
fileKeystringyesFigma file key
componentKeystringyesComponent key

Environment Variables

NameTypeRequiredDefaultDescription
FIGMA_API_KEYstringyesFigma personal access token

Options

FlagTypeDefaultDescription

Output

FieldTypeRequiredDescription
keystringyes
namestringyes
descriptionstringyes
foundbooleanyes

Examples

sh
# Get details for a specific component
figma components get abc123FileKey comp:456

figma components list

List published components in a Figma file.

Arguments

NameTypeRequiredDescription
fileKeystringyesFigma file key

Environment Variables

NameTypeRequiredDefaultDescription
FIGMA_API_KEYstringyesFigma personal access token

Options

FlagTypeDefaultDescription

Output

FieldTypeRequiredDescription
componentsarrayyes
components[].keystringyes
components[].namestringyes
components[].descriptionstringyes
totalnumberyes

Examples

sh
# List all published components
figma components list abc123FileKey

figma files

Query Figma file metadata.

figma files get

Get metadata for a Figma file.

Arguments

NameTypeRequiredDescription
fileKeystringyesFigma file key (from the file URL)

Environment Variables

NameTypeRequiredDefaultDescription
FIGMA_API_KEYstringyesFigma personal access token

Options

FlagTypeDefaultDescription
--formatstringjsonOutput format: json or table

Output

FieldTypeRequiredDescription
namestringyes
lastModifiedstringyes
versionstringyes
thumbnailUrlstringno
pagesarrayyes
pages[].idstringyes
pages[].namestringyes

Examples

sh
# Get file metadata for a Figma file
figma files get abc123XYZ

figma files list

List files in a Figma project.

Environment Variables

NameTypeRequiredDefaultDescription
FIGMA_API_KEYstringyesFigma personal access token

Options

FlagTypeDefaultDescription
--project-idstringFigma project ID
--formatstringjsonOutput format: json or table

Output

FieldTypeRequiredDescription
projectNamestringyes
filesarrayyes
files[].keystringyes
files[].namestringyes
files[].lastModifiedstringyes
files[].thumbnailUrlstringno
countnumberyes

Examples

sh
# List files in a Figma project
figma files list --project-id 12345

figma frames

Export frame metadata and render frame images from Figma files.

figma frames export

List all top-level frames in a Figma file.

Arguments

NameTypeRequiredDescription
fileKeystringyesFigma file key (from the file URL)

Environment Variables

NameTypeRequiredDefaultDescription
FIGMA_API_KEYstringyesFigma personal access token

Options

FlagTypeDefaultDescription
--pagestringFilter to frames on a specific page
--formatstringjsonOutput format: json or table

Output

Type: unknown

Examples

sh
# List frames in a file
figma frames export abc123 --format json

# List frames on the Home page
figma frames export abc123 --page Home --format table

figma frames render

Download rendered images of specific frames from a Figma file.

Arguments

NameTypeRequiredDescription
fileKeystringyesFigma file key (from the file URL)

Environment Variables

NameTypeRequiredDefaultDescription
FIGMA_API_KEYstringyesFigma personal access token

Options

FlagTypeDefaultDescription
--idsstringComma-separated node IDs to render
--image-formatstringpngImage format: png or svg (default: png)
--scalenumber2Image scale 1-4 (default: 2)
--outputstring.Output directory (default: current directory)

Output

Type: unknown

Examples

sh
# Render frames as 2x PNG
figma frames render abc123 --ids 1:2,3:4 --image-format png --scale 2 --output .

figma nodes

Inspect Figma file nodes.

figma nodes get

Get details for a specific node in a Figma file.

Arguments

NameTypeRequiredDescription
fileKeystringyesFigma file key (from the file URL)
nodeIdstringyesNode ID (e.g. "1:2")

Environment Variables

NameTypeRequiredDefaultDescription
FIGMA_API_KEYstringyesFigma personal access token

Options

FlagTypeDefaultDescription
--depthnumber1How deep into the node tree to display children (default: 1)
--formatstringjsonOutput format: json or table

Output

FieldTypeRequiredDescription
idstringyes
namestringyes
typestringyes
boundingBoxobjectno
boundingBox.xnumberyes
boundingBox.ynumberyes
boundingBox.widthnumberyes
boundingBox.heightnumberyes
childrenarrayyes
children[].idstringyes
children[].namestringyes
children[].typestringyes
childCountnumberyes

Examples

sh
# Inspect a node with 2 levels of children
figma nodes get abc123XYZ 1:2 --depth 2

figma tokens

Extract design tokens from Figma files.

figma tokens export

Extract design tokens from a Figma file.

Arguments

NameTypeRequiredDescription
fileKeystringyesFigma file key

Environment Variables

NameTypeRequiredDefaultDescription
FIGMA_API_KEYstringyesFigma personal access token

Options

FlagTypeDefaultDescription
--formatstringdtcgOutput format: dtcg (W3C DTCG), flat (key-value), json (raw intermediate)
--filterstringExtract only specific token types
--outputstringWrite output to file instead of stdout

Output

Type: unknown

Examples

sh
# Export tokens in DTCG format
figma tokens export abc123FileKey --format dtcg

# Export only color tokens in flat format
figma tokens export abc123FileKey --format flat --filter colors