CLI

Install editable Aria UI component source with the @ariaui/cli command line tool.

The Aria UI CLI installs editable component source files into your React project. Use it when you want to start from the documented Aria UI patterns, then keep the generated component files inside your app where they can be styled, reviewed, and changed like local code.

Run the CLI

Run the CLI from the root of a React project. The project needs a package.json, a react dependency, and either a lockfile or a packageManager field so the CLI can install dependencies with the same package manager as the app.

npx @ariaui/cli@latest add button
pnpm dlx @ariaui/cli@latest add button

You can also install the CLI globally:

npm i -g @ariaui/cli@latest
ariaui add button

Add components

Pass one or more component names to ariaui add:

ariaui add button
ariaui add button dialog
ariaui add --overwrite button

If you run ariaui add without component names, the CLI opens an interactive component picker.

By default, component files are written to components/ui. The CLI also writes .ariaui/config.json so future runs use the same component directory and aliases.

Configuration

The default config is:

If your project already has a components.json file, the CLI reads compatible values from it before writing .ariaui/config.json. In particular, aliases.ui can set the component output directory, tsx can set TypeScript mode, and aliases.components / aliases.utils can set import aliases.

What gets installed

For each selected component, the CLI:

  • reads the Aria UI component registry
  • writes editable source files into your configured component directory
  • skips existing files unless --overwrite is passed
  • installs required runtime and development dependencies with your detected package manager
  • reports the files and dependencies it changed

If dependency installation fails after files are written, the CLI prints the config path, package manager, files written, and any dependencies that still need to be installed manually.

Registry source

The CLI uses its bundled component registry by default. To point it at a remote registry, set ARIAUI_REGISTRY_URL for the command:

ARIAUI_REGISTRY_URL=https://example.com/registry.json ariaui add button

If the remote registry cannot be loaded or does not match the expected registry shape, the CLI falls back to the bundled registry.

Agent usage

The package includes an MCP server for agents that need to install Aria UI components into a project:

The server exposes ariaui_add_component, which installs editable Aria UI component source files into a React project.

Previous
Tokens