CLI
Use the AniUI CLI to initialize your project, add components, and more.
init#
Initialize AniUI in your React Native project. Sets up the utility helper, global CSS theme, and Tailwind config.
npx @aniui/cli initThe init command will:
- Detect your project type (Expo or bare React Native)
- Check that NativeWind is installed
- Prompt for component directory path (default:
components/ui) - Prompt for utility path (default:
lib/utils.ts) - Prompt for a theme preset
- Copy
lib/utils.ts,global.css,tailwind.config.js, andnativewind-env.d.ts
add#
Add components to your project. Components are copied as source files — you own the code.
npx @aniui/cli add [component...]Examples:
# Add a single component
npx @aniui/cli add button
# Add multiple components
npx @aniui/cli add button text input card
# Add a component with dependencies (auto-resolved)
npx @aniui/cli add select
# → also adds bottom-sheet (registry dependency)If a component needs extra npm packages (e.g. react-native-reanimated for Tier 2 components), the CLI will print the install command for you.
add-block#
Add pre-built screen templates (blocks) to your project. Blocks are full screens composed of AniUI components — login, settings, profile, chat, onboarding, and more.
npx @aniui/cli add-block [block...]Examples:
# Add a single block
npx @aniui/cli add-block login
# Add multiple blocks
npx @aniui/cli add-block signup forgot-password
# All blocks auto-resolve their component dependenciesAvailable blocks: login, signup, forgot-password, home, bottom-tabs, drawer-nav, profile, settings, onboarding, chat, product-list, product-detail, notifications, pricing, search.
theme#
Switch between theme presets. Updates the CSS variables in your global.css.
npx @aniui/cli themeAvailable presets: Default (neutral), Blue, Green, Orange, Rose.
generate#
Generate a complete screen using AI. Requires the ANTHROPIC_API_KEY environment variable.
# Generate a screen from a description
npx @aniui/cli generate "login page with email and password"
# Specify output path
npx @aniui/cli generate "settings page" -o app/settings.tsxThe AI knows the full AniUI component catalog and generates screens using only existing components with proper imports and NativeWind styling.
mcp#
Print the MCP server configuration for AI tools like Claude Desktop or Cursor.
npx @aniui/cli mcpThis outputs a JSON config block you can paste into your AI tool's MCP settings. The MCP server exposes component registry data, source code, usage patterns, and theme tokens.
doctor#
Check your project setup for common issues. Verifies AniUI config, NativeWind installation, theme tokens, Tailwind config, and more.
npx @aniui/cli doctorUseful for debugging when components don't render correctly or styles aren't applied. The doctor reports what's missing and suggests fixes.
status#
Show installed components and available updates. Reports a table with component name, installed version, latest version, local modification state, and update status.
npx @aniui/cli statusStatus indicators: current (up to date), update available, modified (local changes detected), not installed. Local modifications are detected via SHA-256 hash comparison against the version you installed.
diff#
Show differences between your local component file and the current upstream version. Useful before running update to preview what will change.
npx @aniui/cli diff buttonOutputs a colored unified diff (green for additions, red for removals). Only shows lines that differ.
update#
Update installed components to the latest version. Supports smart merging when you've modified components locally.
# Update all installed components
npx @aniui/cli update
# Update specific components
npx @aniui/cli update button cardThree strategies when local changes are detected:
- overwrite — replace your local version with upstream (loses your changes)
- skip — keep your local version (no update applied)
- backup — save local as
.backup, apply upstream
