CLI
Complete reference for apx command-line interface
The apx CLI provides commands to initialize, develop, build, and manage your Databricks Apps projects.
Installation
apx is distributed from a custom PyPI registry. Install and run using uvx:
uvx --index https://databricks-solutions.github.io/apx/simple apx <command>Or after adding to your project:
uv run 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 |
mcp | Start the MCP server |
bun | Run a command using bun |
flux | Flux OTEL collector commands |
init
Initialize a new apx project with interactive prompts for configuration.
uvx --index https://databricks-solutions.github.io/apx/simple 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 |
-t, --template <TEMPLATE> | Template to use: minimal, essential, stateful |
-p, --profile <PROFILE> | Databricks profile to use |
-a, --assistant <ASSISTANT> | AI assistant type: cursor, vscode, codex, claude |
-l, --layout <LAYOUT> | Layout to use: basic, sidebar |
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.
Templates
Minimal template with basic UI structure and no additional features.
uvx --index https://databricks-solutions.github.io/apx/simple apx init --template minimalStandard template with UI and API, including shadcn/ui components and OpenAPI client generation.
uvx --index https://databricks-solutions.github.io/apx/simple apx init --template essentialEverything in Essential, plus SQLModel database integration and Lakebase configuration.
uvx --index https://databricks-solutions.github.io/apx/simple apx init --template statefulExample
uvx --index https://databricks-solutions.github.io/apx/simple apx init \
--name my-app \
--template essential \
--profile my-profile \
--assistant cursor \
my-appbuild
Prepare the app for deployment by building both frontend assets and Python wheel.
uv run 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.
uv run 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 |
dev status
Check the status of running development servers.
uv run apx dev status [APP_PATH]dev logs
Display logs from development servers.
uv run 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.
uv run apx dev restart [APP_PATH]dev stop
Stop all running development servers.
uv run apx dev stop [APP_PATH]dev check
Check the project code for errors using TypeScript compiler and Python type checker.
uv run apx dev check [APP_PATH]dev apply
Apply an addon to an existing project.
uv run apx dev apply <ADDON>Available Addons
Configure AI assistant integration:
cursor- Cursor IDE rules and MCP configvscode- VSCode instructions and MCP configclaude- Claude project file and MCP configcodex- OpenAI Codex AGENTS.md file
uv run apx dev apply cursor
uv run apx dev apply vscode
uv run apx dev apply claude
uv run apx dev apply codexApply project templates:
essential- Standard template with UI and APIstateful- Template with database integration
uv run apx dev apply essential
uv run apx dev apply statefulApply UI layouts:
sidebar- Sidebar navigation layoutminimal-ui- Minimal UI structure
uv run apx dev apply sidebar
uv run apx dev apply minimal-uicomponents
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.
uv run 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)
uv run apx components add button
# Add from specific registry
uv run apx components add @animate-ui/accordion
# Force overwrite
uv run 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 |
mcp
Start the MCP (Model Context Protocol) server.
uv run apx mcpSee the MCP reference for available tools and configuration.
frontend
Frontend-specific commands.
frontend dev
Run the frontend development server standalone.
uv run apx frontend devfrontend build
Build the frontend for production.
uv run apx frontend buildbun
Run commands using the bundled bun runtime.
uv run 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.
uv run apx flux startflux stop
Stop the Flux OTEL collector daemon.
uv run apx flux stop