CLI reference
The lerpa-cli package copies components and blocks from the registry into your project. Both binary names work: lerpa and lerpa-cli. Run it without installing via pnpm dlx, npx, or bunx.
init
Initialize Lerpa UI in your project. Detects your package manager, prompts for your CSS path, Tailwind config path, and import aliases, then writes lerpa.json and creates a cnhelper if one doesn't exist. Run this first.
pnpm dlx lerpa-cli initadd <name>
Fetch and install a single component or block by its registry id, resolving any registry dependencies. The source is written into components/ui (or components/blocks for blocks).
pnpm dlx lerpa-cli add buttonFlags
- -y, --yes
- Skip the confirmation prompt and write files immediately.
list
List every available item in the registry, grouped into atomic UI components (registry:ui) and interactive blocks (registry:block), with their dependencies.
pnpm dlx lerpa-cli listsearch [query]
Search the registry by name. With no query it returns everything; with a query it filters to matching ids. Useful for discovering the right add id from the terminal.
pnpm dlx lerpa-cli search chartupdate [name]
Re-pull components to their latest registry versions. Pass a name to update one component, or omit it to scan your components/ui and components/blocks folders and update every installed item.
pnpm dlx lerpa-cli update buttonupdate overwrites the matching files. If you customized a component, review the changes (e.g. via git diff) before committing.
theme
Apply a color theme's CSS-variable values into your global stylesheet. For a visual, interactive alternative, use the Theme Studio.
pnpm dlx lerpa-cli themedoctor
Run diagnostics on your setup — verifies that lerpa.json exists and that the configured CSS, Tailwind, and alias paths resolve. Handy when addisn't writing where you expect.
pnpm dlx lerpa-cli doctorinfo
Print CLI metadata (version, license, repository, docs) and, if present, your local project's resolved aliases.
pnpm dlx lerpa-cli infoConfiguration details live in Configuration, and the same registry powers the MCP server for AI agents.