@bao-ui/cli
v2.1.1
Published
CLI for adding Bao UI components from the registry to your project
Maintainers
Readme
@bao-ui/cli
CLI for adding Bao UI components from the registry to your project.
Installation
npm install -g @bao-ui/cli
# or
pnpm add -g @bao-ui/cli
# or
yarn global add @bao-ui/cliUsage
List all available components
bao list
# or
bao lsAdd components to your project
# Add a single component
bao add button
# Add multiple components
bao add button badge input checkbox
# Overwrite existing files
bao add button --overwriteAvailable Components
- button - Displays a button or a component that looks like a button
- badge - Displays a badge or a component that looks like a badge
- input - Displays an input field
- checkbox - A control that allows the user to toggle between checked and not checked
- radio-group - A set of checkable buttons—known as radio buttons
- select - Displays a list of options for the user to pick from
- switch - A control that allows the user to toggle between checked and not checked
- dialog - A window overlaid on either the primary window or another dialog window
- tooltip - A popup that displays information related to an element
How it works
The CLI automatically:
- Detects your project structure - Finds your components directory (
src/components,components, etc.) - Resolves dependencies - Automatically includes required registry dependencies like
utils - Installs components - Copies component files to the correct locations
- Shows dependency instructions - Lists the npm packages you need to install
After adding components, make sure to install the required dependencies:
npm install @base-ui-components/react @radix-ui/react-slot @radix-ui/react-icons class-variance-authority clsx tailwind-mergeFeatures
- 🚀 Fast - Components are copied directly from the registry
- 🔍 Smart - Automatically resolves and includes dependencies
- 🛡️ Safe - Won't overwrite existing files unless you use
--overwrite - 📁 Flexible - Works with different project structures
- 🎨 Base UI - Built for Base UI components with hardcoded Tailwind colors
Examples
# Set up a complete form
bao add input checkbox radio-group select switch button
# Add UI feedback components
bao add badge tooltip dialog
# List what's available
bao listBuilt with ❤️ by Bao To
