Getting Started
The whole sequence
Requires Node.js 20.19+ (Node 22 LTS recommended) — Storybook refuses to start on anything older.
npm install -g @directededges/specs-cli
specs init # workspace + config; add your Figma file keyspecs fetch # pull the library: file, variables, styles, iconsspecs scan # find the componentsspecs generate # write the specsspecs react # emit React (optional)specs webcomponents # emit Web Components (optional)
specs storybook init # scaffold the host, oncecd storybook && npm install && cd ..
specs storybook devThat last command opens a Storybook with your components under Components, your library’s color, icons and typography under Foundations, and a Getting Started page that repeats the refresh loop so you never have to find this page again.
The loop after the first run
specs storybook dev is the one process you keep running. It starts Storybook
and everything that reacts: edit a spec and the transforms re-emit it, edit
config/conventions/storybook.yaml or anything the pages read and they
republish — the open page refreshes itself either way. What stays yours to run,
when the library changes in Figma:
specs fetchspecs generateEverything downstream of those follows on its own. One Ctrl-C stops the whole
thing. (specs storybook without dev is the publish-once form, for scripts
and CI.)
Code emission is optional
Skip specs react and specs webcomponents entirely and everything still
works: component pages show the Specs tab alone, and Foundations build from
the fetched library data. Seeing your system does not require emitting code for
it.
If something refuses to run
specs storybookbeforeinitexplains what to scaffold rather than guessing for you.specs storybook initover an existing host refuses rather than overwriting your edits;--forcerewrites the host files only, never your overrides.