Figma CLI Setup Figma can be configured headlessly with `kosmokrator integrations:configure figma`.
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash
# Configure and verify this integration.
kosmokrator integrations:configure figma --set access_token=" $FIGMA_ACCESS_TOKEN " --enable --read allow --write ask --json
kosmokrator integrations:doctor figma --json
kosmokrator integrations:status --json Credentials
Authentication type: Bearer token bearer_token. Configure credentials once, then use the same stored profile from
scripts, coding CLIs, Lua code mode, and the MCP gateway.
Call Figma Headlessly Use the generic call form when another coding CLI or script needs a stable universal interface.
kosmo integrations:call figma.figma_delete_comment '{
"file_key": "example_file_key",
"comment_id": "example_comment_id"
}' --json Use the provider shortcut form for shorter human-facing commands.
kosmo integrations:figma figma_delete_comment '{
"file_key": "example_file_key",
"comment_id": "example_comment_id"
}' --json Agent Discovery Commands
These commands return structured output for coding agents that need to inspect capabilities 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 All CLI Functions
Every function below can be called headlessly. The generic form is stable across all integrations;
the provider shortcut is shorter but specific to Figma.
figma.figma_get_component Read read Get a Figma component by its key.
component_key kosmo integrations:call figma.figma_get_component '{"component_key":"example_component_key"}' --json copy kosmo integrations:figma figma_get_component '{"component_key":"example_component_key"}' --json copy
figma.figma_get_components Read read List all components in a Figma file.
file_key kosmo integrations:call figma.figma_get_components '{"file_key":"example_file_key"}' --json copy kosmo integrations:figma figma_get_components '{"file_key":"example_file_key"}' --json copy
figma.figma_get_current_user Read read Get the authenticated Figma user profile. Returns name, email, and account details.
none kosmo integrations:call figma.figma_get_current_user '{}' --json copy kosmo integrations:figma figma_get_current_user '{}' --json copy
figma.figma_get_file Read read Get a Figma file by key. Returns the document tree with pages and nodes.
file_key, ids, depth, geometry, plugin_data kosmo integrations:call figma.figma_get_file '{"file_key":"example_file_key","ids":"example_ids","depth":1,"geometry":"example_geometry","plugin_data":"example_plugin_data"}' --json copy kosmo integrations:figma figma_get_file '{"file_key":"example_file_key","ids":"example_ids","depth":1,"geometry":"example_geometry","plugin_data":"example_plugin_data"}' --json copy
figma.figma_get_file_images Read read Export images from Figma nodes in a file. Returns image download URLs.
file_key, ids, format, scale, svg_include_id_token kosmo integrations:call figma.figma_get_file_images '{"file_key":"example_file_key","ids":"example_ids","format":"example_format","scale":1,"svg_include_id_token":true}' --json copy kosmo integrations:figma figma_get_file_images '{"file_key":"example_file_key","ids":"example_ids","format":"example_format","scale":1,"svg_include_id_token":true}' --json copy
figma.figma_get_file_nodes Read read Get specific nodes from a Figma file by node IDs.
file_key, ids, depth, geometry kosmo integrations:call figma.figma_get_file_nodes '{"file_key":"example_file_key","ids":"example_ids","depth":1,"geometry":"example_geometry"}' --json copy kosmo integrations:figma figma_get_file_nodes '{"file_key":"example_file_key","ids":"example_ids","depth":1,"geometry":"example_geometry"}' --json copy
figma.figma_get_image_fills Read read Get image fill metadata for a Figma file. Returns image URLs for all image fills.
file_key kosmo integrations:call figma.figma_get_image_fills '{"file_key":"example_file_key"}' --json copy kosmo integrations:figma figma_get_image_fills '{"file_key":"example_file_key"}' --json copy
figma.figma_get_me Read read Get the authenticated Figma user profile.
none kosmo integrations:call figma.figma_get_me '{}' --json copy kosmo integrations:figma figma_get_me '{}' --json copy
figma.figma_get_project_files Read read List all files in a Figma project.
project_id, branch_data kosmo integrations:call figma.figma_get_project_files '{"project_id":"example_project_id","branch_data":true}' --json copy kosmo integrations:figma figma_get_project_files '{"project_id":"example_project_id","branch_data":true}' --json copy
figma.figma_get_style Read read Get a Figma style by its key.
style_key kosmo integrations:call figma.figma_get_style '{"style_key":"example_style_key"}' --json copy kosmo integrations:figma figma_get_style '{"style_key":"example_style_key"}' --json copy
figma.figma_get_styles Read read List all styles in a Figma file.
file_key kosmo integrations:call figma.figma_get_styles '{"file_key":"example_file_key"}' --json copy kosmo integrations:figma figma_get_styles '{"file_key":"example_file_key"}' --json copy
figma.figma_get_team_projects Read read List all projects in a Figma team.
team_id kosmo integrations:call figma.figma_get_team_projects '{"team_id":"example_team_id"}' --json copy kosmo integrations:figma figma_get_team_projects '{"team_id":"example_team_id"}' --json copy
figma.figma_list_components Read read List all components in a Figma file. Returns component names, keys, and descriptions.
file_key kosmo integrations:call figma.figma_list_components '{"file_key":"example_file_key"}' --json copy kosmo integrations:figma figma_list_components '{"file_key":"example_file_key"}' --json copy
figma.figma_list_files Read read List Figma files accessible to the authenticated user. Returns file names, keys, and thumbnails with pagination support.
limit, page kosmo integrations:call figma.figma_list_files '{"limit":1,"page":1}' --json copy kosmo integrations:figma figma_list_files '{"limit":1,"page":1}' --json copy
figma.figma_list_projects Read read List all projects in a Figma team. Returns project names and IDs.
team_id kosmo integrations:call figma.figma_list_projects '{"team_id":"example_team_id"}' --json copy kosmo integrations:figma figma_list_projects '{"team_id":"example_team_id"}' --json copy
figma.figma_list_team_components Read read List published components in a Figma team.
team_id, max_depth kosmo integrations:call figma.figma_list_team_components '{"team_id":"example_team_id","max_depth":1}' --json copy kosmo integrations:figma figma_list_team_components '{"team_id":"example_team_id","max_depth":1}' --json copy Function Schemas Use these parameter tables when building CLI payloads without calling integrations:schema first.
Operation Write write
Schema command kosmo integrations:schema figma.figma_delete_comment --json
Operation Read read
Schema command kosmo integrations:schema figma.figma_get_comments --json
Operation Read read
Schema command kosmo integrations:schema figma.figma_get_component --json
Operation Read read
Schema command kosmo integrations:schema figma.figma_get_components --json
Operation Read read
Schema command kosmo integrations:schema figma.figma_get_current_user --json
Operation Read read
Schema command kosmo integrations:schema figma.figma_get_file --json
Operation Read read
Schema command kosmo integrations:schema figma.figma_get_file_images --json
Operation Read read
Schema command kosmo integrations:schema figma.figma_get_file_nodes --json
Operation Read read
Schema command kosmo integrations:schema figma.figma_get_image_fills --json
Operation Read read
Schema command kosmo integrations:schema figma.figma_get_me --json
Operation Read read
Schema command kosmo integrations:schema figma.figma_get_project_files --json
Operation Read read
Schema command kosmo integrations:schema figma.figma_get_style --json
Operation Read read
Schema command kosmo integrations:schema figma.figma_get_styles --json
Operation Read read
Schema command kosmo integrations:schema figma.figma_get_team_projects --json
Operation Read read
Schema command kosmo integrations:schema figma.figma_list_comments --json
Operation Read read
Schema command kosmo integrations:schema figma.figma_list_components --json
Operation Read read
Schema command kosmo integrations:schema figma.figma_list_files --json
Operation Read read
Schema command kosmo integrations:schema figma.figma_list_projects --json
Operation Read read
Schema command kosmo integrations:schema figma.figma_list_team_components --json
Operation Read read
Schema command kosmo integrations:schema figma.figma_post_comment --json Permissions
Headless calls still follow the integration read/write permission policy. Configure read/write defaults
with integrations:configure. Add --force only for trusted automation that should bypass that policy.