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

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

CommandDescription
initInitialize a new project
buildBuild the project for deployment
devDevelopment server management
componentsUI components commands
frontendFrontend-specific commands
mcpStart the MCP server
bunRun a command using bun
fluxFlux 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

OptionDescription
-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 minimal

Standard 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 essential

Everything in Essential, plus SQLModel database integration and Lakebase configuration.

uvx --index https://databricks-solutions.github.io/apx/simple apx init --template stateful

Example

uvx --index https://databricks-solutions.github.io/apx/simple apx init \
  --name my-app \
  --template essential \
  --profile my-profile \
  --assistant cursor \
  my-app

build

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

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.

uv run apx dev start [OPTIONS] [APP_PATH]

Options

OptionDescription
-a, --attachedFollow logs and stop server on Ctrl+C
--skip-credentials-validationSkip 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

OptionDescription
-d, --duration <DURATION>Duration to look back (default: 10m)
-f, --followFollow 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 config
  • vscode - VSCode instructions and MCP config
  • claude - Claude project file and MCP config
  • codex - 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 codex

Apply project templates:

  • essential - Standard template with UI and API
  • stateful - Template with database integration
uv run apx dev apply essential
uv run apx dev apply stateful

Apply UI layouts:

  • sidebar - Sidebar navigation layout
  • minimal-ui - Minimal UI structure
uv run apx dev apply sidebar
uv run apx dev apply minimal-ui

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.

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

OptionDescription
--forceOverwrite existing files
--dry-runPrint 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 --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

mcp

Start the MCP (Model Context Protocol) server.

uv run apx mcp

See the MCP reference for available tools and configuration.


frontend

Frontend-specific commands.

frontend dev

Run the frontend development server standalone.

uv run apx frontend dev

frontend build

Build the frontend for production.

uv run apx frontend build

bun

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 start

flux stop

Stop the Flux OTEL collector daemon.

uv run apx flux stop

On this page