init command initializes your project and installs dependencies. It creates a components.json file and sets up your project for shadcn/ui.
Usage
Arguments
string[]
Names, URL, or local path to components to install during initialization.
Options
string
The template to use. Available options:
next- Next.jsstart- TanStack Startvite- Vitenext-monorepo- Next.js Monorepo
string
The base color to use. Available options:
neutralgrayzincstoneslate
boolean
default:"true"
Skip confirmation prompt.
boolean
default:"false"
Use default configuration.
boolean
default:"false"
Force overwrite of existing configuration.
string
The working directory. Defaults to the current directory.
boolean
default:"false"
Mute output.
boolean
default:"false"
Use the src directory when creating a new project.
boolean
Do not use the src directory when creating a new project.
boolean
default:"true"
Use CSS variables for theming.
boolean
Do not use CSS variables for theming.
boolean
Do not install the base shadcn style.
boolean
default:"false"
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