Updated November 28, 2026, for Databricks Genie Code CLI GA (v0.5.1).
Databricks Genie Code CLI reached General Availability on November 18, 2026, bringing a terminal-native engineering agent to macOS, Linux, and Windows workstations. Below is a complete technical Q&A covering installation, UI vs. CLI architecture, local Python workflows, headless JSON execution, and SQL billing audits.
What is Genie Code CLI and how do I install it?
Short answer: Databricks Genie Code CLI (GA v0.5.1) is a local terminal AI agent that edits repository files, queries Unity Catalog data through Genie, and deploys Databricks Asset Bundles under your personal OAuth U2M identity. Install Databricks CLI >= 1.0.0 first, then run the official install script.
# Prerequisite: Databricks CLI >= 1.0.0 databricks --version # Install Genie Code CLI (macOS / Linux) curl -fsSL https://github.com/databricks/genie-code-cli/releases/latest/download/install.sh | bash genie --version genie doctor --summary What’s the difference between Genie Code in the UI and CLI?
Short answer: Workspace Genie Code runs inside Databricks notebooks and SQL editors using .assistant/skills/ and workspace instructions, whereas Genie Code CLI runs locally in your terminal using ~/.genie/skills/, .agents/skills/, and repository-root AGENTS.md. Both share one unified Genie Code budget and 150 DBU/month free tier.
- Workspace UI: Best for interactive notebook exploration, SQL editor queries, and browser-based visualization.
- Genie Code CLI: Best for multi-file Git repositories, local Polars/DuckDB prototyping,
pytestunit tests, and Databricks Asset Bundles (databricks bundle validate). - Unified Billing: Both surfaces draw from the same workspace-managed Genie Code budget and share your monthly 150 DBU free allowance.
Can I use Genie Code outside the Databricks workspace (local terminal, IDE, SSH)?
Short answer: Yes—Genie Code CLI runs in local macOS, Linux, and Windows terminals as well as integrated terminals inside VS Code, Cursor, and JetBrains IDEs. However, headless remote SSH tunnels are not supported because interactive OAuth U2M login requires a local browser callback.
Authenticate once on your workstation so your active Databricks CLI profile supplies short-lived OAuth tokens automatically:
databricks auth login --host https://<your-workspace>.cloud.databricks.com cd my-lakehouse-repo && genie How do I use Genie Code CLI for local Python data analysis without opening the UI?
Short answer: Sign in with databricks auth login, verify connectivity via genie doctor --summary, and run local Polars or DuckDB scripts against Parquet/CSV files while querying Unity Catalog metadata or governed metrics through databricks genie ask without launching a browser.
databricks auth login --host https://<your-workspace>.cloud.databricks.com genie doctor --summary databricks genie ask "Compare local ./data/orders.parquet row counts with main.sales.orders_gold using DuckDB" How do I run Genie Code CLI headlessly with structured JSON output?
Short answer: Use genie exec --output-schema with < /dev/null to run Genie Code CLI non-interactively and enforce a strict JSON schema on the response, making it reliable for automated data quality checks and pre-commit scripts.
genie exec --output-schema ./schemas/dq_check.json \ "Check ./data/events.parquet for null user_ids and duplicate event_ids" < /dev/null How is Genie Code CLI billed and how do I audit DBU spend in SQL?
Short answer: Genie Code CLI is billed under the unified Genie Code budget (including 150 free DBUs/month). Query system.billing.usage joined with system.billing.list_prices, filtering billing_origin_product = 'GENIE' and usage_metadata.genie.surface = 'GENIE_CODE_CLI' to calculate exact dollar cost.
SELECT u.usage_date, u.usage_metadata.genie.surface AS surface, ROUND(SUM(u.usage_quantity), 4) AS total_dbus, ROUND(SUM(u.usage_quantity * lp.pricing.default), 2) AS estimated_usd FROM system.billing.usage u JOIN system.billing.list_prices lp ON u.sku_name = lp.sku_name AND u.cloud = lp.cloud AND u.usage_end_time >= lp.price_start_time AND (lp.price_end_time IS NULL OR u.usage_end_time < lp.price_end_time) WHERE u.billing_origin_product = 'GENIE' AND u.usage_metadata.genie.surface = 'GENIE_CODE_CLI' AND u.usage_date >= CURRENT_DATE() - INTERVAL 30 DAYS GROUP BY ALL ORDER BY u.usage_date DESC;