Databricks CLI tutorial
Note
This information applies to Databricks CLI versions 0.200 and above, which are in Public Preview. To find your version of the Databricks CLI, run databricks -v.
For information beyond this tutorial about Databricks CLI versions 0.200 and above, see the Databricks CLI reference.
The Databricks command-line interface (also known as the Databricks CLI) utility provides an easy-to-use interface to automate the Azure Databricks platform from your terminal, command prompt, or automation scripts.
This article demonstrates how to quickly get started with the Databricks CLI.
The following hands-on tutorial assumes:
- You have curl installed.
- You have an Azure Databricks personal access token that maps to your Azure Databricks user account for the target Azure Databricks workspace that you want to run the Databricks CLI against.
- If you are using Linux or macOS, you are running a Linux-style terminal, such as
bashorzshor the macOS Terminal app. - If you are using Windows, you are running a Linux-style terminal, such as the Windows Subsystem for Linux (WSL), or Git BASH in Git for Windows.
Complete the following steps:
From your terminal, run the following command to use
curlto install the CLI:curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/main/install.sh | shNote
For Linux or macOS, if an error message states that
/usr/local/binis not writable, then run the command again withsudo.Run the CLI’s
configurecommand to configure authentication between the CLI and your workspace:databricks configureAt the first prompt,
Databricks Host: https://, enter your workspace URL and pressEnter.At the second prompt,
Personal Access Token, enter your personal access token value and pressEnter.
Next steps
After you set up the Databricks CLI:
- To learn how to use the CLI, see Use the CLI.
- If the CLI does not run or produces unexpected results, see Verify your CLI installation.
- To configure the CLI to work with multiple Azure Databricks workspaces as well as with Azure Databricks accounts, see Get information about configuration profiles.
- To use Azure Databricks authentication types other than personal access token authentication, see Set up authentication.
- For more advanced CLI installation and update instructions, see Install the CLI and Update the CLI.
Run the Databricks CLI on a cluster
If you want to install, configure, and run the Databricks CLI on an Azure Databricks cluster instead of on your local machine, the fastest way to do this is as follows:
- In the Azure Databricks workspace user interface, on the sidebar, click Compute.
- Click the name of the existing cluster that you want to install the Databricks CLI on.
- Click Start, if the cluster is not already running.
- After the cluster is running, on the Apps tab, click Web Terminal. A Bash-style terminal appears, and
curlis already installed. - Continue with the procedure at the beginning of this article to install, configure, and run the CLI on the cluster.
Note that whenever you click Start to start the cluster, you must then reinstall and reconfigure the CLI on the cluster. This is because a new virtual machine is provisioned each time you click Start, and the new virtual machine does not include the CLI by default.
Feedback
Submit and view feedback for

