Skip to main content

Databricks CLI

Databricks CLI

The Databricks CLI (command-line interface) allows you to interact with the Databricks platform from your local terminal or via a coding agent. Installation and authentication with the CLI are required for developing apps on Databricks and for running the templates on this site.

This page covers installation and authentication. For the full command reference, see the official CLI docs.

Install or upgrade

From your terminal, run the following commands to install or upgrade the CLI:

Install:

brew tap databricks/tap
brew trust databricks/tap
brew install databricks

Upgrade:

brew update
brew trust databricks/tap
brew upgrade databricks

brew trust databricks/tap is required as of Homebrew 6.0.0 — including for existing users who tapped before upgrading.

note

All DevHub templates assume the Databricks CLI is version 1.0.0+.

Authenticate

In order to develop apps on Databricks, you need to authenticate with the CLI. This allows the CLI to interact with your Databricks workspace and perform actions on your behalf.

To authenticate, run the following command:

databricks auth login

This prompts you for a profile name (defaults to DEFAULT), then opens a browser where you sign in and pick a workspace.

Once authenticated, the CLI (v1.0.0+) stores your login token in your operating system's secure storage — Keychain on macOS, Credential Manager on Windows, or the Secret Service on Linux — not in ~/.databrickscfg. See Token storage for details and the plaintext fallback.

To authenticate to a specific workspace or to name the profile, use the --host and --profile flags:

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

If you have multiple authenticated profiles, you can pass --profile <PROFILE> on subsequent commands to target a specific profile.

To list all saved profiles, run the following command:

databricks auth profiles

Example output:

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.
  • 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.

Where to next

Databricks Developer Hub

Ready to ship your next agentic app in minutes?

Read docs