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.

Recommended

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 init
pnpm dlx ajaxui init
yarn dlx ajaxui init
bunx ajaxui init

Install globally

Adds the ajaxui and short-form ajx binaries to your PATH.

npm install -g ajaxui
pnpm add -g ajaxui
yarn global add ajaxui
bun add -g ajaxui

Then call it directly:

ajaxui --version
# or with the short alias
ajx --version

Install as a dev dependency

Pin the CLI version inside your repo so every contributor and your CI use the same one.

npm install -D ajaxui
pnpm add -D ajaxui
yarn add -D ajaxui
bun add -d ajaxui

Wire 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 doctor

Step 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. 1

    Initialize the config inside your project

    npx ajaxui init
  2. 2

    Add the components you need

    npx ajaxui add button input card
  3. 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 init

Initialize Ajax UI in your project — writes ajaxui.config.json, sets up tokens, and prepares the components folder.

Interactive setup

npx ajaxui init

Pick a framework upfront

npx ajaxui init --framework react

add

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 button

Add multiple at once

npx ajaxui add button card input badge

Pick from a list

npx ajaxui add

list

ajaxui list

Show every component available in the registry with its category and short description.

List all components

npx ajaxui list

Filter by category

npx ajaxui list --category forms

update

ajaxui update [components...]

Update components you've already added to the latest version from the registry.

Update everything

npx ajaxui update

Update specific ones

npx ajaxui update button card

preset

ajaxui preset <command>

Apply a theme preset (tokens + component overrides) to your project.

List public presets

npx ajaxui preset list

Apply one by ID

npx ajaxui preset apply <preset-id>

Push your local preset

npx ajaxui preset push

login

ajaxui login

Authenticate the CLI with your Ajax UI account so you can push private presets and access pro features.

Browser-based login

npx ajaxui login

Use an API key

npx ajaxui login --token <api-key>

doctor

ajaxui doctor

Diagnose your setup — checks Node version, Tailwind config, framework detection, and registry connectivity.

Run a health check

npx ajaxui doctor

Getting help

Every command supports --help to print its full usage and flags.

npx ajaxui --help
npx ajaxui add --help
npx ajaxui preset apply --help