Skip to main content
The 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:
  1. Style: Choose between new-york-v4 (Tailwind CSS v4 default) and new-york (Tailwind CSS v3).
  2. Base Color: Select your theme base color (zinc, slate, stone, gray, or neutral).
  3. Global CSS File: Detected automatically from globals.css or index.css; custom paths can be entered.
  4. Import Alias: The import prefix configured in tsconfig.json or jsconfig.json (defaults to @).

Generated Files

Executing init 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.