init command sets up a project for Sora UI and shadcn-compatible components. It generates the components.json configuration, creates the standard cn utility helper in lib/utils.ts, writes base Tailwind CSS variables, and installs foundational dependencies (clsx, tailwind-merge).
Sora CLI does not strictly require
init before installing components with add — the CLI automatically detects aliases, directories, and package managers on the fly. However, init is ideal for brand-new projects or when you want an explicit, persisted configuration.Usage
Quick Examples
Interactive Prompts
When invoked in an interactive terminal,init prompts for:
- Style: Choose between
new-york-v4(Tailwind CSS v4 default) andnew-york(Tailwind CSS v3). - Base Color: Select your theme base color (
zinc,slate,stone,gray, orneutral). - Global CSS File: Detected automatically from
globals.cssorindex.css; custom paths can be entered. - Import Alias: The import prefix configured in
tsconfig.jsonorjsconfig.json(defaults to@).
Generated Files
Executinginit will establish the following artifacts:
Options
--cwd, -c <path>
Specifies the target workspace directory when working in a monorepo.
--yes, -y
Skips interactive prompts and applies standard defaults (new-york-v4, zinc, @/*).
--defaults, -d
Applies default project configurations without interactive questions.
--force, -f
Overwrites an existing components.json and utility files without confirmation prompts.