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 | shirm https://databricks-solutions.github.io/apx/install.ps1 | iexThen run commands directly:
apx <command>Commands Overview
| Command | Description |
|---|---|
init | Initialize a new project |
build | Build the project for deployment |
dev | Development server management |
components | UI components commands |
frontend | Frontend-specific commands |
skill | Install apx skill files |
mcp | Start the MCP server |
bun | Run a command using bun |
flux | Flux OTEL collector commands |
upgrade | Self-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
| Option | Description |
|---|---|
-n, --name <APP_NAME> | The name of the project |
--addons <ADDONS> | Addons to enable (comma-separated). Use none for backend-only |
--no-addons | Backend-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-addonsWhen 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-appbuild
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
| Option | Description |
|---|---|
--build-path <BUILD_PATH> | Build directory path (default: .build) |
--skip-ui-build | Skip 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
| Option | Description |
|---|---|
-a, --attached | Follow logs and stop server on Ctrl+C |
--skip-credentials-validation | Skip 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
| Option | Description |
|---|---|
-d, --duration <DURATION> | Duration to look back (default: 10m) |
-f, --follow | Follow 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
| Option | Description |
|---|---|
-y, --yes | Skip confirmation prompt and apply changes directly |
Available Addons
Configure AI assistant integration:
cursor- Cursor IDE rules and MCP configvscode- VS Code instructions and MCP configclaude- Claude Code project rules and MCP configcodex- OpenAI Codex AGENTS.md file
apx dev apply cursor
apx dev apply vscode
apx dev apply claude
apx dev apply codexApply backend addons:
sql- SQL Warehouse connection and query APIlakebase- Lakebase (Postgres) integration
apx dev apply sql
apx dev apply lakebaseApply UI addons:
ui- Frontend with React, Vite, and TanStack Routersidebar- Sidebar navigation layout
apx dev apply ui
apx dev apply sidebarExample
# Apply Cursor rules with confirmation prompt
apx dev apply cursor
# Apply lakebase addon without confirmation
apx dev apply lakebase -yThe command will:
- Show a list of new files to be created
- Show a diff for each file that will be modified
- Ask for confirmation (unless
-yis provided) - 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
| Option | Description |
|---|---|
--force | Overwrite existing files |
--dry-run | Print 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 --forceRegistry 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:
| Repository | Alias | Description |
|---|---|---|
| shadcn/ui | (default) | Core UI components |
| animate-ui | @animate-ui | Animation components |
| ai-sdk | @ai-elements | AI components (chat, prompts) |
| svgl | @svgl | SVG icons collection |
skill install
Install apx skill files (markdown references), MCP config, and hooks to a project or globally.
apx skill install [OPTIONS]Options
| Option | Description |
|---|---|
--global | Install to home directory (~/) instead of current directory |
--path | Skill 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/apxNote: 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 mcpSee the MCP reference for available tools and configuration.
frontend
Frontend-specific commands.
frontend dev
Run the frontend development server standalone.
apx frontend devfrontend build
Build the frontend for production.
apx frontend buildbun
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 startflux stop
Stop the Flux OTEL collector daemon.
apx flux stopupgrade
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 upgradeIf you are already on the latest version, the command exits with a message and no changes are made.