init command initializes your project and installs dependencies. It creates a components.json file and sets up your project for shadcn/ui.
Usage
Arguments
Names, URL, or local path to components to install during initialization.
Options
The template to use. Available options:
next- Next.jsstart- TanStack Startvite- Vitenext-monorepo- Next.js Monorepo
The base color to use. Available options:
neutralgrayzincstoneslate
Skip confirmation prompt.
Use default configuration.
Force overwrite of existing configuration.
The working directory. Defaults to the current directory.
Mute output.
Use the src directory when creating a new project.
Do not use the src directory when creating a new project.
Use CSS variables for theming.
Do not use CSS variables for theming.
Do not install the base shadcn style.
Enable RTL (right-to-left) support.
Examples
Basic initialization
Initialize with defaults
Initialize with specific template and color
Initialize with components
Initialize with RTL support
Initialize in a specific directory
Output
The command creates acomponents.json file in your project root with your configuration:
What it does
- Detects your project framework and configuration
- Prompts for configuration options (style, base color, paths, etc.)
- Creates
components.jsonwith your preferences - Installs the base style (if not disabled)
- Installs any specified components
- Updates Tailwind configuration if needed