CLI Reference
Complete command reference for the Static UI command-line interface.
The Static UI CLI (static-ui) is the primary gateway for generating components, managing themes, and maintaining your workspace configuration. All commands follow the pnpm dlx static-ui init<command> pattern.
Package Manager Support
Static UI automatically detects your project's package manager during init by scanning for lock files:
If detection fails, you can manually select your package manager during the setup prompt. The selected package manager is stored in your static.json configuration.
initScaffolds a fresh static.json configuration file in your project root. This sets up the workspace engine environment required for all subsequent CLI operations.
Flags
--yes, -y—Accept defaults without prompting--dir <path>—Target directory for initializationadd<component> — Component name (e.g. button, accordion, dialog)
Downloads and injects one or more component primitives directly into your source tree. Components are placed according to the output paths defined in static.json.
Flags
--path <dir>—Override output directory--all—Add all available componentsdoctorRuns a diagnostic check against your workspace to detect configuration issues, missing dependencies, and version mismatches in your static.json setup.
Flags
--fix—Attempt auto-correction of detected issues--verbose—Detailed diagnostic outputtheme<theme-name> — One of: green, blue, zinc, slate, gaming, cyberpunk, modern
Generates or updates CSS theme variable sets from the bundled theme JSON definitions. Applies the selected theme's color tokens to your global stylesheet.
Flags
--output <path>—Write theme CSS to a custom path--list—List all available themessearch<query> — Search term to match against component metadata
Queries the component registry for available primitives matching the provided search terms. Returns matching component names and brief descriptions.
listPrints a formatted inventory of every component available in the registry, optionally filtered by category or installation status.
Flags
--installed—Only show already-installed components--json—Output in JSON formatupdate[component] — Optional specific component to update; omits all
Pulls the latest revisions of installed component files from the upstream registry. Existing files are merged rather than overwritten to preserve local customizations.
Flags
--dry-run—Preview changes without writing files--force—Overwrite local changesdiffCompares your local component files against the latest registry versions and displays a colorized diff of any differences that need reconciliation.
Flags
--stat—Summary statistics only, no full diffinfoDisplays detailed metadata about your Static UI workspace, including installed components, current theme, configuration paths, and version numbers.
Flags
--json—Output all info as JSONmigrateHandles migration of components and configurations between major versions of the CLI. Automatically detects the source version and applies the correct transform pipeline.
Flags
--from <version>—Explicit source version override--dry-run—Preview migration without applying