CLI
The ajaxui CLI scaffolds, adds, and updates Ajax UI components in your project.
Step 1
Installation
Pick whichever install style fits your project. The recommended path is no-install via your package manager runner.
No install — run on demand
Use your package manager's built-in runner. Always pulls the latest version, nothing left on your machine.
npx ajaxui initpnpm dlx ajaxui inityarn dlx ajaxui initbunx ajaxui initInstall globally
Adds the ajaxui and short-form ajx binaries to your PATH.
npm install -g ajaxuipnpm add -g ajaxuiyarn global add ajaxuibun add -g ajaxuiThen call it directly:
ajaxui --version
# or with the short alias
ajx --versionInstall as a dev dependency
Pin the CLI version inside your repo so every contributor and your CI use the same one.
npm install -D ajaxuipnpm add -D ajaxuiyarn add -D ajaxuibun add -d ajaxuiWire it into your package.json scripts:
{
"scripts": {
"ui:add": "ajaxui add",
"ui:update": "ajaxui update",
"ui:doctor": "ajaxui doctor"
}
}Requirements
- Node.js 20.0.0 or later
- npm, pnpm, yarn, or bun
- Tailwind CSS configured in your project
Verify your install
npx ajaxui --version
npx ajaxui doctorStep 2
Usage
With the CLI installed, here's the typical workflow from a fresh project to your first component.
Getting started in three steps
- 1
Initialize the config inside your project
npx ajaxui init - 2
Add the components you need
npx ajaxui add button input card - 3
Import them like any local component
import { Button } from "@/components/ui/button" export default function Page() { return <Button>Get started</Button> }
The examples below use npx; swap for pnpm dlx, yarn dlx, or bunx, or drop the prefix entirely if you installed globally.
Reference
Commands
Every command, what it does, and a couple of common invocations.
init
ajaxui initInitialize Ajax UI in your project — writes ajaxui.config.json, sets up tokens, and prepares the components folder.
Interactive setup
npx ajaxui initPick a framework upfront
npx ajaxui init --framework reactadd
ajaxui add [components...]Add one or more components to your project. Pulls source from the registry and writes them into your components folder.
Add a single component
npx ajaxui add buttonAdd multiple at once
npx ajaxui add button card input badgePick from a list
npx ajaxui addlist
ajaxui listShow every component available in the registry with its category and short description.
List all components
npx ajaxui listFilter by category
npx ajaxui list --category formsupdate
ajaxui update [components...]Update components you've already added to the latest version from the registry.
Update everything
npx ajaxui updateUpdate specific ones
npx ajaxui update button cardpreset
ajaxui preset <command>Apply a theme preset (tokens + component overrides) to your project.
List public presets
npx ajaxui preset listApply one by ID
npx ajaxui preset apply <preset-id>Push your local preset
npx ajaxui preset pushlogin
ajaxui loginAuthenticate the CLI with your Ajax UI account so you can push private presets and access pro features.
Browser-based login
npx ajaxui loginUse an API key
npx ajaxui login --token <api-key>doctor
ajaxui doctorDiagnose your setup — checks Node version, Tailwind config, framework detection, and registry connectivity.
Run a health check
npx ajaxui doctorGetting help
Every command supports --help to print its full usage and flags.
npx ajaxui --help
npx ajaxui add --help
npx ajaxui preset apply --help