Command Line Interface
Use the CLI to initialize, add, update, and remove components with ease.
init
Use the init command to initialize project configuration, the starwind.config.json file, and install dependencies.
pnpx starwind@latest initnpx starwind@latest inityarn dlx starwind@latest initYou’ll be asked a few questions to configure your project.
┌ Welcome to the Starwind CLI│◇ What is your components directory?│ src/components│◇ Where would you like to add the Tailwind .css file?│ src/styles/starwind.css│◇ What Tailwind base color would you like to use?│ Neutral (default)│◇ Select your preferred package manager│ pnpm│◇ Install tailwindcss@latest, @tailwindcss/vite@latest, @tailwindcss/forms@latest, tailwindcss-animate@latest, @tabler/icons@latest using pnpm?│ Yes│◇ Packages installed successfully│◇ Created project structure│◇ Astro config setup completed│◇ Created Tailwind configuration│◇ Updated project starwind configuration│◇ Next steps ─────────────────────────────────────────────────────╮│ ││ Make sure your layout imports the src/styles/starwind.css file ││ │├──────────────────────────────────────────────────────────────────╯│└ Enjoy using Starwind UI 🚀init options
Usage: starwind init [options]
Initialize your project with Starwind
Options: -d, --defaults Use default values for all prompts -h, --help display help for commandadd
Use the add command to add components to your project.
pnpx starwind@latest add [components]npx starwind@latest add [components]yarn dlx starwind@latest add [components]If you don’t specify any components, you will get a list of all available components to choose from.
┌ Welcome to the Starwind CLI│◆ Select components to add│ ◻ accordion│ ◻ alert│ ◻ badge│ ◻ button│ ◻ card│ ◻ checkbox│ ◻ dialog│ ◻ input│ ◻ label│ ◻ select│ ...└add options
Usage: starwind add [options] [components...]
Add Starwind components to your project
Arguments: components The components to add (space separated)
Options: -a, --all Add all available components -h, --help display help for commandupdate
Use the update command to update components in your project.
Caution
This will overwrite any local changes to the component.
pnpx starwind@latest update [components]npx starwind@latest update [components]yarn dlx starwind@latest update [components]If you don’t specify any components, you will get a list of all available components to choose from.
┌ Welcome to the Starwind CLI│◆ Select components to update│ ◻ accordion│ ◻ alert│ ◻ badge│ ◻ button│ ◻ card│ ◻ checkbox│ ◻ dialog│ ◻ input│ ◻ label│ ◻ select│ ...└update options
Usage: starwind update [options] [components...]
Update Starwind components to their latest versions
Arguments: components The components to update (space separated)
Options: -a, --all Update all installed components -y, --yes Skip confirmation prompts -h, --help display help for commandremove
Use the remove command to remove components from your project.
pnpx starwind@latest remove [components]npx starwind@latest remove [components]yarn dlx starwind@latest remove [components]If you don’t specify any components, you will get a list of all available components to choose from.
┌ Welcome to the Starwind CLI│◆ Select components to remove│ ◻ accordion│ ◻ alert│ ◻ badge│ ◻ button│ ◻ card│ ◻ checkbox│ ◻ dialog│ ◻ input│ ◻ label│ ◻ select│ ...└remove options
Usage: starwind remove [options] [components...]
Remove Starwind components from your project
Arguments: components The components to remove (space separated)
Options: -a, --all Remove all installed components -h, --help display help for commandchangelog
v1.10.0
- Update
tailwind-variantsinstallation to ^3.0.0 - Update installed styles for new projects
v1.5.2
- Remove svg experimental flag for Astro v5.7.0 and above.
v1.4.0
- Change Astro config setting for SVG’s from “sprite” to “inline” to reflect Astro’s deprecation of the SVG sprite importing option as of v5.6.0. To manually update your setup, change the astro config file toexport default defineConfig({// other settingsexperimental: {svg: true,},});
- Add “—yes” option to the update command, allowing you to skip all confirmation prompts when updating components