CLI
Use the RareUI CLI to manage components.
The RareUI CLI is the fastest way to add components to your project. It handles dependencies, configuration, and placement for you.
Commands
init
Initialize RareUI in your project. This creates a components.json file and configures aliases.
npx rareui@latest initpnpm dlx rareui@latest inityarn dlx rareui@latest initbunx rareui@latest initadd
Add a specific component to your project. This downloads the source code to your components/rareui directory.
npx rareui@latest add [component-name]pnpm dlx rareui@latest add [component-name]yarn dlx rareui@latest add [component-name]bunx rareui@latest add [component-name]Example:
npx rareui@latest add liquid-buttondiff
Check for differences between your local components and the registry versions.
npx rareui@latest diffpnpm dlx rareui@latest diffyarn dlx rareui@latest diffbunx rareui@latest diffOptions
| Option | Description |
|---|---|
-y, --yes | Skip confirmation prompts. |
-o, --overwrite | Overwrite existing files. |
-c, --cwd <cwd> | The current working directory. |
-p, --path <path> | The path to install the component to. |
-h, --help | Display help for command. |
FAQ
Does it work with other frameworks?
Currently, the CLI is optimized for React/Next.js and Tailwind CSS. Support for other frameworks is planned.
Can I use it without the CLI?
Yes! The CLI is purely for convenience. You can always manually copy the code from the documentation.