Docs › For developers
Syncing
#What sync does
- Builds your Storybook.
- Renders every component and page story in a headless browser, on your machine.
- Compiles what the browser drew into Figma layers, bound to your tokens.
- Checks every open design against the result.
- On the Live branch with everything committed: uploads a Live update, and if the Figma file is open, waits for the plugin to apply it and reports how it went.
#Running it
Ask your agent to "sync". It calls the sync tool, which returns a command with a one-time sign-in ticket, and runs it in your app's folder. From a terminal:
npx @codesignflo/cli syncIt takes a while
A full sync can take a few minutes on a large Storybook. Agents should give it a generous timeout (up to 5 minutes).
#Where it updates Live
| You're on | Sync does |
|---|---|
| The Live branch, everything committed | Uploads a Live update, checks designs. |
| The Live branch, not pulled (behind Live or origin) | Checks designs only, and says to pull first. |
| The Live branch, uncommitted changes | Checks designs only. |
| A connected branch, everything committed | Updates its lane beside Live, checks designs (Branch lanes). |
| Another branch | Checks designs only. --preview shows the branch in Figma once. |
#Options
| Option | Effect |
|---|---|
--only a,b | Update just these components or pages in Live (when building designs one at a time). |
--preview | On a feature branch: show it in Figma beside Live. |
#Next
Reading sync results explains everything sync reports.