Why it exists
If you run more than one Databricks workspace (dev, staging, a region or two), the same
chore happens over and over: open each workspace, run the same query, click the same
button, copy the same secret. sleepybricks does it once, everywhere, and prints a tidy
table per workspace.
It authenticates from the ~/.databrickscfg you already have, so there's nothing new to
set up. Every command takes a comma-separated list of profiles, like dev,stg,us.
What it can do
sql: run a statement (or a.sqlfile) on each workspace's serverless warehouse, total a column across all of them with--sum, or collect every row into one CSVrun-job: trigger a job by name in each workspacegrant: grant Unity Catalog privileges on a table, schema, or whole catalogwrite-secret/create-scope: keep secrets in sync everywhereput-file/propagate-file/pull-repo: ship notebooks and code to every workspacegroups-audit: audit account-level groups and their membersupdate-clusters: make sure you have a pinned, latest-LTS personal cluster in each one--jsonon any command, for piping into other tools
Quick start
uv tool install sleepybricks # or: pipx install sleepybricks
databricks configure --token # once per workspace, if you haven't already$ sleepybricks sql -s "select region, count(*) tenants from tenants group by region" dev,stg
āāā š©āš» Development (dev) āāā
region tenants
--------- -------
us-west-2 1043
eu-west-1 512
āāā š§ Staging (stg) āāā
region tenants
--------- -------
us-west-2 12