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 init
pnpm dlx rareui@latest init
yarn dlx rareui@latest init
bunx rareui@latest init

add

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-button

diff

Check for differences between your local components and the registry versions.

npx rareui@latest diff
pnpm dlx rareui@latest diff
yarn dlx rareui@latest diff
bunx rareui@latest diff

Options

OptionDescription
-y, --yesSkip confirmation prompts.
-o, --overwriteOverwrite existing files.
-c, --cwd <cwd>The current working directory.
-p, --path <path>The path to install the component to.
-h, --helpDisplay 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.