How to use Shadcn CLI
Built on the official Shadcn UI CLI. Uses the copy-paste philosophy — you own the full source code after installation.
Setup
Visit ui.shadcn.com/create to configure your project. Available options:
| Option | Choices |
|---|---|
| Component Library | Base UI, Radix UI |
| Visual Style | Vega, Maia, Nova, Mira, Lyra |
| Base Color | Neutral, Zinc, Slate, Gray |
| Theme | Neutral, Amber, Blue, Cyan, Emerald, Fuchsia, Green, Indigo, Lime, Orange, Pink |
| Icon Library | Lucide, Tabler Icons, Heroicons, Phosphor Icons, Remix Icon |
| Font | Inter, Noto Sans, Nunito Sans, Figtree |
| Radius | Default, None, Small, Medium, Large |
| Menu Color | Default, Inverted |
| Menu Accent | Subtle, Bold |
CLI Init Commands
# npm
npx shadcn@latest init --preset b0 --base base --template vite
# pnpm
pnpm dlx shadcn@latest init --preset b0 --base base --template vite
# yarn
yarn dlx shadcn@latest init --preset b0 --base base --template vite
# bun
bunx --bun shadcn@latest init --preset b0 --base base --template viteCLI v3 (Recommended) -Namespace Registry
Registry namespace: @shadcndashboard -includes free and premium layout blocks, components, and templates.
Configure components.json -Free Access
{
"registries": {
"@shadcndashboard": {
"url": "https://shadcndashboard.dev/r/{name}.json"
}
}
}Premium Access
{
"registries": {
"@shadcndashboard": {
"url": "https://shadcndashboard.dev/r/{name}.json",
"params": {
"email": "${EMAIL}",
"license_key": "${LICENSE_KEY}"
}
}
}
}.env file
EMAIL={YOUR_EMAIL}
LICENSE_KEY={YOUR_LICENSE_KEY}Credentials: your account email + license key from shadcndashboard.dev dashboard.
Security: Never commit credentials. Add .env to .gitignore.
Installing Components
CLI v3
npx shadcn@latest add @shadcndashboard/button-06
npx shadcn@latest add @shadcndashboard/product-cardCLI v2
npx shadcn@latest add https://shadcndashboard.dev/r/button-01.jsonMultiple items
npx shadcn@latest add @shadcndashboard/button-06 @shadcndashboard/product-cardForce overwrite
npx shadcn@latest add @shadcndashboard/button-06 --overwritePackage manager variants: npm=npx, pnpm=pnpm dlx, yarn=yarn dlx, bun=bunx
Troubleshooting
Block Not Found
Check the component name spelling.
Access Denied
Missing EMAIL or LICENSE_KEY environment variables.
Invalid Credentials
Wrong email or license key.
Best Practices
- Use CLI v3
- Keep credentials secure -never commit them
- Regularly update the CLI
- Customize components after installation -you own the code