CLI
Run every command with your package manager. Prefer npx cubix-ui@latest (or the pnpm / yarn / bun equivalent) so you always get the newest CLI.
initConfigure tokens, utils, and cubix.json - or scaffold a new app with -t.
addCopy components and dependencies into your project.
viewInspect registry items before you install them.
searchFind items in the Cubix registry. list is an alias.
buildGenerate registry JSON from your registry.json.
infoPrint project config for humans and assistants.
init
Configure an existing project, or scaffold a new one with -t (next, vite, start, react-router, astro). Detects your framework, writes design tokens to its CSS entry, adds lib/utils.ts with cn, ensures the @/* alias, and creates cubix.json.
pnpm dlx cubix-ui@latest initScaffold Next.js and initialize Cubix in one step:
pnpm dlx cubix-ui@latest init -t nextOptions:
Usage: cubix-ui init [options] [components...]
initialize your project and install dependencies
Options:
-t, --template <template> scaffold a new project (next, vite, start, react-router, astro)
-b, --base <base> the primitive backend to use (base, radix, aria)
-y, --yes skip confirmation prompts
-f, --force force overwrite of existing configuration
-c, --cwd <cwd> the working directory (default: current directory)
--src-dir use a src/ directory (Next.js template)
--name <name> project name when using --template
-s, --silent mute output
-h, --help display help for commandPass --base aria or --base radix to set the default primitive backend. Framework guides live on Installation.
add
Copy components and their dependencies into your project. Existing files are never replaced unless you pass --overwrite.
pnpm dlx cubix-ui@latest add [component]Add a single component:
pnpm dlx cubix-ui@latest add buttonAdd several at once:
pnpm dlx cubix-ui@latest add button card dialogOverride the project base for one install:
pnpm dlx cubix-ui@latest add button --base ariaOptions:
Usage: cubix-ui add [options] [components...]
add a component to your project
Arguments:
components name, url, or local path to a component
Options:
-b, --base <base> override the project base (base, radix, aria)
-y, --yes skip confirmation prompt
-o, --overwrite overwrite existing files
-c, --cwd <cwd> the working directory (default: current directory)
-a, --all add all available components
-p, --path <path> the path to add the component to
-s, --silent mute output
--dry-run preview changes without writing files
-h, --help display help for commandview
Inspect registry items before installing them - files, dependencies, and metadata.
pnpm dlx cubix-ui@latest view buttonYou can view multiple items in one call:
pnpm dlx cubix-ui@latest view button card dialogOptions:
Usage: cubix-ui view [options] <items...>
view items from the registry before installing them
Arguments:
items the item names or URLs to view
Options:
-c, --cwd <cwd> the working directory (default: current directory)
-h, --help display help for commandsearch
Find components in the Cubix registry. list is an alias.
pnpm dlx cubix-ui@latest search -q "button"Options:
Usage: cubix-ui search|list [options]
search items from the registry
Options:
-q, --query <query> query string
-l, --limit <number> maximum number of items to display (default: 100)
-o, --offset <number> number of items to skip (default: 0)
-c, --cwd <cwd> the working directory (default: current directory)
-h, --help display help for commandbuild
Generate registry JSON files from your registry.json. Output lands in public/r by default - the same shape served by this docs site.
pnpm dlx cubix-ui@latest buildCustomize the output directory:
pnpm dlx cubix-ui@latest build --output ./public/registryOptions:
Usage: cubix-ui build [options] [registry]
build components for a Cubix registry
Arguments:
registry path to registry.json (default: ./registry.json)
Options:
-o, --output <path> destination directory for JSON files (default: ./public/r)
-c, --cwd <cwd> the working directory (default: current directory)
-h, --help display help for commandMore on publishing and schema on the Registry page.
info
Print project configuration from cubix.json - base, aliases, Tailwind CSS entry, and related settings. Pair with Skills so assistants resolve the same context.
pnpm dlx cubix-ui@latest infoOptions:
Usage: cubix-ui info [options]
get information about your project
Options:
-c, --cwd <cwd> the working directory (default: current directory)
--json output as JSON
-h, --help display help for commandRegistry URL
By default the CLI reads the official catalog from https://cubixflow.ir/r. Point it at a mirror, a staging deploy, or a local docs server with the CUBIX_REGISTRY_URL environment variable, or persist it per project under registries.cubix in cubix.json. The environment variable wins when both are set.
CUBIX_REGISTRY_URL=https://registry.example.com/r npx cubix-ui@latest add button