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 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.

Nine 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.

— 03 · install

One command 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
  • grove templateSave / list / apply reusable configs
  • grove completionShell completion for zsh, bash, fish, powershell
02

Daily

The ones you'll alias.

  • grove create <branch>Create worktree + copy envs + symlinks + afterCreate
  • grove cd [name|index]Print path to cd into; fuzzy picker without args
  • grove listTable of worktrees with status, port, and index
  • 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)
  • grove cleanRemove all managed worktrees + orphan cleanup
  • grove adoptRegister an orphan worktree
  • grove detachRemove symlinks (optionally copy contents first)
  • grove doctorDiagnose config, state, symlinks, ports, dependencies
— 05 · ship it

Tend your branches.
Grove does the rest.

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