Skip to main content

Databricks CLI commands

note

Databricks CLI use is subject to the Databricks License and Databricks Privacy Notice, including any Usage Data provisions.

This article provides information about available Databricks CLI commands. This information supplements the command line help. For more information about installing and using the Databricks CLI, see Install or update the Databricks CLI and Databricks CLI.

The Databricks CLI includes the command groups listed in the following tables. Command groups contain sets of related commands, which can also contain subcommands. To output usage and syntax information for a command group, an individual command, or subcommand:

  • databricks <command-group> -h
  • databricks <command-group> <command-name> -h
  • databricks <command-group> <command-name> <subcommand-name> -h

Many CLI commands map to operations that are documented in the Databricks REST API reference.

Workspace commands

Group

Description and commands

fs

Commands for managing files and the file system:

cat, cp, ls, mkdir, rm

git-credentials

Commands for registering personal access tokens for Databricks to do operations on behalf of the user:

create, delete, get, list, update

repos

Commands for allowing users to manage their git repos:

create, delete, get, list, update

get-permission-levels, get-permissions, set-permissions, update-permissions

secrets

Commands for managing secrets, secret scopes, and access permissions:

create-scope, delete-acl, delete-scope, delete-secret, get-acl, get-secret, list-acls, list-scopes, list-secrets, put-acl, put-secret

workspace

Commands to list, import, export, and delete notebooks and folders in the workspace:

delete, export, export-dir, get-status, import, import-dir, list, mkdirs

get-permission-levels, get-permissions, set-permissions, update-permissions

Group

Description and commands

fs

Commands for managing files and the file system:

cat, cp, ls, mkdir, rm

git-credentials

Commands for registering personal access tokens for Databricks to do operations on behalf of the user:

create, delete, get, list, update

repos

Commands for allowing users to manage their git repos:

create, delete, get, list, update

get-permission-levels, get-permissions, set-permissions, update-permissions

secrets

Commands for managing secrets, secret scopes, and access permissions:

create-scope, delete-acl, delete-scope, delete-secret, get-acl, get-secret, list-acls, list-scopes, list-secrets, put-acl, put-secret

workspace

Commands to list, import, export, and delete notebooks and folders in the workspace:

delete, export, export-dir, get-status, import, import-dir, list, mkdirs

get-permission-levels, get-permissions, set-permissions, update-permissions

Compute commands

Group

Description and commands

cluster-policies

Commands to control users' ability to configure clusters based on a set of rules:

create, delete, edit, get, list

get-permission-levels, get-permissions, set-permissions, update-permissions

clusters

Commands that allow you to create, start, edit, list, terminate, and delete clusters:

change-owner, create, delete, edit, events, get, list, list-node-types, list-zones, permanent-delete,pin, resize, restart, spark-versions, start, unpin