Skip to content

Feature: Add git branch management tools for Looker LookML projects #2678

@roanny

Description

@roanny

Prerequisites

  • I've searched the current open issues
  • I've updated to the latest version of Toolbox

Toolbox version

0.28.0

Environment

  • OS: macOS (darwin/arm64)
  • Looker: Original 26.2.16

Client

  1. Client: Google ADK Python
  2. Version: latest (pip install google-adk)

Summary

The Looker dev tools currently provide dev_mode to toggle Development Mode on/off, plus a full set of file management tools (get_project_file, create_project_file, update_project_file, etc.) and validate_project. However, there are no tools for git branch management — all file operations happen on the user's personal dev branch (dev-<username>) with no way to create shared branches, switch between branches, list available branches, or deploy changes to production.

The Looker API has full support for these operations through the Project methods, but none of them are exposed in the Toolbox.

Current state

Capability Available in Toolbox Available in Looker API
Toggle dev/production mode Yes (dev_mode) Yes (update_session)
File CRUD (create, read, update, delete) Yes Yes
Validate LookML Yes (validate_project) Yes
List git branches No Yes (all_git_branches)
Get current branch No Yes (git_branch)
Create a new branch No Yes (create_git_branch)
Switch/checkout branch No Yes (update_git_branch)
Delete a branch No Yes (delete_git_branch)
Deploy branch to production No Yes (deploy_ref_to_production)

Without branch tools, the Toolbox covers file editing but not the full LookML development lifecycle. Users cannot work on shared branches, develop multiple features in parallel, or programmatically deploy validated changes.

Requested tools

Tool Looker API endpoint Parameters Description
list_git_branches GET /projects/{project_id}/git_branches project_id List all branches (personal and shared) with metadata
get_git_branch GET /projects/{project_id}/git_branch project_id Get the currently checked-out branch
create_git_branch POST /projects/{project_id}/git_branch project_id, name, ref (optional) Create and checkout a new branch. Requires dev mode.
switch_git_branch PUT /projects/{project_id}/git_branch project_id, name Checkout an existing branch. Requires dev mode.
delete_git_branch DELETE /projects/{project_id}/git_branch/{branch_name} project_id, branch_name Delete a branch (shared branches only — personal branches cannot be deleted)
deploy_to_production POST /projects/{project_id}/deploy_ref_to_production project_id, branch (optional), ref (optional) Deploy a branch or ref to the production environment

Use cases

  1. Shared branch collaboration: Multiple developers (or tools) working on the same feature branch — the standard Looker team workflow
  2. Parallel development: Creating separate branches for independent features (feature/sales-views, feature/inventory-explores) and switching between them
  3. Branch inspection: Listing branches before starting work to check if a branch already exists for the intended task
  4. Programmatic deployment: After validate_project succeeds, deploying validated LookML changes to production without switching to Looker IDE
  5. Full development lifecycle: dev_modecreate_git_branch → file edits → validate_projectdeploy_to_production — the complete cycle within the Toolbox

Looker API reference

Notes

  • All write operations (create_git_branch, switch_git_branch, deploy_to_production) require the session to be in dev mode — consistent with existing dev_mode → file edit workflow.
  • list_git_branches and get_git_branch work in both dev and production mode.
  • The GitBranch response includes personal (boolean) and owner_name fields that distinguish personal branches from shared ones.
  • Complementary to existing dev tools — no changes needed to dev_mode or file management tools.

Metadata

Metadata

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions