Distribution
Move SpecUI trees between repos with load, link, push, pull, import, export, update, and diff.
These commands matter once your design system and your applications live in separate repos — or whenever you need to snapshot a contract and move it somewhere else.
Mental model
| Command | Direction |
|---|---|
load | Copy remote SpecUI into ./.specui |
link | Symlink for live DS editing |
unlink | Remove symlink metadata |
import | Tarball or directory → .specui |
export | .specui → tarball or interop formats |
push / pull | Git publish for a flat DS repo |
update | Re-fetch a recorded source |
diff | Compare token sets between two roots |
Sources are recorded in .specui-sources.yml at the project root, so update knows where things came from.
load — install a full SpecUI
cd my-app
npx specui load git+https://github.com/org/acme-ds.git --as acme
npx specui validate .specui --strictAlso supports:
- Local directory:
specui load ../acme-ds --as acme - npm package (packed SpecUI layout):
specui load @scope/acme-ds --as acme
--force overwrites an existing .specui/.
link — symlink for development
When you're editing the design system and the app at the same time, copying gets tedious. Symlink instead:
npx specui link ../acme-ds --as acme
# edit files in ../acme-ds
cd my-app && npx specui update --name acmeAnd unlink when done:
npx specui unlink --name acmepush / pull — flat design-system repo
From a flat repo (SPEC.md at root, created with specui new):
npx specui push --remote origin --msg "chore: token updates"
npx specui pull --remote originpush may git init if needed; it requires a configured remote or --remote-url.
import / export archive
Export a tarball:
npx specui export --format tarball --to ./acme-specui.tgz --from .specuiImport into an app:
npx specui import ./acme-specui.tgz --forceExport a directory tree (no compression):
npx specui export --format dir --to ./snapshot --from .specuiInterop formats (Tailwind, CSS, …) are covered in Interop.
update — refresh a consumed source
npx specui list sources
npx specui update --name acme
npx specui update --name acme --strictRe-copies from the git or directory source, shows the token diff, and runs validate. Exits 1 if validate fails.
diff — token comparison
npx specui diff --from ./design-system --to ./my-app/.specui
npx specui diff --from ./v1 --to ./v2 --jsonUseful before and after DS upgrades or fork merges — you'll know exactly which tokens changed before anything lands.
list sources
npx specui list sourcesShows installed and linked sources from .specui-sources.yml.
Choosing load vs get
| Need | Command |
|---|---|
Entire .specui/ tree from git/npm/dir | load |
| Single shadcn (or JSON) component + vendor files | get |
See Registries.
Next steps
- Scenarios — flat repo
- Interop — export formats
- CLI reference
CI/CD
Gate pull requests with specui validate, strict mode, and GitHub Actions.
Registries
specui get — pulling shadcn/ui and custom registry items into your contract.