KosmoKrator

design

Figma CLI for Headless Automation

Use the Figma CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.

20 functions 19 read 1 write Bearer token auth

Figma CLI for Headless Automation

Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.

Use headless automation when another tool needs a stable local command surface. The Figma CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# Figma CLI for Headless Automation
kosmokrator integrations:configure figma --set access_token="$FIGMA_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call figma.figma_delete_comment '{"file_key":"example_file_key","comment_id":"example_comment_id"}' --json

Discovery Before Execution

Agents and scripts can inspect Figma docs and schemas before choosing a function.

kosmo integrations:docs figma --json
kosmo integrations:docs figma.figma_delete_comment --json
kosmo integrations:schema figma.figma_delete_comment --json
kosmo integrations:search "Figma" --json
kosmo integrations:list --json

Useful Figma CLI Functions

FunctionTypeParametersDescription
figma.figma_delete_comment Write file_key, comment_id Delete a comment from a Figma file.
figma.figma_get_comments Read file_key List all comments on a Figma file.
figma.figma_get_component Read component_key Get a Figma component by its key.
figma.figma_get_components Read file_key List all components in a Figma file.
figma.figma_get_current_user Read none Get the authenticated Figma user profile. Returns name, email, and account details.
figma.figma_get_file Read file_key, ids, depth, geometry, plugin_data Get a Figma file by key. Returns the document tree with pages and nodes.
figma.figma_get_file_images Read file_key, ids, format, scale, svg_include_id_token Export images from Figma nodes in a file. Returns image download URLs.
figma.figma_get_file_nodes Read file_key, ids, depth, geometry Get specific nodes from a Figma file by node IDs.
figma.figma_get_image_fills Read file_key Get image fill metadata for a Figma file. Returns image URLs for all image fills.
figma.figma_get_me Read none Get the authenticated Figma user profile.
figma.figma_get_project_files Read project_id, branch_data List all files in a Figma project.
figma.figma_get_style Read style_key Get a Figma style by its key.
figma.figma_get_styles Read file_key List all styles in a Figma file.
figma.figma_get_team_projects Read team_id List all projects in a Figma team.
figma.figma_list_comments Read file_key List all comments on a Figma file. Includes authors, positions, and reply threads.
figma.figma_list_components Read file_key List all components in a Figma file. Returns component names, keys, and descriptions.
figma.figma_list_files Read limit, page List Figma files accessible to the authenticated user. Returns file names, keys, and thumbnails with pagination support.
figma.figma_list_projects Read team_id List all projects in a Figma team. Returns project names and IDs.
figma.figma_list_team_components Read team_id, max_depth List published components in a Figma team.
figma.figma_post_comment Read file_key, message, client_meta, comment_id Post a comment on a Figma file. Can be a top-level comment or a reply.

Automation Notes

Related Figma CLI Pages