Registries
specui get — pulling shadcn/ui and custom registry items into your contract.
specui get downloads registry items into an existing SpecUI contract. It's not a replacement for load, which imports an entire tree — the two solve different problems:
| Command | Use when |
|---|---|
specui load | You want an entire .specui/ from git, npm, or a directory |
specui get | You want one or more registry components plus their vendored source files |
Prerequisites
You need a consumer project with a .specui/ folder already in place:
npx specui init --preset web-app
npx specui validate .specuiList available items (shadcn)
npx specui get --list
npx specui get --list --from shadcnListing needs network access to reach the registry.
Install components
npx specui get button
npx specui get button card dialog
npx specui get --style default buttonHere's what happens under the hood:
- Registry metadata is resolved, including dependencies (installed automatically)
- Files land under
.specui/components/<name>/vendor/ - The component manifest is updated
syncruns to refreshregistry.json
If the component already exists and you want to replace it:
npx specui get button --forceCustom registry URL
Any URL serving the same JSON shape as shadcn registry items works:
npx specui get --from https://example.com/r/my-widget.json
npx specui get --url https://example.com/r/my-widget.jsonOffline, point at a local file:
npx specui get --from file:///path/to/item.jsonPlatforms are inferred from file extensions (.tsx, .vue, .dart, …).
Platform hint
npx specui get button --platform reactUseful when a registry serves multiple targets (.tsx, .vue, .dart) and you want to be explicit. Common values: react, vue, flutter — get infers from file paths by default.
After get
Always verify what you just pulled in:
npx specui validate .specui --strict
npx specui list componentsOne thing worth being clear about: agents still have to follow the tokens and rules in .specui/. Vendor code is reference material, not permission to bypass the spec.
vs application install (shadcn CLI)
| shadcn CLI in app | specui get | |
|---|---|---|
| Output | components/ui/ in app | .specui/.../vendor/ + manifest |
| Purpose | Runnable UI | Design record + reference source |
| Validation | App tests | specui validate |
The two aren't mutually exclusive. SpecUI holds the contract; the app holds framework code, mapped to syncTargets in manifests.
Troubleshooting
- Network errors — retry, or use
file://JSON - Missing
.specui— runinitfirst - Validate fails after get — run
sync; check manifest links
See Troubleshooting for more.
Next steps
- Scenarios — shadcn (Scenario E)
- Distribution
- CLI — get
Distribution
Move SpecUI trees between repos with load, link, push, pull, import, export, update, and diff.
Interop
Export SpecUI to DESIGN.md, DTCG, Tailwind, CSS, and JSON — and compare versions.