CLI
Use the createui CLI to add Create UI components to your project.
The createui CLI installs Create UI components into your project as plain source files. It reads your components.json, fetches items from the @createui registry, installs their npm dependencies, and writes the component files under your configured aliases. Once the code lands in your project you own it: edit it like any other file.
The CLI is published as @create-ui/cli. Run it with npx:
All components come from the built-in @createui registry. There is nothing
to configure and no registry to add or select. Reference items by bare name
(add button).
A typical session looks like this:
Commands
Pro components
Some registry items are pro: the registry only serves their source to an authenticated user with a developer seat. Everything else about them is ordinary. They are listed by search like any other item, they install through the same add command, and once the files land in your project they are plain source that you own and edit.
Pro items come in two forms:
- Pro-only components exist only in the pro tier. Adding one requires a developer seat; without it the registry refuses the request.
- Tiered components ship a free and a pro version under the same name. Everyone can
addthem: anonymous users get the free version, seat holders automatically get the richer pro version. The file name and your imports are identical in both cases, so upgrading later is a drop-inadd <name> --overwrite.
Authenticate once per machine with login; every command picks the token up automatically from then on:
If you hit a pro item without being authenticated, the error tells you exactly that and what to do next. Developer seats are available at createui.co/pricing.
Using a token in CI
login needs a browser, so pipelines use the CREATEUI_TOKEN environment variable instead. It takes precedence over the stored token file:
Run login on your own machine, copy the token from ~/.createui/auth.json, and store it as a secret in your CI provider. Tokens belong to your account, not to a project, and stay valid until you revoke them from the CLI tokens page in your dashboard.
The CLI only ever sends the token to the registry it was issued for. Requests to third-party registry URLs never carry it.
init
Use init to set up Create UI in an existing project. It detects your framework, writes components.json, installs dependencies, adds the cn utility, and writes the theme tokens as CSS variables into your global CSS file.
The command asks for your theme choices interactively. Pass the flags to skip the prompts:
You can also install components in the same step:
Themes
A theme is a swappable token set layered on the single Create UI system. You pick two: a primary theme for the accent palette and a neutral theme for backgrounds, text, and borders.
- Primary themes:
indigo(default),blue,lime,green,red,orange,yellow,cyan - Neutral themes:
gray(default),slate,zinc,base,stone - Font variants:
v1(Geist + Geist Mono)
To change the theme later, re-run init with new flags or edit the token variables in your global CSS.
Options
create
Use create to scaffold a brand-new project with Create UI already configured. It prompts for a project name, a template, and your theme choices, then sets everything up.
Available templates:
To start from a preset configuration instead of answering the theme prompts, pass --preset. Use it bare to pick from a list, or pass a preset name or URL directly:
create scaffolds a new project. To set up Create UI inside a project that already exists, use init.
Options
add
Use add to add components and their dependencies to your project. It accepts bare names, URLs, and local paths.
Add several at once:
If a component depends on other registry items (for example, a form control that builds on field), those are added automatically. To replace files you have edited locally, pass --overwrite:
To find out whether installed components are out of date before overwriting anything, use diff.
Adding pro components
Pro components install through the same command once you are authenticated with login. For tiered components, the tier is decided by your authentication: with a developer seat you get the pro version, without one you get the free version. The same command covers both.
To install the free tier on purpose, even while logged in with a seat, pass --free:
Combined with --overwrite, this also downgrades an installed pro version back to free. Note that --free skips authentication for the whole run, so pro-only components fail under it by design.
--all installs the free catalog and skips pro-only components; add those explicitly by name.
Options
login
Use login to authenticate the CLI for pro components. It starts a browser-approved device flow:
The command prints a short confirmation code, opens the approval page in your browser, and waits. Sign in if you are not already, check that the code on the page matches the one in your terminal, and approve the request. The CLI receives its token the moment you approve and stores it in ~/.createui/auth.json, readable only by your user account.
The confirmation code is a safety check: if the code in the browser does not match your terminal, someone else may be trying to get you to approve their request. Deny it.
A few details worth knowing:
- The token belongs to your account, not to a project or workspace. Log in once per machine.
- Login requests expire after ten minutes. If you miss the window, run
loginagain. - The plaintext token exists in exactly two places: your auth file and the request that delivered it. The registry only stores a hash, so a token cannot be recovered later; if you lose it, log in again.
- See and revoke your tokens at any time from the CLI tokens page in your dashboard.
Options
login takes no options. To authenticate non-interactive environments, use the CREATEUI_TOKEN environment variable described in Using a token in CI.
logout
Use logout to remove the saved token from your machine:
This deletes the local copy only. The token itself stays valid until you revoke it from the CLI tokens page in your dashboard, which is the right move if the machine is shared or being retired.
view
Use view to inspect items before adding them. It prints each item's metadata and file contents as JSON, so you can see exactly what add would write into your project.
You can view multiple items at once:
Options
search
Use search to find items in the @createui registry:
Without a query, it lists everything. list is an alias for search:
Use --limit and --offset to page through long result lists.
Options
diff
Use diff to check installed components against the registry. Without an argument, it lists the components that have updates available:
With a component name, it shows what changed upstream:
Review the diff, then decide per component: if you have no local edits, re-add it with add <name> --overwrite; if you do, apply the upstream changes by hand so your edits survive.
Options
migrate
Use migrate to run a codebase migration. List the available migrations first:
Options
info
Use info to print information about your project: the detected framework, the resolved aliases and paths, and the contents of your components.json. Run it when you need to know where components live, which global CSS file holds the tokens, or how imports should be written.
Options
skill
Use skill to install the Create UI agent skill, a bundled guide that teaches AI coding agents how to write correct Create UI code.
By default it installs for Claude Code in your home directory. Use --client for other agents (claude, gemini, codex, agents), --project to install into the current project instead, or --path for an explicit skills directory.
See the Agent Skill page for the full setup guide.
Options
mcp
Use mcp init to set up the Create UI MCP server for your AI assistant, which lets it browse, search, and install components from the registry. It writes the server configuration for the client you pick:
Supported clients: claude, cursor, vscode, codex, opencode.
See the MCP Server page for client-by-client setup and example prompts.