{"library":"databricks-cli","title":"Databricks CLI","description":"The `databricks-cli` Python package provided a command-line interface for Databricks. As of version 0.18.0, this package is deprecated. Users are advised to migrate to the new Databricks CLI (an independent executable) for command-line operations and to the `databricks-sdk-py` Python SDK for programmatic interactions. Databricks plans no further support or new feature work for this legacy package.","status":"deprecated","version":"0.18.0","language":"en","source_language":"en","source_url":"https://github.com/databricks/databricks-cli","tags":["databricks","cli","cloud","data-engineering","deprecated","etl"],"install":[{"cmd":"pip install databricks-cli","lang":"bash","label":"Install legacy databricks-cli"},{"cmd":"pip install databricks-sdk","lang":"bash","label":"Recommended: Install new Databricks SDK for Python"},{"cmd":"curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/main/install.sh | sh","lang":"bash","label":"Recommended: Install new Databricks CLI executable"}],"dependencies":[{"reason":"Required for running the Python package.","package":"python","optional":false}],"imports":[{"note":"The programmatic interface (SDK-like usage) of `databricks-cli` is deprecated. Migrate to the official `databricks-sdk` for Python, which offers `WorkspaceClient` for workspace-level APIs and `AccountClient` for account-level APIs.","wrong":"from databricks_cli.sdk import ApiClient\nfrom databricks_cli.sdk import service","symbol":"ApiClient, service","correct":"from databricks.sdk import WorkspaceClient\n# Or, for account-level operations:\nfrom databricks.sdk import AccountClient"}],"quickstart":{"code":"# Authenticate via environment variables (recommended for quickstart)\n# export DATABRICKS_HOST=\"https://<your-workspace-url>\"\n# export DATABRICKS_TOKEN=\"dapiXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\"\n\n# --- Old databricks-cli usage (deprecated) ---\n# The primary use was via the command line, e.g.:\n# databricks clusters list\n\n# --- New Databricks SDK for Python (recommended for programmatic access) ---\nimport os\nfrom databricks.sdk import WorkspaceClient\n\n# The SDK automatically uses DATABRICKS_HOST and DATABRICKS_TOKEN environment variables\nw = WorkspaceClient(\n    host=os.environ.get('DATABRICKS_HOST', ''),\n    token=os.environ.get('DATABRICKS_TOKEN', '')\n)\n\n# Example: List clusters using the new SDK\nprint(\"Listing Databricks clusters (using new SDK):\")\nfor c in w.clusters.list():\n    print(f\"  - {c.cluster_name} ({c.cluster_id})\")\n\n# --- New Databricks CLI executable (recommended for command-line access) ---\n# After installing the new CLI executable (not this Python package):\n# databricks auth login --host https://<your-workspace-url>\n# databricks clusters list\n","lang":"python","description":"This quickstart first demonstrates how to use the recommended `databricks-sdk` for Python to programmatically list Databricks clusters, assuming authentication via environment variables (`DATABRICKS_HOST`, `DATABRICKS_TOKEN`). It also highlights typical command-line usage for both the legacy `databricks-cli` and the recommended new `databricks` CLI executable. Users should migrate programmatic logic to `databricks-sdk` and command-line scripts to the new `databricks` CLI."},"warnings":[{"fix":"For Python SDK usage: `pip install databricks-sdk` and update imports/code to use `databricks.sdk.WorkspaceClient` or `databricks.sdk.AccountClient`. For CLI usage: Install the new Databricks CLI executable via `curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/main/install.sh | sh` and adapt scripts to use the new `databricks` commands.","message":"This `databricks-cli` Python package is deprecated. It receives no new features or support. For programmatic use, migrate to `databricks-sdk-py`. For command-line use, migrate to the new standalone `databricks/cli` executable. Failure to migrate will result in outdated functionality and potential compatibility issues.","severity":"breaking","affected_versions":"0.18.0 and below"},{"fix":"Transition authentication methods to Databricks unified authentication, prioritizing OAuth M2M/U2M. Update `DATABRICKS_TOKEN` usage to alternative methods where possible. Refer to Databricks authentication documentation for the latest best practices.","message":"Personal Access Token (PAT) authentication for Databricks is deprecated, and basic authentication (username/password) reached End-of-Life on July 10, 2024. New projects should use OAuth machine-to-machine (M2M) or user-to-machine (U2M) authentication.","severity":"deprecated","affected_versions":"All versions"},{"fix":"Ensure `urllib3` is updated to a compatible version alongside `databricks-cli` (or its recommended replacements, the `databricks-sdk` or new CLI) to avoid unexpected errors. If encountering issues, check the `urllib3` version in your environment and upgrade it or pin a known working version.","message":"Version 0.18.0 of `databricks-cli` removed the explicit pin on `urllib3 < 2`. While this unblocks newer `urllib3` versions, older environments might encounter compatibility issues if they upgrade `databricks-cli` but retain an old `urllib3` that has breaking changes with other dependencies.","severity":"gotcha","affected_versions":"0.18.0"}],"env_vars":null,"last_verified":"2026-04-05T00:00:00.000Z","next_check":"2026-07-04T00:00:00.000Z"}