mirror of https://github.com/databricks/cli.git
b9406efd27
## Changes This now uses: * libs/cmdio to determine interactivity and perform prompting * libs/databrickscfg to persist the profile It loads a config.Config structure from the environment just like we do for unified authentication. It is therefore possible to specify both the host and token with environment variables. ## Tests ``` pieter.noordhuis@L4GHXDT29P /tmp % export DATABRICKS_CONFIG_FILE=.databrickscfg pieter.noordhuis@L4GHXDT29P /tmp % databricks configure Databricks Host: https://foo.bar Personal Access Token: ***** pieter.noordhuis@L4GHXDT29P /tmp % cat .databrickscfg [DEFAULT] host = https://foo.bar token = token pieter.noordhuis@L4GHXDT29P /tmp % echo token | databricks configure Error: host must be set in non-interactive mode pieter.noordhuis@L4GHXDT29P /tmp % echo token | databricks configure --host foo Error: must start with https:// pieter.noordhuis@L4GHXDT29P /tmp % echo token | databricks configure --host https://foo pieter.noordhuis@L4GHXDT29P /tmp % cat .databrickscfg [DEFAULT] host = https://foo token = token pieter.noordhuis@L4GHXDT29P /tmp % cat .databrickscfg pieter.noordhuis@L4GHXDT29P /tmp % databricks configure --host https://foo Personal Access Token: ****** pieter.noordhuis@L4GHXDT29P /tmp % cat .databrickscfg [DEFAULT] host = https://foo token = token2 ``` |
||
---|---|---|
.codegen | ||
.github | ||
.vscode | ||
bundle | ||
cmd | ||
docs | ||
folders | ||
internal | ||
libs | ||
python | ||
.codegen.json | ||
.gitattributes | ||
.gitignore | ||
.goreleaser.yaml | ||
CHANGELOG.md | ||
LICENSE | ||
Makefile | ||
NOTICE | ||
README.md | ||
go.mod | ||
go.sum | ||
main.go | ||
main_test.go |
README.md
Databricks CLI
This project is in private preview.
Documentation about the full REST API coverage is avaialbe in the docs folder.
Documentation is available at https://docs.databricks.com/dev-tools/cli/databricks-cli.html.
Installation
This CLI is packaged as a dependency-free binary executable and may be located in any directory. See https://github.com/databricks/cli/releases for releases and the docs pages for installation instructions.
Authentication
This CLI follows the Databricks Unified Authentication principles.
You can find a detailed description at https://github.com/databricks/databricks-sdk-go#authentication.