Symlinked node_modules
No reinstall per worktree. Root-relative glob patterns such as apps/*/node_modules keep every workspace linked automatically. grove detach breaks the links when branches diverge.
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 for branch "feature/auth" at /home/dev/myapp-auth ✓ git worktree created ✓ copied 2 .env file(s) ✓ symlinked node_modules ✓ afterCreate done Worktree "auth" ready (port 3487). cd $(grove cd auth)
$ grove list # NAME BRANCH PATH PORT STATUS 1 main main /home/dev/myapp - ✓ clean 2 auth feature/auth /home/dev/myapp-auth 3487 ✓ clean 3 payments feature/payments /home/dev/myapp-payments 3612 2 modified 4 review-42 pr-42-fix-sidebar /home/dev/myapp-review-42 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 ✓ copied .env files + symlinks + afterCreate done Worktree "pr-42" ready (port 3721). cd $(grove cd pr-42)
Worktrees are almost perfect for parallel branches. Almost.
git worktree add
.env files missingnode_modules, full reinstallgrove create
.env* copied recursivelynode_modules symlinked.next/dist warm-copiedafterCreate hook runs.grove/state.jsongit worktree add should've done.A dozen behaviors. Together they turn "possible" into "default".
node_modulesNo reinstall per worktree. Root-relative glob patterns such as apps/*/node_modules keep every workspace linked automatically. grove detach breaks the links when branches diverge.
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.
.env copyWalks the project recursively and copies every .env* to the new worktree, preserving directory structure.
copyDirs)Copy .next, dist, or patterns such as packages/*/dist into new worktrees for a warm start. Set copyDirsOnDetach to false when detached branches need clean build artifacts.
grove review 42 checks out a GitHub PR into a ready-to-run worktree via gh.
afterCreate hooksOne command or an array. Fail-fast, with $GROVE_ALIAS/BRANCH/PORT/PATH in scope.
grove adopt registers outside worktrees. grove doctor --fix safely repairs only unambiguous local issues.
grove prune removes managed worktrees whose branches are already merged, including squash-merged PRs.
Save any .groverc.json as a reusable template. grove init --template nextjs.
grove cd with no args opens a fuzzy picker. Tab completion everywhere.
grove note auth "waiting for review" keeps short local context beside the worktree and shows it in list/status output.
grove analyze scans for husky, package managers, Docker Compose, Vite/Remix/SvelteKit, Go, Python, Ruby, PHP, Cargo, Gradle, Next.js, Turbo, and Makefile setup targets — then proposes .groverc.json entries. Same detector runs inside grove init and grove doctor.
grove create --detach skips symlinks, can skip incompatible build artifacts with copyDirsOnDetach, and runs afterDetachedCreate for local setup. Later syncs preserve the visible mode; sync --reattach reverses it after local conflicts are resolved.
Ships an embedded skill for agent CLIs. grove skill install autodetects Claude and Codex-style skill dirs so agents route worktree ops through Grove.
Single static binary. darwin & linux, amd64 & arm64.
$ brew tap verbaux/tap $ brew install grove
go install$ go install github.com/verbaux/grove@latest
GitHub Releases →
chmod +x, drop in $PATH, done.
Grouped by when you'd reach for them.
Once per project.
grove initInteractive wizard — creates .groverc.json, offers detected conventions as promptsgrove analyzeScan project, suggest config additions; --apply, --clean, --dry-run, --yes, --jsongrove templateSave / list / show / apply / delete reusable configsgrove skillInstall, uninstall, or inspect the embedded agent skill in detected Claude / Codex-style skill dirsgrove shell-initCompletion + a gcd helper to eval from your shell rcgrove completionShell completion for zsh, bash, fish, powershellThe ones you'll alias.
grove create <branch>Create worktree + setup; --name, --from, --detachgrove cd [name|index]Print path to cd into; fuzzy picker without argsgrove open [name|index]Open a worktree in your editor; editor config / $EDITOR / --editorgrove listTable of worktrees with status, detached mode, port, note, and index; --json, --plaingrove psLive running/stopped status for assigned worktree ports; --jsongrove review [pr]List open PRs or check one out; --name sets the aliasgrove rename <name|index> <new-alias>Rename a managed worktree; moves standard paths and preserves the assigned portgrove note <name|index> [text]Show or set a short local worktree note; --clear removes itWhen things get messy.
grove remove <name|index>Remove a worktree safely; initialized submodule data requires explicit --forcegrove cleanRemove managed worktrees + orphans without forcing submodule neighbors; --force is explicitgrove pruneRemove merged worktrees safely; --base, --yes, explicit --forcegrove adoptRegister an orphan worktreegrove detachRemove symlinks; --copy preserves contents firstgrove doctorDiagnose config, state, symlinks, ports, deps; --fix safely repairs unambiguous local issuesSmall Go binary. No runtime dependencies beyond git. MIT-licensed.