Databricks CLI Installation
Install or update the Databricks CLI on macOS, Windows, or Linux using doc-validated methods (Homebrew, WinGet, curl install script, manual download, or user directory install for non-sudo environments). Includes verification and common failure recovery.
Sandboxed / IDE environments (Cursor, containers)
CLI install commands often write to system directories outside the workspace (e.g. /opt/homebrew/, /usr/local/bin/) which are blocked in sandboxed environments.
Agent behavior: Do not attempt to run install commands directly. Present the appropriate command to the user and ask them to run it in their own terminal. After they confirm, verify with databricks -v.
For Linux/macOS containers or Cursor: prefer the Linux manual install to user directory method (~/.local/bin) — it requires no sudo and no writes outside the workspace.
Preconditions (always do first)
- Determine OS and shell:
- macOS/Linux: bash/zsh
- Windows: Command Prompt / PowerShell; optionally WSL for Linux shell
- Detect whether
databricksis already installed:- Run:
databricks -v(ordatabricks version) - If already installed with a recent version, installation is already OK.
- Run:
- Avoid the legacy Python package
databricks-cli(PyPI). This skill installs the modern Databricks CLI binary.
Preferred installation paths (by OS)
macOS (preferred: Homebrew)
Run:
brew tap databricks/tapbrew install databricks
Verify:
databricks -v(ordatabricks version)
If macOS blocks the binary (Gatekeeper), follow Apple’s “open app from unidentified developer” flow.
macOS fallback: curl installer
Run:
curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/main/install.sh | sh
Notes:
- If
/usr/local/binis not writable, re-run withsudo. - Installs to
/usr/local/bin/databricks.
Verify:
databricks -v
Linux (preferred: Homebrew if available)
Run:
brew tap databricks/tapbrew install databricks
Verify:
databricks -v
Linux fallback: curl installer
Run:
curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/main/install.sh | sh
Notes:
- If
/usr/local/binis not writable, re-run withsudo. - Installs to
/usr/local/bin/databricks.
Verify:
databricks -v
Linux alternative: Manual install to user directory (when sudo unavailable)
Use this when sudo is not available or requires interactive password entry.
Steps:
- Detect architecture:
uname -m(e.g.,x86_64,aarch64)
- Get the latest download URL using GitHub API:
curl -s https://api.github.com/repos/databricks/cli/releases/latest | grep "browser_download_url.*linux.*$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')" | head -1 | cut -d '"' -f 4 - Download and install to
~/.local/bin:mkdir -p ~/.local/bin cd ~/.local/bin curl -L "<download-url>" -o databricks.tar.gz tar -xzf databricks.tar.gz rm databricks.tar.gz chmod +x databricks - Add to PATH (add to
~/.bashrcor~/.zshrcfor persistence):export PATH="$HOME/.local/bin:$PATH" - Verify:
databricks -v
Notes:
- The download files are
.tar.gzarchives (not.zip) with naming pattern:databricks_cli_<version>_linux_<arch>.tar.gz - Common architectures:
amd64(x86_64),arm64(aarch64) - This method works in containerized environments and sandboxed IDEs (e.g. Cursor) without sudo access
Windows (preferred: WinGet)
Run in Command Prompt (then restart the terminal session):
winget search databrickswinget install Databricks.DatabricksCLI
Verify:
databricks -v
Windows alternative: Chocolatey (Experimental)
Run:
choco install databricks-cli
Verify:
databricks -v
Windows fallback: curl installer (recommended via WSL)
Databricks recommends WSL for the curl-based install path. Requirements:
- WSL available
unzipinstalled in the environment where you run the installer
Run (in WSL bash):
curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/main/install.sh | sh
Verify (in same environment):
databricks -v
If you must run curl install outside WSL, run as Administrator.
Installs to C:\Windows\databricks.exe.
Manual install (all OSes): download from GitHub releases
Use this when package managers or curl install are not possible.
Steps:
- Get the latest release download URL:
- Visit https://github.com/databricks/cli/releases/latest
- OR use GitHub API:
curl -s https://api.github.com/repos/databricks/cli/releases/latest | grep browser_download_url
- Download the appropriate file for your OS and architecture:
- Linux:
databricks_cli_<version>_linux_<arch>.tar.gz(use tar -xzf) - macOS:
databricks_cli_<version>_darwin_<arch>.zip(use unzip) - Windows:
databricks_cli_<version>_windows_<arch>.zip(use native extraction) - Common architectures:
amd64(x86_64),arm64(aarch64/Apple Silicon)
- Linux:
- Extract the archive.
- Ensure the extracted
databricksexecutable is on PATH, or run it from its folder. - Verify with
databricks -v.
Update / repair procedures
Homebrew update (macOS/Linux)
brew upgrade databricksdatabricks -v
WinGet update (Windows)
winget upgrade Databricks.DatabricksCLIdatabricks -v
curl update (all OSes)
- Delete existing binary:
- macOS/Linux:
/usr/local/bin/databricks - Windows:
C:\Windows\databricks.exe
- macOS/Linux:
- Re-run:
curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/main/install.sh | sh
- Verify:
databricks -v
Common failures & fixes (agent playbook)
Target path <path> already exists:- Delete the existing binary at the install target, then rerun.
- Permission error writing
/usr/local/bin:- Re-run curl installer with
sudo(macOS/Linux). - If sudo requires interactive password, use manual install to
~/.local/bininstead.
- Re-run curl installer with
sudo: a terminal is required to read the password:- Cannot use sudo in non-interactive environments (containers, CI/CD).
- Use manual install to
~/.local/binmethod instead (see "Linux alternative" section).
- Windows PATH not updated after WinGet:
- Restart Command Prompt/PowerShell.
- Multiple
databricksbinaries on PATH:- Use
which databricks(macOS/Linux/WSL) orwhere databricks(Windows) and remove the wrong one.
- Use
- Wrong file type (trying to unzip a tar.gz):
- Linux releases are
.tar.gzfiles, usetar -xzfnotunzip. - macOS and Windows releases are
.zipfiles, use appropriate extraction tool.
- Linux releases are
databricks: command not foundafter installation to~/.local/bin:- Add to PATH:
export PATH="$HOME/.local/bin:$PATH" - For persistence, add the export command to
~/.bashrcor~/.zshrc.
- Add to PATH: