CLI Reference
AsheeUI ships a command-line interface for scaffolding, configuring, listing components, and diagnosing or repairing projects.
Installation
The CLI is published as @asheeui/cli and exposes the asheeui command. Add it as a dev dependency in your project, or run it on demand with npx:
pnpm add -D @asheeui/cliOnce installed, invoke it with npx:
Command overview
| Command | Aliases | Description |
|---|---|---|
init | i | Initialize AsheeUI in your project (idempotent) |
list | ls, l | List all available AsheeUI components |
doctor | doc, dr | Check your project for AsheeUI setup issues |
fix | f | Automatically repair issues found by doctor |
Commands
init
Scaffolds AsheeUI in your project: creates the config file, installs dependencies, adds the style imports to your global CSS, and wraps your root layout.
This command is idempotent: running it multiple times safely checks for existing configuration before writing and will never duplicate code or imports.
Options
| Option | Type | Description |
|---|---|---|
-t, --template <name> | string | Template to use (default: "default") |
--yes | flag | Skip interactive prompts and use defaults |
-h, --help | flag | Show help for command |
Removed flag: The legacy --local flag (local monorepo workspace dependencies) was removed. Dependencies now resolve normally through your package manager.
What it does
- Detects your framework (Next.js, TanStack Start, or Vite + React)
- Checks for existing setup elements to prevent duplicate imports
- Creates
asheeui.config.tsin your project root (skipped if one already exists) - Safely appends
@import "asheeui/styles"to your global CSS file if missing - Wraps your root component with
AsheeUIProviderand import theconfig - Installs missing peer dependencies using your detected package manager (
npm,pnpm,yarn, orbun)
Example
list
Lists all available UI components directly from the asheeui library package (an installed copy, a local registry path, or the package source in this monorepo).
Options
| Option | Type | Description |
|---|---|---|
-d, --dir <path> | string | Project directory used to locate the asheeui package (default: current directory) |
--path <path> | string | Path to an asheeui package root or local registry folder |
--json | flag | Output the component list as JSON |
-h, --help | flag | Show help for command |
Example
doctor
Checks your project for common AsheeUI configuration issues and provides diagnostic output.
Options
| Option | Type | Description |
|---|---|---|
-d, --dir <path> | string | Project directory to scan (default: current directory) |
-h, --help | flag | Show help for command |
What it checks
- Config file existence (
asheeui.config.tsor.jsin the project root orsrc/) - Global CSS style import (
@import "asheeui/styles") - Required peer dependencies (
react,react-dom,tailwindcss,clsx,tailwind-merge) AsheeUIProviderwrapping in the root entrypoint- Optional theme augmentation (
AsheeThemeNameRegistry): informational
Example
fix
Automatically resolves and repairs setup issues detected by the doctor command.
Options
| Option | Type | Description |
|---|---|---|
-d, --dir <path> | string | Project directory to fix (default: current directory) |
--skip-install | flag | Do not run package-manager installs (only apply file changes) |
-h, --help | flag | Show help for command |
What it fixes
- Appends missing
@import "asheeui/styles"to your global CSS (or createssrc/index.css) - Generates a default
asheeui.config.tsif missing - Wraps your root with
AsheeUIProvider - Installs missing peer dependencies automatically with your detected package manager (
--skip-installdisables this)
Example
Configuration file
The CLI creates asheeui.config.ts in your project root:
See Configuration for all available options.
Troubleshooting
Running init multiple times
The CLI safely checks file contents and strings before applying changes. Running npx asheeui init multiple times will not duplicate CSS directives, plugin registrations, or configuration wrappers.
CLI fails to detect framework
Ensure you are running asheeui commands from your project root directory where package.json is located.
Configuration or style issues
If component styles are missing or provider errors occur:
- Run
npx asheeui doctorto diagnose the issue. - Run
npx asheeui fixto automatically repair missing files or imports.