๐ apx is the toolkit for building Databricks Apps โก
โจ apx bundles together a set of tools and libraries to help you with app development lifecycle: develop, build and deploy.
๐ก The main idea of apx is to provide convenient, fast and AI-friendly development experience.
- Run the command to initialize the project:
uvx git+https://github.com/databricks-solutions/apx.git init- Open the project in Cursor (or any IDE of your choice, for that matter), allow usage of apx and shadcn mcp
- Start providing prompts to build an app, e.g.:
Use apx mcp server to start development server, then create a nice application for order management.
Use shadcn mcp to add new components, make sure style is consistent and data is properly fetched from the backend. Start with mocking the backend data (yet use pydantic models), then implement the actual backend.
- Deploy whenever ready via Databricks CLI:
databricks bundle deploy -p <your-profile>apx is built on top of the following stack:
- ๐ Python + FastAPI in the backend
- โ๏ธ React + shadcn/ui in the frontend
๐ To connect the frontend and the backend, apx uses orval to generate the client code from the OpenAPI schema.
To kickstart your app, please make sure you have:
- โ
uvinstalled - โ
buninstalled - โ
gitinstalled
Then you can use the following command:
uvx git+https://github.com/databricks-solutions/apx.git initThis will launch an interactive prompt that will guide you through:
- ๐ Naming your app (or using a randomly generated name)
- ๐ง Selecting a Databricks profile (if you have any configured)
- ๐ค Setting up AI assistant rules (cursor/vscode/codex/claude)
The app will be created in the current working directory by default. You can specify a different path via:
uvx git+https://github.com/databricks-solutions/apx.git init /path/to/your/appYou can also specify all options via command-line flags to skip the prompts:
uvx https://github.com/databricks-solutions/apx.git init \
--name my-app \
--template essential \
--profile my-profile \
--assistant cursor \
my-appThis will create a new app in the my-app directory with the app name my-app.
The project structure is as follows:
my-app
โโโ package.json
โโโ pyproject.toml
โโโ README.md
โโโ src
โ โโโ sample
โ โโโ __dist__
โ โโโ backend
โ โ โโโ app.py
โ โ โโโ config.py
โ โ โโโ dependencies.py
โ โ โโโ models.py
โ โ โโโ router.py
โ โ โโโ runtime.py
โ โ โโโ utils.py
โ โโโ ui
โ โโโ components
โ โโโ lib
โ โโโ routes
โ โโโ main.tsx
๐ฆ The __dist__ directory is the directory where the frontend bundle is stored, so it can be served by the backend.
The Databricks SDK documentation is available via MCP server. You can search for methods and models using the following command:
uv run apx mcp sdk search <query>This will return a list of methods and models that match the query.
To upgrade apx, you can use the following command:
uv sync --upgrade-package apxThis will pull the latest changes from the main branch and update the apx package.
uvx git+https://github.com/databricks-solutions/apx.git initInitializes a new app project with interactive prompts for configuration. Supports optional flags to skip prompts:
--name, -n: Specify the app name--template, -t: Choose a template (essential/stateful)- ๐ฏ Essential template is a basic template with UI and API.
- ๐พ Stateful template also includes Lakebase integration via
sqlmodel.
--profile, -p: Specify a Databricks profile--assistant, -a: Choose AI assistant rules (cursor/vscode/codex/claude)--layout, -l: Choose the layout (basic/sidebar)--skip-frontend-dependencies: Skip installing frontend dependencies (bun packages)--skip-backend-dependencies: Skip installing backend dependencies (uv sync)--skip-build: Skip building the project after initialization
The dev command group manages development servers in detached mode:
uv run apx dev startStarts backend, frontend, and OpenAPI watcher in detached mode.
Options:
--host: Host for dev, frontend, and backend servers (default: localhost)--api-prefix: URL prefix for API routes (default: /api)--obo/--no-obo: Enable/disable On-Behalf-Of header (default: enabled)--openapi/--no-openapi: Enable/disable OpenAPI watcher (default: enabled)--max-retries: Maximum number of retry attempts for processes (default: 10)--watch, -w: Start servers and tail logs until Ctrl+C, then stop all servers
uv run apx dev statusShows status of all running development servers (backend, frontend, OpenAPI watcher).
uv run apx dev logsDisplays historical logs from development servers.
Options:
--duration, -d: Show logs from last N seconds--follow, -f: Follow log output (like tail -f). Streams new logs continuously.--ui: Show only frontend logs--backend: Show only backend logs--openapi: Show only OpenAPI logs--app: Show only application logs (from your app code)--system: Show only system logs from the apx dev server--raw: Show raw log output without prefix formatting
uv run apx dev restartRestarts all running development servers, attempting to reuse the same ports.
uv run apx dev stopStops all running development servers.
uv run apx dev checkChecks the project code for errors using TypeScript compiler and basedpyright.
uv run apx dev mcpStarts MCP server that provides tools for managing development servers. The MCP server runs over stdio and provides tools for start, restart, stop, status, and get_metadata operations.
uv run apx dev applyApplies an addon to an existing project.
uv run apx buildPrepares the app for deployment by building both frontend assets and Python wheel.
Options:
--build-path: Path to the build directory where artifacts will be placed, relative to the app path (default: .build)--skip-ui-build: Skip the UI build step
uv run apx openapiManually generates OpenAPI schema and orval client.
Options:
--watch, -w: Watch for changes and regenerate automatically--force, -f: Force regeneration even if schema hasn't changed
Note: you don't need to run this command manually, the watcher will run automatically when you start the development server.
When the project is initialized, the following directories are added to the shadcn directory (via repositories key in the components.json file):
- https://animate-ui.com/ - for animations. MIT License.
- https://ai-sdk.dev/ - for AI components (e.g. chat and prompts). Apache-2.0 License.
- https://svgl.app/docs/shadcn-ui - various SVG icons. MIT License.
We've carefully selected these repositories to ensure that the components are of high quality and are well-maintained.
If you don't want to use these repositories, you can remove them from the components.json file.
- MCP of apx commands
- Add chat template
- Add a way to add a custom template
ยฉ 2025 Databricks, Inc. All rights reserved. The source in this project is provided subject to the Databricks License.
| library | description | license | source |
|---|---|---|---|
| FastAPI | High-performance API framework based on Starlette | MIT | GitHub |
| Pydantic | Data validation and settings management using Python type hints | MIT | GitHub |
| SQLModel | SQLAlchemy-like ORM for Python | MIT | GitHub |
| Databricks SDK for Python | Official Databricks SDK for Python | Apache-2.0 | GitHub |
| orval | OpenAPI client generator | MIT | GitHub |
| shadcn/ui | UI library for React | MIT | GitHub |
| React | Library for building user interfaces | MIT | GitHub |
| TypeScript | Programming language for web development | Apache-2.0 | GitHub |
| Bun | JavaScript runtime | MIT | GitHub |
| uv | Fast, modern Python package manager | MIT | GitHub |
| jinja2 | Template engine for Python | MIT | GitHub |
| rich | CLI interface library for Python | MIT | GitHub |
| typer | Typer is a library for building CLI applications | MIT | GitHub |
| uvicorn | ASGI server for Python | BSD-3-Clause | GitHub |
| httpx | HTTP client for Python | BSD-3-Clause | GitHub |
| watchfiles | File change monitoring for Python | MIT | GitHub |
| hatchling | Build backend for Python | MIT | GitHub |
| uv-dynamic-versioning | Dynamic versioning for Python packages | MIT | GitHub |
| vite | Frontend build tool for JavaScript | MIT | GitHub |
| tailwindcss | Utility-first CSS framework for rapid UI development | MIT | GitHub |
| smol-toml | Tom's Obvious, Minimal Language for JS | MIT | GitHub |
| psutil | Cross-platform library for retrieving information on running processes and system utilization (CPU, memory, disks, network) in Python. | BSD-3-Clause | GitHub |