Docs / CLI Reference
CLI Reference
SubstrateUI uses a named shadcn registry. Configure the namespace once, then install items by name.
Configure the namespace
Add the following block to the root components.json in your application.
{
"registries": {
"@substrateui": "https://substrateui.com/r/{name}.json"
}
}The namespace mapping is required. Passing a bare item URL to the CLI does not give transitive dependencies such as @substrateui/base a namespace to resolve through.
Install an item
npx shadcn@latest add @substrateui/buttonThe registry currently emits five UI items: button, input, number-scrubber, property-inspector, and tree-view. Foundation and theme entries are listed in the registry index.
Test a local registry build
Run the documentation site locally and point a scratch application at its registry endpoint:
{
"registries": {
"@substrateui": "http://localhost:3000/r/{name}.json"
}
}pnpm registry:build
pnpm --filter www dev
# In the scratch app:
npx shadcn@latest add @substrateui/button