CLI Reference
Complete reference for the star command-line interface.
The star CLI manages your StarUI components, builds production CSS, and runs the dev server.
Commands
star init
Initialize a new StarUI project. Creates configuration, component directory, Tailwind input CSS, and a starter app file.
Force initialization even if project already set up
Show detailed output
Set the component install directory
Non-interactive mode for CI environments
In non-interactive mode, all prompts are skipped and sensible defaults are used. Useful for CI pipelines and scripted setups.
star add
Add components and blocks to your project. Dependencies are resolved and installed automatically.
One or more component or block names (required)
Overwrite existing files
Show detailed output
Theme for code highlighting components
Override the component install directory
star dev
Start the development server with dual hot reload: Tailwind CSS rebuilds on class changes, and Python code reloads on file saves.
StarHTML app file to run (required)
Port number (default: 5000)
Enable or disable CSS hot reload (default: enabled)
Fail if the detected port is unavailable instead of auto-finding one
Enable or disable debug mode (default: enabled)
Port detection reads your app file for patterns like serve(port=...) and uvicorn.run(port=...). If that port is busy and --strict is off, the next available port is used automatically.
star build
Build production CSS. Downloads a standalone Tailwind binary automatically — no Node.js required.
CSS output path (default: from config or auto-detected)
Minify the output CSS (default: minified)
Show detailed output
The Tailwind binary is downloaded once and cached at ~/.starui/cache/. Subsequent builds reuse the cached binary with zero network overhead.
star list
List all available components and blocks from the registry.
Filter components by name
Show only installed components
Show detailed output with descriptions
star status
Show the status of installed components and blocks. Detects local modifications using checksum comparison against the registry version.
Checksums are computed at install time and stored in .starui/manifest.json. Any local edits to component files will be flagged as modified.
star diff
Show a diff between your local component file and the latest registry version. Useful for reviewing what you've changed.
Component or block name to diff (required)
star update
Update installed components and blocks to the latest registry versions. Skips locally modified files unless forced.
Specific components to update (optional — updates all if omitted)
Overwrite locally modified files
Show detailed output
star sort
Sort Tailwind classes in Python source files for consistent ordering.
Files or directories to sort (optional — defaults to current directory)
Check only — exit code 1 if any changes would be made
Show detailed output
Use --check in CI pipelines as a lint gate. It exits with code 1 if any files have unsorted classes, without modifying them.