A keyboard-first TUI for Databricks ops โ lazygit for your data platform
Project description
LazyDatabricks ๐งฑ
A keyboard-first TUI for Databricks โ lazygit for your data platform.
Status โ Logs โ Action in seconds, not clicks.
Design Principles
- Read-first, act-second. Default is safe visibility; destructive actions require explicit arming.
- Spark-true, not API-true. "Is my cluster usable?" matters more than "does the API say RUNNING?"
- Logs are the primary artifact. One keystroke, not seven clicks.
Quick Start
# Install
pip install lazydatabricks
# Or from source
pip install -e ".[dev]"
# Configure (uses same env vars / .databrickscfg as Databricks SDK)
export DATABRICKS_HOST=https://adb-xxx.azuredatabricks.net
export DATABRICKS_TOKEN=dapi...
# Launch TUI (default)
lazydatabricks
# Or use specific profile
lazydatabricks --profile staging
# CLI mode (non-interactive)
lazydatabricks health # Health snapshot
lazydatabricks clusters # List clusters
lazydatabricks jobs # List jobs
lazydatabricks test # Test connection
TUI Overview
LazyDatabricks provides a keyboard-driven interface with five main screens:
- Home (h) โ Health dashboard showing workspace identity, Spark connectivity, cluster/job/warehouse summaries
- Clusters (c) โ List and manage compute clusters with start/terminate/restart actions
- Jobs (j) โ Three-pane hierarchy: Jobs โ Runs โ Detail with run now/cancel/rerun actions
- Warehouses (w) โ SQL warehouse management with start/stop actions
- Config โ Profile switching and connection testing
Safety Model: Armed Mode
LazyDatabricks defaults to READ-ONLY mode. All destructive actions require explicitly arming:
- Press
Ato arm (30-second timer starts) - Header shows red "ARMED (Xs)" countdown
- Execute destructive action (e.g.,
tto terminate cluster) - System auto-disarms after 30 seconds
Destructive actions include:
- Cluster: start, terminate, restart
- Job: run now, cancel, rerun
- Warehouse: start, stop
Keybindings
Global Navigation
| Key | Action |
|---|---|
h |
Home screen |
c |
Clusters screen |
j |
Jobs screen |
w |
Warehouses screen |
A |
Toggle armed mode (30s) |
? |
Show help overlay |
q |
Quit |
Esc |
Back / Close modal |
Home Screen
| Key | Action |
|---|---|
r |
Refresh health data |
Clusters Screen
| Key | Action |
|---|---|
s |
Start cluster (requires armed) |
t |
Terminate cluster (requires armed) |
R |
Restart cluster (requires armed) |
l |
View cluster logs (opens browser) |
r |
Refresh |
Enter |
Open in Databricks UI |
Jobs Screen
| Key | Action |
|---|---|
Tab |
Switch between panes (Jobs โ Runs โ Detail) |
Enter |
Drill down into selection |
Esc |
Back up in hierarchy |
n |
Run job now (requires armed) |
c |
Cancel run (requires armed) |
R |
Rerun (requires armed) |
l |
View run logs |
r |
Refresh |
Logs Screen
| Key | Action |
|---|---|
/ |
Start search |
n |
Next search match |
N |
Previous search match |
f |
Cycle filter (ALL โ ERROR โ WARN+ โ INFO+) |
G |
Go to bottom |
g |
Go to top |
o |
Open in browser (fallback) |
Esc |
Close logs |
Warehouses Screen
| Key | Action |
|---|---|
s |
Start warehouse (requires armed) |
S |
Stop warehouse (requires armed) |
r |
Refresh |
Enter |
Open in Databricks UI |
Config Screen
| Key | Action |
|---|---|
Enter |
Switch to selected profile |
t |
Test connection |
Architecture
src/lazydatabricks/
โโโ models/ # Data models โ stable internal structs
โ โโโ cluster.py # ClusterSummary, ClusterState, ClusterFlag
โ โโโ job.py # JobSummary, RunSummary, RunDetail
โ โโโ warehouse.py # WarehouseSummary, WarehouseState
โ โโโ health.py # HealthSnapshot, SparkStatus
โ โโโ config.py # LazyDatabricksConfig, DatabricksProfile
โโโ api/ # API client layer
โ โโโ client.py # DatabricksClient (SDK wrapper)
โ โโโ clusters.py # ClusterOps
โ โโโ jobs.py # JobOps
โ โโโ warehouses.py # WarehouseOps
โ โโโ health.py # HealthBuilder
โ โโโ logs.py # LogOps
โ โโโ guard.py # ArmedGuard (safety model)
โโโ tui/ # Textual TUI
โโโ app.py # LazyDatabricksApp main class
โโโ theme.py # Colors and CSS
โโโ screens/ # Screen implementations
โ โโโ home.py
โ โโโ clusters.py
โ โโโ jobs.py
โ โโโ logs.py
โ โโโ warehouses.py
โ โโโ config.py
โโโ widgets/ # Reusable widgets
โโโ header.py
โโโ status_bar.py
โโโ help_overlay.py
โโโ confirm_dialog.py
Configuration
LazyDatabricks uses the same configuration as the Databricks SDK:
-
Environment variables (highest priority)
export DATABRICKS_HOST=https://adb-xxx.azuredatabricks.net export DATABRICKS_TOKEN=dapi... export DATABRICKS_CLUSTER_ID=0123-456789-abcdef # optional
-
~/.databrickscfg profiles
[DEFAULT] host = https://adb-xxx.azuredatabricks.net token = dapi... cluster_id = 0123-456789-abcdef [staging] host = https://adb-yyy.azuredatabricks.net token = dapi...
-
CLI flags
lazydatabricks --host https://... --token dapi... --cluster-id 0123... lazydatabricks --profile staging
Development
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest tests/ -v
# Type checking
mypy src/lazydatabricks
# Linting
ruff check src/lazydatabricks
Requirements
- Python 3.10+
- Databricks workspace with API access
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lazydatabricks-1.0.0.tar.gz.
File metadata
- Download URL: lazydatabricks-1.0.0.tar.gz
- Upload date:
- Size: 74.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8409a088449b6613bf8a34ef9450b4e32f9bb65a6c7706a855650bcb77e01423
|
|
| MD5 |
14e6936b4e5df852637696274357a12b
|
|
| BLAKE2b-256 |
7ecfd7846974da6a41665a22f14be5e3558198ef42e533b2bcc5838a8613754d
|
File details
Details for the file lazydatabricks-1.0.0-py3-none-any.whl.
File metadata
- Download URL: lazydatabricks-1.0.0-py3-none-any.whl
- Upload date:
- Size: 87.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
646cf7edb146383bf991f22f3770a6cf1f54495dff99fb290c0d8a17381670da
|
|
| MD5 |
ab0f61bd01b04337dabdfcd462495de7
|
|
| BLAKE2b-256 |
f4630377732e3444de3a969329daddd3d9bca18c3591fed3a4867f95f7b2d296
|