CLI
init
Set up your project for Neobrutal UI. Creates the configuration file, installs base dependencies, and adds the utility functions.
npx neobrutal init
| Option | Description |
|---|---|
| -y, --yes | Skip prompts and use defaults |
| -c, --cwd <path> | Working directory (defaults to current) |
add
Add one or more components to your project. Resolves dependencies and installs required packages automatically.
npx neobrutal add [component...]
| Option | Description |
|---|---|
| -y, --yes | Skip confirmation prompts |
| -o, --overwrite | Overwrite existing files |
| -a, --all | Add all available components |
| -c, --cwd <path> | Working directory |
# Add a single componentnpx neobrutal add button# Add multiple componentsnpx neobrutal add button card dialog# Add all componentsnpx neobrutal add --all
list
Display all components available in the registry.
npx neobrutal list
diff
Compare local components with the registry to check for updates. Useful when you want to see what has changed without overwriting your customizations.
npx neobrutal diff [component]
# Check all installed componentsnpx neobrutal diff# Check a specific componentnpx neobrutal diff button
Configuration
The init command creates a components.json file in your project root. This file tells the CLI where to place components and how to resolve imports.
{"$schema": "https://www.neobrutalui.live/schema.json","style": "default","tailwind": {"config": "tailwind.config.js","css": "app/globals.css","baseColor": "neutral"},"aliases": {"components": "@/components","utils": "@/lib/utils"}}
| Property | Description |
|---|---|
| style | Component style variant |
| tailwind.css | Path to global CSS file |
| aliases.components | Import alias for components |
| aliases.utils | Import alias for utilities |