git worktree manager · v0.4

Git worktrees without
the setup friction.

git worktree add is the easy part. .env files, node_modules, build caches, install scripts — that's where every team gives up. Grove automates it.

$ grove create feature/auth
Creating worktree at ./worktrees/auth
   git worktree created
   copied 2 .env file(s)
   symlinked node_modules
   afterCreate done (3.2s)

Worktree "auth" ready · port 3487.
  cd $(grove cd auth)
$ grove list
  ALIAS     BRANCH              PORT   STATE
  main      main                3000   clean
  auth      feature/auth        3487   clean
  payments  feature/payments    3612   dirty
  review-42 pr-42-fix-sidebar   3721   clean
$ grove analyze
Project: /home/dev/myapp

Suggested additions:
  + afterCreate "yarn install"
      reason: package.json packageManager=yarn
  + copyDirs ".next/cache"
      reason: next.config.js detected
  + afterCreate "npx husky"
      reason: .husky/_ gitignored (runtime dir)

Apply with: grove analyze --apply
$ grove review 42
Fetching PR #42 "Fix sidebar overflow" by @alice
   fetched via gh
   worktree created
   envs + symlinks + afterCreate done

Ready · port 3721. cd $(grove cd review-42)
binary~6 MB
runtime depsjust git
platformsdarwin · linux
archamd64 · arm64
languageGo
licenseMIT
— 01 · the problem

The part nobody ships.

Worktrees are almost perfect for parallel branches. Almost.

plain git worktree add
  • .env files missing
  • no node_modules, full reinstall
  • cold build cache
  • port 3000 collision
  • setup script not run
  • orphans when you forget
with grove create
  • .env* copied recursively
  • node_modules symlinked
  • .next/dist warm-copied
  • stable port from alias hash
  • afterCreate hook runs
  • state tracked in .groverc.json
— 02 · features

Everything git worktree add should've done.

A dozen behaviors. Together they turn "possible" into "default".

01

Symlinked node_modules

No reinstall per worktree. Grove symlinks configured directories from the main tree. grove detach breaks the link when branches diverge.

02

Per-worktree ports

Every worktree gets a stable port derived from its alias hash — same alias, same port, every time. Exposed as $GROVE_PORT in your setup script.

Auto .env copy

Walks the project recursively and copies every .env* to the new worktree, preserving directory structure.

Build cache (copyDirs)

Copy .next, dist, target into new worktrees for a warm start instead of a cold rebuild.

PR review

grove review 42 checks out a GitHub PR into a ready-to-run worktree via gh.

afterCreate hooks

One command or an array. Fail-fast, with $GROVE_ALIAS/BRANCH/PORT/PATH in scope.

Orphan handling

grove adopt registers outside worktrees. grove doctor finds stale state.

Templates

Save any .groverc.json as a reusable template. grove init --template nextjs.

Interactive picker

grove cd with no args opens a fuzzy picker. Tab completion everywhere.

Project detection

grove analyze scans for husky, package managers, direnv, mise, Python, Cargo, Gradle, Next.js, Turbo — and proposes .groverc.json entries. Same detector runs inside grove init and grove doctor.

Detached worktrees

grove create --detach skips symlinks for branches that bump dependencies. Pairs with afterDetachedCreate, which runs before afterCreate so installs land locally instead of mutating the main tree.

Agent skill

Ships an embedded skill for Claude Code, Codex CLI, Gemini CLI, and friends. grove skill install autodetects agent dirs so they route worktree ops through Grove.

— 03 · install

Three ways to plant it.

Single static binary. darwin & linux, amd64 & arm64.

macOS · Linux

Homebrew

recommended
$ brew tap verbaux/tap
$ brew install grove
any Go toolchain

go install

$ go install github.com/verbaux/grove@latest
prebuilt

Binary release

GitHub Releases →
chmod +x, drop in $PATH, done.

— 04 · reference

Commands.

Grouped by when you'd reach for them.

01

Setup

Once per project.

  • grove initInteractive wizard — creates .groverc.json, offers detected conventions as prompts
  • grove analyzeScan project, suggest config additions; --apply, --clean, --dry-run, --json
  • grove templateSave / list / apply reusable configs
  • grove skill installInstall the embedded agent skill into Claude / Codex / Gemini
  • grove shell-initCompletion + a gcd helper to eval from your shell rc
  • grove completionShell completion for zsh, bash, fish, powershell
02

Daily

The ones you'll alias.

  • grove create <branch>Create worktree + copy envs + symlinks + afterCreate; --detach for independent deps
  • grove cd [name|index]Print path to cd into; fuzzy picker without args
  • grove open [name]Open a worktree in your editor; editor config / $EDITOR / --editor
  • grove listTable of worktrees with status, port, and index; --json, --plain
  • grove review [pr]Check out a GitHub PR into a ready-to-run worktree
03

Maintenance

When things get messy.

  • grove remove <name>Remove a worktree (dirty-state check); --force to skip
  • grove cleanRemove all managed worktrees + orphan cleanup; --force to skip
  • grove adoptRegister an orphan worktree
  • grove detachRemove symlinks; --copy preserves contents first
  • grove doctorDiagnose config, state, symlinks, ports, deps, stale paths, missing detector suggestions
— 05 · ship it

Tend your branches.
Grove does the rest.

Small Go binary. No runtime dependencies beyond git. MIT-licensed.