Skip to main content

Quickstart

Prerequisites

  • Databricks CLI v1.0.0+ with an authenticated profile
  • psql (PostgreSQL client) if using databricks psql. Alternatively, use generate-database-credential with any PostgreSQL client.
  • Workspace with Lakebase Postgres access enabled
  • pnpm, which the default AppKit template uses to install dependencies and run scripts

Template path

Browse the templates below, pick one for your use case, and copy it into your AI coding assistant. Each includes the Create a Lakebase Project resource, which walks through project creation and connection value collection.

TemplateBest for
App with LakebaseCRUD apps with persistent storage
AI Chat AppConversational AI with chat history
Operational Data AnalyticsBidirectional sync between Lakebase Postgres and Unity Catalog

Customize your app

After deploying a Lakebase Postgres-backed app, consider the following customizations:

Manual path

When you scaffold without a template, databricks apps init generates a working AppKit project. You need a Lakebase project first. Create one:

databricks postgres create-project <project-id>

The ID becomes the project's resource name (projects/<project-id>). For a guided setup including branches and connection values, see the Create a Lakebase Project template or the databricks-lakebase agent skill.

Interactive (recommended for local development): run without flags.

databricks apps init

The CLI prompts for your app name, then lists the available plugins (features). Select Lakebase, and it walks you through choosing an existing Lakebase project, branch, and database. If it asks for a default resource auth mode, either choice sets up the Lakebase resource the same way: the deployed app connects to Lakebase Postgres as its service principal. The choice still applies to other plugins you select.

Non-interactive (for scripts and CI): pass --name and the required --set fields for each selected plugin feature. The database value must be the full resource path, retrieved via databricks postgres list-databases projects/<project-id>/branches/<branch-id> -o json (use the name field):

databricks apps init --name my-app --features lakebase \
  --set lakebase.postgres.project=projects/<project-id> \
  --set lakebase.postgres.branch=projects/<project-id>/branches/<branch-id> \
  --set lakebase.postgres.database=projects/<project-id>/branches/<branch-id>/databases/<database-id>

Then deploy first to create the schema, and run locally:

cd my-app
databricks apps deploy
tip

Execute databricks apps deploy before pnpm run dev. Deploying sets up a managed identity (the app's service principal) that creates the database schema on first startup. If you start pnpm run dev first instead, the schema gets created under your personal credentials, and when you later deploy the app's managed identity can't access it. Local setup explains this further.

databricks apps init installs the project's dependencies (unless you pass --skip-install), so start the local dev server:

pnpm run dev

Where to next

For local development workflow, feature branches, and the full plugin API, see Lakebase Postgres development.

Databricks Developer Hub

Ready to ship your next agentic app in minutes?

Read docs