Skip to content

thisguymartin/grove

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grove

Grove is an AI-native terminal workspace for developers who work across multiple git branches simultaneously. Run one command from any repo and get a fully wired Zellij session with a custom Grove tab bar: one tab per worktree, each pre-loaded with LazyGit, your AI agent of choice, and a shell.

No config files to edit. No sessions to manage. Just grove and you're in.

Screenshot 2026-03-09 at 9 33 50 AM Screenshot 2026-03-09 at 9 35 41 AM

How It Works

Grove is a thin shell layer on top of tools you already use — git worktrees, Zellij, LazyGit, and your AI agent.

  1. Worktrees — each branch lives in its own directory on disk, so you can have main, feature/auth, and fix-login all checked out at the same time with no stashing.

  2. grove . — discovers all worktrees in the current repo and generates a Zellij layout on the fly. Each worktree becomes a tab. Use grove claude ., grove opencode ., or grove codex . to choose a different AI editor before the path.

  3. Each tab gets three side-by-side panes:

    • Left (60%): LazyGit scoped to that worktree's directory
    • Middle (~12%): A Workbench shell — run tests, servers, whatever
    • Right (~28%): Your AI agent (claude, gemini, opencode, or codex) in that worktree
  4. Custom tab bar — Grove vendors zjstatus and replaces the stock Zellij tab/status bars with one colorful top bar. It shows mode, worktree tabs, the active AI editor, and the Zellij session name. If you prefer the native Zellij bars, launch with GROVE_ZELLIJ_BAR=stock grove ..

  5. Overview tab — the first tab shows a live dashboard with worktree status, AI agent status, PR/CI status, and resource monitoring across all worktrees.

  6. Session hygienegrove auto-kills any previous session with the same name before launching, and sessions quit when you close the terminal. No stale Zellij sessions accumulating.

The workflow: create worktrees with wtab/wta, run grove, and navigate between branches with Alt+Left/Right. Clean up finished branches with wtrm or wtp.

Architecture details: docs/architecture.md

Install

Recommended: One-liner

bash / zsh:

bash <(curl -s https://raw.githubusercontent.com/thisguymartin/grove/main/install/install.sh)

fish shell (process substitution works differently in fish — download and run directly):

curl -s https://raw.githubusercontent.com/thisguymartin/grove/main/install/install.sh | bash

This will clone the repo, install brew dependencies, and wire up your shell aliases automatically. It detects your shell (zsh/bash/fish) and is safe to run multiple times — re-running always does a clean reinstall (force-deletes the existing install, kills Grove Zellij sessions, and re-clones).

To install to a custom directory:

bash / zsh:

GROVE_DIR=~/my/path bash <(curl -s https://raw.githubusercontent.com/thisguymartin/grove/main/install/install.sh)

fish shell:

GROVE_DIR=~/my/path curl -s https://raw.githubusercontent.com/thisguymartin/grove/main/install/install.sh | bash

Manual

bash / zsh:

# 1. Clone
git clone https://github.com/thisguymartin/grove.git ~/.local/share/grove

# 2. Install dependencies
brew bundle --file=~/.local/share/grove/brewfile

# 3. Add to ~/.zshrc (or ~/.bashrc)
echo 'source ~/.local/share/grove/git-worktree-aliases.sh' >> ~/.zshrc

# 4. Reload
source ~/.zshrc

fish shell:

# 1. Clone
git clone https://github.com/thisguymartin/grove.git ~/.local/share/grove

# 2. Install dependencies
brew bundle --file=~/.local/share/grove/brewfile

# 3. Add to ~/.config/fish/config.fish
echo 'source ~/.local/share/grove/git-worktree-aliases.fish' >> ~/.config/fish/config.fish

# 4. Reload
source ~/.config/fish/config.fish

Usage

cd into any git repo and run:

grove .

Full command reference: docs/commands.md

To test the rendered Zellij layout locally without launching Grove directly:

bash ./launch-worktrees.sh --write-layout /tmp/grove-layout.kdl .
zellij --layout /tmp/grove-layout.kdl

To test the old stock Zellij bars:

GROVE_ZELLIJ_BAR=stock bash ./launch-worktrees.sh --write-layout /tmp/grove-layout.kdl .
zellij --layout /tmp/grove-layout.kdl

This will:

  1. Discover all git worktrees in your current repo
  2. Auto-kill any previous session with the same name
  3. Launch Zellij with an Overview tab (first) + one custom-bar tab per worktree

On first launch, Zellij may ask for permission to load the vendored zjstatus plugin from vendor/zjstatus/zjstatus.wasm.

Sessions auto-quit when you close the terminal — no stale sessions.

Commands

Core commands live in docs/commands.md.

Most-used commands:

Command Description
grove . Launch workspace with opencode as the default AI editor
grove claude . Launch workspace with Claude
grove codex . Launch workspace with Codex
wtab <branch> Create a new branch + worktree
wta <branch> Add worktree for an existing branch
wtco <branch> Jump into a worktree directory
wtinfo [branch] Show worktree status and upstream info
wtp [base] Prune merged worktrees

Git Worktree Toolkit (gwt)

A standalone script for worktree lifecycle management. See docs/commands.md for the full command list.

alias gwt='~/.local/share/grove/git-worktree.sh'

Worktree Lifecycle

# Create worktrees
wtab feature/auth          # new branch + worktree
wta existing-branch        # worktree for existing remote branch

# List what you have
wtls

# Launch workspace with all worktrees as tabs
grove .
grove claude .

# Navigate tabs
# Alt+Left/Right to switch between worktree tabs
# Alt+Arrow Keys to move between panes

# Inspect worktrees
wtco feature/auth          # cd into a worktree
wtcd feature/auth          # same as wtco
wtinfo feature/auth        # show path, HEAD, ahead/behind, status
wtdiff feature/auth        # diff vs base branch

# Rename / lock
wtrn old-name new-name    # rename a worktree's branch
wtlock /path/to/worktree   # lock a worktree
wtunlock /path/to/worktree # unlock a worktree

# Clean up when done
wtrm /path/to/worktree    # remove a specific worktree
wtp                        # auto-prune merged worktrees

# Or via gwt (prompts to delete branch too)
gwt rm feature/auth

Session Management

grove auto-kills its previous session before re-launching. Sessions also auto-quit when the terminal closes (on_force_close "quit").

zj-kill                    # Kill ALL Zellij sessions (nuclear option)
zellij kill-session <name> # Kill a specific session

Project Docs

Note: layouts/workspace.kdl.template is an internal template rendered by Grove. It is not meant to be passed directly to zellij --layout.

Requirements

Grove vendors zjstatus for the custom Zellij bar. No separate install is required.

Claude Code Integration

Grove includes a built-in Claude Code slash command for guided setup. After cloning the repo, run /setup in any Claude Code session to get interactive help with installation, configuration, and troubleshooting.

Project-level context is also provided via CLAUDE.md so Claude Code understands the architecture out of the box.

Keybindings

See CHEATSHEET.md for the full keyboard reference.

License

MIT

About

AI-native terminal workspace. One command to launch colored Zellij tabs per git worktree, each with LazyGit + AI Agent + Workbench.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages