apx
Reference

CLI

Complete reference for apx command-line interface

The apx CLI provides commands to initialize, develop, build, and manage your Databricks Apps projects.

Installation

Install apx using the install script:

curl -fsSL https://databricks-solutions.github.io/apx/install.sh | sh
irm https://databricks-solutions.github.io/apx/install.ps1 | iex

Then run commands directly:

apx <command>

Commands Overview

CommandDescription
initInitialize a new project
buildBuild the project for deployment
devDevelopment server management
componentsUI components commands
frontendFrontend-specific commands
skillInstall apx skill files
mcpStart the MCP server
bunRun a command using bun
fluxFlux OTEL collector commands
upgradeSelf-update to the latest version

init

Initialize a new apx project with interactive prompts for configuration.

apx init [OPTIONS] [APP_PATH]

Arguments

  • APP_PATH: The path to create the app (optional, defaults to current directory)

Options

OptionDescription
-n, --name <APP_NAME>The name of the project
--addons <ADDONS>Addons to enable (comma-separated). Use none for backend-only
--no-addonsBackend-only project (no addons)
-p, --profile <PROFILE>Databricks profile to use
--as-member [MEMBER_PATH]Initialize as a uv workspace member (default: packages/app). Auto-detected when a pyproject.toml without [tool.apx] exists in the current directory

Note: The init command only creates project files and configures pyproject.toml. Dependencies (Python packages via uv sync and frontend packages via bun install) are installed automatically on the first run of any command like apx dev start, apx build, or apx frontend build.

Addons

Select addons during initialization with --addons:

# Select specific addons
apx init --addons=ui,sidebar,cursor

# Backend-only project
apx init --no-addons

When no --addons flag is given, an interactive multi-select prompt with group headers is shown.

Assistant addons (claude, cursor, vscode, codex) automatically install skill files, .mcp.json, and hooks during init. Each addon installs skills to its configured path (e.g., .claude/skills/apx/ for most assistants, .agents/skills/apx/ for Codex).

Example

apx init \
  --name my-app \
  --addons=ui,cursor \
  --profile my-profile \
  my-app

build

Prepare the app for deployment by building both frontend assets and Python wheel.

apx build [OPTIONS] [APP_PATH]

Arguments

  • APP_PATH: The path to the app (optional, defaults to current directory)

Options

OptionDescription
--build-path <BUILD_PATH>Build directory path (default: .build)
--skip-ui-buildSkip the UI build step

dev

The dev command group manages development servers.

dev start

Start development servers in detached mode.

apx dev start [OPTIONS] [APP_PATH]

Options

OptionDescription
-a, --attachedFollow logs and stop server on Ctrl+C
--skip-credentials-validationSkip credentials validation on startup
--timeout <SECONDS>Maximum time to wait for dev server health check (default: 60)

dev status

Check the status of running development servers.

apx dev status [APP_PATH]

dev logs

Display logs from development servers.

apx dev logs [OPTIONS] [APP_PATH]

Options

OptionDescription
-d, --duration <DURATION>Duration to look back (default: 10m)
-f, --followFollow logs until Ctrl+C

dev restart

Restart all running development servers.

apx dev restart [APP_PATH]

dev stop

Stop all running development servers.

apx dev stop [APP_PATH]

dev check

Check the project code for errors using TypeScript compiler and Python type checker.

apx dev check [APP_PATH]

dev apply

Apply an addon to an existing project. Shows a diff of changes and asks for confirmation before applying.

apx dev apply <ADDON> [OPTIONS] [APP_PATH]

Arguments

  • ADDON: The addon to apply (see available addons below)
  • APP_PATH: The path to the app (optional, defaults to current directory)

Options

OptionDescription
-y, --yesSkip confirmation prompt and apply changes directly

Available Addons

Configure AI assistant integration:

  • cursor - Cursor IDE rules and MCP config
  • vscode - VS Code instructions and MCP config
  • claude - Claude Code project rules and MCP config
  • codex - OpenAI Codex AGENTS.md file
apx dev apply cursor
apx dev apply vscode
apx dev apply claude
apx dev apply codex

Apply backend addons:

  • sql - SQL Warehouse connection and query API
  • lakebase - Lakebase (Postgres) integration
apx dev apply sql
apx dev apply lakebase

Apply UI addons:

  • ui - Frontend with React, Vite, and TanStack Router
  • sidebar - Sidebar navigation layout
apx dev apply ui
apx dev apply sidebar

Example

# Apply Cursor rules with confirmation prompt
apx dev apply cursor

# Apply lakebase addon without confirmation
apx dev apply lakebase -y

The command will:

  1. Show a list of new files to be created
  2. Show a diff for each file that will be modified
  3. Ask for confirmation (unless -y is provided)
  4. Apply the changes

components

A CLI for working with shadcn registries. apx provides tooling to add components from any shadcn-compatible registry to your project.

Note: apx does not use a components.json file. Component registries are configured in pyproject.toml under the [tool.apx.ui.registries] section. The shadcn/ui registry is used as the default, so there's no need to add it manually.

components add

Add a UI component to your project.

apx components add [OPTIONS] <COMPONENT> [APP_PATH]

Arguments

  • COMPONENT: Component name (e.g., button, dialog, table, or @registry/component, e.g. @animate-ui/sidebar)

Options

OptionDescription
--forceOverwrite existing files
--dry-runPrint actions without writing files

Examples

# Add from default registry (shadcn/ui)
apx components add button

# Add from specific registry
apx components add @animate-ui/accordion

# Force overwrite
apx components add card --force

Registry Configuration

Registries are configured in pyproject.toml:

[tool.apx.ui.registries]
"@animate-ui" = "https://animate-ui.com/r/{name}.json"
"@ai-elements" = "https://registry.ai-sdk.dev/{name}.json"
"@svgl" = "https://svgl.app/r/{name}.json"

Preconfigured Registries

Projects include these component repositories by default:

RepositoryAliasDescription
shadcn/ui(default)Core UI components
animate-ui@animate-uiAnimation components
ai-sdk@ai-elementsAI components (chat, prompts)
svgl@svglSVG icons collection

skill install

Install apx skill files (markdown references), MCP config, and hooks to a project or globally.

apx skill install [OPTIONS]

Options

OptionDescription
--globalInstall to home directory (~/) instead of current directory
--pathSkill files directory (default: .claude/skills/apx)

Examples

# Install to current project (default path)
apx skill install

# Install globally
apx skill install --global

# Install to a custom path (e.g. for Codex)
apx skill install --path .agents/skills/apx

Note: When using apx init with assistant addons (claude, cursor, vscode, codex), skill files are installed automatically. The skill install command is useful for adding skills to existing projects without running the full addon setup.


mcp

Start the MCP (Model Context Protocol) server.

apx mcp

See the MCP reference for available tools and configuration.


frontend

Frontend-specific commands.

frontend dev

Run the frontend development server standalone.

apx frontend dev

frontend build

Build the frontend for production.

apx frontend build

bun

Run commands using the bundled bun runtime.

apx bun <ARGS>

flux

OpenTelemetry collector commands for observability.

Note: You typically don't need to use flux commands directly. When you run apx dev start, apx automatically starts the log collector and keeps it running alongside your development servers. The flux commands are provided for advanced use cases where you need manual control over the collector.

flux start

Start the Flux OTEL collector daemon.

apx flux start

flux stop

Stop the Flux OTEL collector daemon.

apx flux stop

upgrade

Self-update apx to the latest version. Downloads the latest release from GitHub, verifies the SHA-256 checksum, and atomically replaces the current binary.

apx upgrade

If you are already on the latest version, the command exits with a message and no changes are made.

On this page