https://github.com/insanoid/treehopper
Tools to use Git Worktree productively with Raycast or Alfred 🪾
https://github.com/insanoid/treehopper
alfred alfred-workflow git macos productivity raycast-extension worktree
Last synced: about 2 months ago
JSON representation
Tools to use Git Worktree productively with Raycast or Alfred 🪾
- Host: GitHub
- URL: https://github.com/insanoid/treehopper
- Owner: insanoid
- License: mit
- Created: 2025-11-23T07:55:23.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-11-23T20:12:12.000Z (5 months ago)
- Last Synced: 2025-12-02T16:23:10.260Z (5 months ago)
- Topics: alfred, alfred-workflow, git, macos, productivity, raycast-extension, worktree
- Language: TypeScript
- Homepage:
- Size: 3.93 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- alfred-workflows - Treehopper - Navigate and create git worktrees. (Developer)
README
# Treehopper

Hop between git worktrees with ease. Available for both Alfred and Raycast.
## Alfred Workflow
Navigate and create git worktrees directly from Alfred.

**[Download Latest Release](../../releases/latest)** | [Full Documentation](alfred-workflow/README.md)
### Commands
- `wt` - List and open existing worktrees
- `wtn` - Create new worktree with new branch from base
## Raycast Extension
Same functionality for Raycast users.

[Full Documentation](raycast-extension/README.md)
### Commands
- **List Worktrees** - Browse and open existing worktrees
- **Create Worktree** - Create new worktree with new branch
### Install
```bash
cd raycast-extension && npm install && npm run dev
```
---
## Features
- Auto-discover repos or configure manually
- Customizable editor (Cursor, VS Code, Zed, etc.)
- Customizable terminal (Terminal, iTerm, Warp)
- Supports `worktrees.json` for custom setup commands
## How It Works
1. Select a repo and base branch (e.g., `api` from `main`)
2. Enter new branch name (e.g., `feat/my-feature`)
3. Creates worktree with new branch based on selected base
4. Runs setup commands and opens in your editor
## What are Git Worktrees?
Git worktrees let you check out multiple branches simultaneously in separate directories. Instead of stashing changes or committing WIP to switch branches, you can have each branch in its own folder and switch instantly.
```bash
# Traditional workflow (painful)
git stash
git checkout feature-b
# work on feature-b
git checkout feature-a
git stash pop
# Worktree workflow (smooth)
cd ../project-feature-b # just switch directories
```
**Benefits:**
- Work on multiple features/fixes simultaneously
- No stashing, no WIP commits
- Keep long-running tasks (tests, builds) running while switching context
- Review PRs without disrupting your current work
## worktrees.json
Add a `worktrees.json` to your repo root to customize setup:
```json
{
"setup-worktree": ["npm install", "cp $ROOT_WORKTREE_PATH/.env .env"]
}
```
## License
MIT