Sync design tokens between Figma and the codebase. Supports push (tokens → Figma), pull (Figma → tokens), and full sync.
Manages the bidirectional sync of design tokens between packages/tokens/ and Figma.
The user will invoke this as /token-sync [direction] where direction is:
push — send local tokens to Figma (default if no direction given)pull — pull variables from Figma and update local token filessync — push then rebuild tokens (full pipeline)Check that .env exists at the repo root with FIGMA_TOKEN and FIGMA_FILE_KEY.
If it doesn't exist or vars are missing, stop and tell the user.
cd E:/Work/void-ui && node figma-sync/push-to-figma.js
Then report: how many variables were pushed, any errors.
cd E:/Work/void-ui && node figma-sync/pull-from-figma.js
After pulling, show a diff summary of what changed in packages/tokens/tokens/.
cd E:/Work/void-ui && node figma-sync/push-to-figma.js && npm run build:tokens
Report the result of each step. If push fails, do not run build.