---
title: Databricks CLI
---

# Databricks CLI

The Databricks CLI is required for every template on this site, which includes CLI commands for scaffolding and deployment. Install and authenticate before you begin.

Command-line tool for workspace operations, app deployment, and automation. This page covers installation and authentication. Product-specific commands (`databricks apps`, `databricks postgres`, `databricks serving-endpoints`) are covered in each product's docs.

For the full command reference, see the [official CLI docs](https://docs.databricks.com/aws/en/dev-tools/cli/).

## Install or upgrade

DevHub templates assume version `0.296+`.

### macOS / Linux

```bash
brew tap databricks/tap
brew install databricks

brew update && brew upgrade databricks
```

### Windows

```bash
winget install Databricks.DatabricksCLI

winget upgrade Databricks.DatabricksCLI
```

### curl (all platforms)

```bash
curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/main/install.sh | sh
```

On Windows, use WSL. If `/usr/local/bin` is not writable, rerun with `sudo`. Re-running the script also upgrades an existing install.

## Authenticate

Browser-based OAuth is the default for local use:

```bash
databricks auth login
```

Prompts for a profile name (defaults to DEFAULT), then opens a browser to authenticate and select a workspace. Credentials save to `~/.databrickscfg`.

To target a specific workspace and name the profile:

```bash
databricks auth login --host <workspace-url> --profile <PROFILE>
```

Pass `--profile <PROFILE>` on subsequent commands when using named profiles.

List saved profiles:

```bash
databricks auth profiles
```

```text
Name              Host                                             Valid
DEFAULT           https://adb-1234567890.12.azuredatabricks.net    YES
my-prod-workspace https://mycompany.cloud.databricks.com           YES
```

**Name** is the profile label, **Host** is the workspace URL, and **Valid** is the result of a live authentication check against the workspace. `NO` means the check failed; re-run `databricks auth login --profile <NAME>` to re-authenticate.

For CI/CD, use OAuth client credentials or token-based auth (no browser step). See [CLI authentication](https://docs.databricks.com/aws/en/dev-tools/cli/authentication).

## Product commands

Product-specific CLI commands are covered alongside each product:

- `databricks apps`: [Apps development](https://databricks.com/devhub/docs/apps/development)
- `databricks postgres`: [Lakebase development](https://databricks.com/devhub/docs/lakebase/development)
- `databricks serving-endpoints`: [AI Gateway](https://databricks.com/devhub/docs/agents/ai-gateway)

## Agent skills

Install [agent skills](https://databricks.com/devhub/docs/tools/ai-tools/agent-skills) to give AI coding assistants Databricks platform knowledge:

```bash
databricks experimental aitools install
```

By default, skills install globally. Pass `--project` to install into the current project directory instead. See the [agent skills page](https://databricks.com/devhub/docs/tools/ai-tools/agent-skills) for all options.

## Where to next

With the CLI installed and authenticated, pick a [template](https://databricks.com/devhub/templates) to start building.
