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 lakehouse engineering agent directly to macOS, Linux, and Windows workstations. Below is a complete, benchmarked 10-question technical reference covering installation, UI vs. CLI architecture, local Python analysis, Unity Gateway, Omnigent, session recovery, MCP token automation, and unified DBU billing.
1. How do I install and verify Databricks Genie Code CLI (v0.5.1)?
Short answer: Install Databricks CLI v1.0.0 or newer first, run the official Genie Code CLI installer for macOS/Linux or Windows PowerShell, and run genie doctor --summary to verify OAuth U2M authentication and workspace connectivity.
# macOS / Linux curl -fsSL https://github.com/databricks/genie-code-cli/releases/latest/download/install.sh | bash genie --version genie doctor --summary # Windows PowerShell (Windows 11 MXC sandbox supported) irm https://github.com/databricks/genie-code-cli/releases/latest/download/install.ps1 | iex genie --version genie doctor --summary 2. What is the difference between Genie Code in the Workspace UI and Genie Code 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 admin budget and free monthly allowance.
- Execution boundary: UI operates on workspace files and attached compute; CLI operates on your local Git repo, local Python/Polars/DuckDB environments, and Databricks Asset Bundles (DABs).
- Skill discovery: CLI loads personal skills from
~/.genie/skills/and project skills from.agents/skills/; it does not automatically pull workspace.assistant/skills/. - Project guardrails: Place a root
AGENTS.mdfile in your repository to enforce Unity Catalog three-level naming, DABs validation, and test conventions.
3. How does the Windows 11 sandbox work in Genie Code CLI?
Short answer: On Windows 11, Genie Code CLI supports native Microsoft Execution Container (MXC) sandboxing so file edits and shell commands run inside an isolated boundary before touching host directories.
Always keep write-confirmation prompts enabled (Ask first mode) when executing shell commands against production repositories or cloud deployment profiles.
4. How do I use Genie Code CLI for local Python data analysis and headless automation?
Short answer: Authenticate with databricks auth login, inspect local Parquet/CSV files with Polars or DuckDB from your terminal, and use genie exec --output-schema for structured JSON output in automated pipelines.
databricks auth login --host https://<your-workspace>.cloud.databricks.com genie exec --output-schema ./schemas/dq_report.json \ "Profile ./data/orders.parquet with DuckDB, check null keys, and return JSON summary" < /dev/null 5. How does Genie Code CLI relate to Unity Gateway (ug claude, ug codex, Cursor)?
Short answer: Genie Code CLI routes model inference and telemetry through Unity Gateway under your unified Genie Code budget, while Unity Gateway CLI (ug) lets teams also govern external harnesses like Claude Code (ug claude), Codex (ug codex), and Cursor (ug mcp add --agents cursor).
- Use
geniewhen you want bundled Databricks skills, native Genie Ontology/Unity Catalog access, and unified Genie billing. - Use
ug claudeorug mcp add --agents cursorwhen your team wants to keep an external editor harness while still enforcing Databricks AI Gateway guardrails and cost tracking.
6. What is the relationship between Omnigent and Genie Code CLI?
Short answer: Genie Code CLI (genie) is Databricks's first-party single-agent terminal harness with bundled Databricks skills, whereas Omnigent is an open-source multi-harness meta-agent that can orchestrate across multiple coding backends through Unity Gateway.
7. How do I keep long-running Genie Code CLI sessions resumable if my terminal drops?
Short answer: Launch genie inside a named tmux session so VPN reconnects or closed laptops never abort multi-file refactors, and restore conversation state anytime with genie resume --last.
tmux new -s genie-migration genie # After reconnecting later: tmux attach -t genie-migration genie resume --last 8. How do I fix managed MCP 401 token expiration errors in Genie Code CLI?
Short answer: Managed Databricks MCP servers require a fresh OAuth access token; export DATABRICKS_MCP_TOKEN dynamically from databricks auth token right before starting genie so expired tokens never trigger 401 errors.
export DATABRICKS_MCP_TOKEN="$(databricks auth token --profile prod | jq -r .access_token)" genie 9. What are the authentication and remote SSH limitations of Genie Code CLI?
Short answer: Genie Code CLI enforces interactive OAuth user-to-machine (U2M) authentication under your personal Unity Catalog identity and does not support browserless remote SSH tunnels where OAuth callbacks cannot complete.
For headless CI/CD pipelines running under a service principal or PAT, use Databricks Asset Bundles CLI or route external automation via Unity Gateway where supported.
10. How do I audit Genie Code CLI DBU billing in SQL?
Short answer: Query system.billing.usage filtered by billing_origin_product = 'GENIE' and group by usage_metadata.genie.surface to separate GENIE_CODE_CLI consumption from workspace surfaces.
SELECT usage_date, usage_metadata.genie.surface AS surface, ROUND(SUM(usage_quantity), 4) AS total_dbus FROM system.billing.usage WHERE billing_origin_product = 'GENIE' AND usage_date >= CURRENT_DATE() - INTERVAL 30 DAYS GROUP BY ALL ORDER BY usage_date DESC; 