arbors
v0.1.1
Published
Interactive git worktree manager with TUI
Readme
arbors
A CLI tool for managing git worktrees.
Create a separate directory for each branch and work on multiple branches simultaneously — no stash or switch needed. Automatically copies gitignored files and installs dependencies when creating worktrees.
Install
git clone [email protected]:sungsulee/arbors.git
cd arbors
pnpm install && pnpm build
npm linkShell integration (required for arbors switch and auto cd after arbors add):
# ~/.zshrc
source /path/to/arbors/shell/arbors-wrapper.zsh
# ~/.bashrc
source /path/to/arbors/shell/arbors-wrapper.shThe wrapper captures arbors's __ARBORS_CD__ output and runs cd in the parent shell. Without it, switch and add will print the path but won't change directory.
Workflows
New feature development
# Create a new branch + worktree based on main
arbors add -c feature/login --base main
# This automatically:
# 1. git fetch origin main
# 2. Creates worktree at ~/arbors/{repo}/feature-login
# 3. Copies gitignored files matching copyPatterns (.env, etc.)
# 4. Runs pnpm install (auto-detects from lockfile)
cd ~/arbors/my-project/feature-login
# Start workingWhen done:
arbors remove feature/login
# Refuses to delete if there are uncommitted changesCode reviewing a colleague's PR
Check out a remote branch as a local worktree:
# Automatically fetches from origin and creates worktree
arbors add feature/payment
# If the branch already exists locally, just creates the worktree
# → Tries local first, falls back to originWhen review is done:
arbors remove feature/paymentWorking on multiple branches at once
arbors add -c feature/auth --base main
arbors add -c fix/header-bug --base main
arbors list
# feature/auth ~/arbors/my-project/feature-auth
# fix/header-bug ~/arbors/my-project/fix-header-bug
# Work independently in each directory. No stashing needed.Commands
arbors add <branch> Checkout existing branch (local → remote auto)
arbors add -c <branch> [--base <branch>] Create new branch + worktree
arbors switch <branch> Switch to existing worktree
arbors remove <branch> Remove worktree (with safety checks)
arbors list [--plain] List managed worktrees
arbors excluded Show copy patterns
arbors config Show current configConfiguration
~/.arbors/config.json (global) or .arbors/config.json (per-project, takes precedence):
{
"runtime": "node",
"language": "en",
"packageManager": "auto",
"copyPatterns": [".env*"],
"worktreeDir": "~/arbors/{repo}"
}| Key | Values | Default |
| ---------------- | ------------------------------------- | ------------------- |
| runtime | "node", "bun" | "node" |
| language | "en", "ko", "ja" | "en" |
| packageManager | "auto", "pnpm", "yarn", "npm" | "auto" |
| copyPatterns | string[] | [".env*"] |
| worktreeDir | string ({repo} placeholder) | "~/arbors/{repo}" |
Development
pnpm test # vitest
pnpm lint # oxlint
pnpm format # oxfmt
pnpm build # tsup
pnpm typecheck # tsc --noEmitLicense
MIT
