Bonsai Worktree Manager

•
3
•

Manages Git worktree lifecycles by automating the creation, configuration, and safe pruning of isolated development environments.

Bonsai is a specialized lifecycle manager for Git worktrees designed to streamline context switching for Claude Code users. It automates the creation of new worktrees with associated branches, handles automatic dependency installation (npm, yarn, pnpm, Ruby), and synchronizes essential non-git files like .env or local databases. It also features a deterministic port allocator to prevent dev server conflicts and a safe pruning mechanism that ensures work is only deleted once fully integrated into the default branch.

주요 기능

013 GitHub stars
02Deterministic dev server port calculation (3100-3999) to avoid local conflicts.
03Safety-first pruning logic that prevents data loss of unintegrated work.
04Intelligent dependency detection and installation for JavaScript and Ruby projects.
05Automated worktree and branch creation with ready-to-paste startup commands.
06Customizable .bonsai manifest for syncing environment variables and local databases.

사용 사례

01Automating the setup of clean, isolated environments for AI agents to perform specific tasks.
02Running multiple feature branches simultaneously with independent development servers.
03Switching contexts to fix a high-priority bug without stashing or committing current progress.