A better git worktree experience
hypr is a modern, highly customizable CLI tool that supercharges your git worktree workflow. It makes creating, switching, and managing worktrees effortless, with first-class terminal integration and powerful automation hooks.
Git worktrees are amazing for parallel development, but managing them manually is tedious. hypr solves this:
- ⚡ Instant Context Switching:
hypr feature-branchhandles everything—fetching, creating the worktree, and opening it. - 🖥️ Terminal Integrated: Automatically opens your worktree in a new tab or window (supports iTerm2, Tmux, Ghostty, VS Code, and more).
- ✨ Interactive TUI: built-in interactive menu for selecting and managing worktrees.
- 🧹 Smart Cleanup:
hypr cleanupintelligently finds and deletes worktrees for merged or closed branches (including GitHub integration). - 🔗 Lifecycle Hooks: Run scripts automatically on create, switch, or cleanup (e.g.,
bun installor copying.envfiles).
Support for various package managers is available:
- Homebrew (macOS):
brew install hypr - Winget (Windows):
winget install hypr - Scoop (Windows):
scoop install hypr - AUR (Arch Linux):
yay -S hypr
dotnet tool install --global hyprCreate a new worktree for a feature branch and open it instantly in a new tab:
# Creates a worktree for 'my-feature' and opens it
hypr my-featureClean up old worktrees. hypr checks if branches are merged or if their PRs are closed.
hypr cleanuphypr is highly configurable via a global or project-local hypr.json file.
Example hypr.json:
{
"worktree": {
"directoryPattern": "../{repo_name}-worktrees/{branch}"
},
"terminal": {
"mode": "tab"
},
"scripts": {
"sessionInit": "bun install && cp ../main/.env ."
}
}See example_config.json for a comprehensive list of options.
Prerequisites:
- .NET 10.0 SDK
Build & Run:
# Setup dependencies
./setup.sh
# Build
dotnet build
# Run tests
dotnet test