SpecUI

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:

CommandUse when
specui loadYou want an entire .specui/ from git, npm, or a directory
specui getYou 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 .specui

List available items (shadcn)

npx specui get --list
npx specui get --list --from shadcn

Listing needs network access to reach the registry.


Install components

npx specui get button
npx specui get button card dialog
npx specui get --style default button

Here's what happens under the hood:

  1. Registry metadata is resolved, including dependencies (installed automatically)
  2. Files land under .specui/components/<name>/vendor/
  3. The component manifest is updated
  4. sync runs to refresh registry.json

If the component already exists and you want to replace it:

npx specui get button --force

Custom 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.json

Offline, point at a local file:

npx specui get --from file:///path/to/item.json

Platforms are inferred from file extensions (.tsx, .vue, .dart, …).


Platform hint

npx specui get button --platform react

Useful when a registry serves multiple targets (.tsx, .vue, .dart) and you want to be explicit. Common values: react, vue, flutterget infers from file paths by default.


After get

Always verify what you just pulled in:

npx specui validate .specui --strict
npx specui list components

One 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 appspecui get
Outputcomponents/ui/ in app.specui/.../vendor/ + manifest
PurposeRunnable UIDesign record + reference source
ValidationApp testsspecui 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 — run init first
  • Validate fails after get — run sync; check manifest links

See Troubleshooting for more.


Next steps

Edit this page on GitHub
On this page

On this page