CLI
Search, inspect, install, and update SUI source with shadcn.
SUI uses the shadcn CLI's GitHub registry support. Prepare the consuming application using Installation, then run commands from that application's directory. No registry namespace configuration is required.
Search and inspect
pnpm dlx shadcn@latest search draco-china/sui -q input
pnpm dlx shadcn@latest view draco-china/sui/copy-buttonSearch matches registry names and descriptions. View shows a manifest's files and dependencies before you install it. The registry guide explains the catalog and item formats.
Install source
pnpm dlx shadcn@latest add draco-china/sui/button draco-china/sui/copy-button
pnpm dlx shadcn@latest add draco-china/sui/data-tableThe CLI copies required source files into your configured ui, components (blocks, layouts, viewers, chat and charts), lib, and hooks directories, installs package dependencies, and merges SUI styles into the CSS file in components.json. Files become part of your application and can be edited locally.
Each item carries its local dependency closure. Installing a component does not require first installing the entire library. Use draco-china/sui/sui for the complete collection, draco-china/sui/sui-style for shared CSS, or draco-china/sui/sui-theme for the theme helpers and styles.
Code Editor and the complete collection require the local Monaco worker setup described in compatibility.
Review an update
pnpm dlx shadcn@latest add draco-china/sui/button --dry-run
pnpm dlx shadcn@latest add draco-china/sui/button --diffAn update can affect shared dependencies and CSS as well as the requested component. Compare changes with your local edits before accepting an overwrite. Installation is a source copy; installed files do not automatically follow future changes in the SUI repository.
Validate and select a version
pnpm dlx shadcn@latest registry validate draco-china/sui
pnpm dlx shadcn@latest add draco-china/sui/button#main#ref selects a branch, tag, or commit SHA; omitted refs use the repository default branch. Existing Raw URLs and @sui addresses remain supported; see optional namespace configuration for short addresses.
Common issues
| Symptom | Check |
|---|---|
Unknown @sui registry | Run from the consuming application and check its components.json. |
GitHub returns 404 | Check the configured URL and whether the requested item is available in the registry. |
| Import path differs from a docs example | Follow configured aliases, rather than workspace paths. See import mapping. |
| Missing animation or theme styles | Confirm the configured CSS file is imported by the application. |
| Monaco worker import fails | Use a compatible ?worker loader and include the installed declaration file. |
For installation through an assistant, see MCP. For API and example text, see LLMs.