Direct API Workflow
If your team is on a Figma Organization or Enterprise plan, you can use the Direct API workflow. This is the fastest and most automated way to sync your design system — no plugin export step required.
The Workflow
Because Enterprise/Org plans have access to the Figma Variables REST API, ptb scan fetches everything — components, layout, and tokens — in a single command.
1. Store your token
ptb token set your_figma_token_here
This stores the token in ~/.config/calibrate-ds/credentials.json. It works for both the CLI and the MCP server, across all IDEs, without any environment variable management.
2. Run the scan
ptb scan
Or from your AI IDE: "Run ptb scan"
3. Generate and sync
ptb generate-tokens
ptb generate-components
ptb export context # commit these files — AI IDEs read from .ptb/context/
CI environments: use an env var instead of
ptb token seton shared machines —export FIGMA_ACCESS_TOKEN=.... PTB checks the env var first, so it always wins over the credentials file.
This workflow is ideal for CI/CD since it requires zero manual exports from Figma.
Next Steps
If you are on a Pro or Starter plan, see the Plugin Export Workflow instead. Otherwise, continue to Generation Features.