A CLI tool for managing git worktrees with template support, Docker integration, and automatic web serving configuration.
- Git Worktree Management: Create, list, remove, and switch between git worktrees
- Template Support: Automatically generate configuration files from templates
- Docker Integration: Automatic Docker Compose setup with port management
- Web Proxy Support: Automatic subdomain configuration (nginx-proxy, Traefik)
- Shell Integration: Easy switching between worktrees with shell functions
git clone https://github.com/glanotte/grove.git
cd grove
make build
make installgo install github.com/glanotte/grove@latest-
Initialize a repository for worktree management:
grove init git@github.com:user/repo.git cd repo -
Create configuration:
make dev-init # Creates .grove/config.yaml and templates -
Create a new worktree:
grove create feature/new-feature
-
List worktrees:
grove list
-
Switch to a worktree:
grove switch feature/new-feature
Configuration is stored in .grove/config.yaml. See examples/configs/ for example configurations:
basic.yaml- Simple configuration with Docker and nginx-proxyadvanced.yaml- Full-featured configuration with all options
For enhanced functionality, add the shell integration to your shell:
# Add to ~/.bashrc or ~/.zshrc
source /path/to/grove/scripts/grove.shThis provides:
- Auto-completion for commands and worktree names
- Enhanced
grove switchthat actually changes directory - Helper functions like
grove-info,grove-up,grove-down - Aliases:
grl,grc,grs,grr
grove init <repo-url>- Initialize a bare repositorygrove create <branch>- Create a new worktreegrove list- List all worktreesgrove remove <worktree>- Remove a worktreegrove switch <worktree>- Switch to a worktree (with shell integration)grove version- Show version information
Templates are stored in .grove/templates/ and processed when creating worktrees. See templates/README.md for available variables and usage.
# Install dependencies
make deps
# Run tests
make test
# Build
make build
# Run
make run
# Clean
make clean- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and ensure they pass
- Submit a pull request
MIT License - see LICENSE file for details.