Skip to content
/ grove Public

🚧 Git Worktree Manager - A CLI tool for managing git worktrees with Docker integration and template support (Work in Progress)

Notifications You must be signed in to change notification settings

glanotte/grove

Repository files navigation

Grove - Git Worktree Manager

A CLI tool for managing git worktrees with template support, Docker integration, and automatic web serving configuration.

Features

  • 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

Installation

From Source

git clone https://github.com/glanotte/grove.git
cd grove
make build
make install

Using Go

go install github.com/glanotte/grove@latest

Quick Start

  1. Initialize a repository for worktree management:

    grove init git@github.com:user/repo.git
    cd repo
  2. Create configuration:

    make dev-init  # Creates .grove/config.yaml and templates
  3. Create a new worktree:

    grove create feature/new-feature
  4. List worktrees:

    grove list
  5. Switch to a worktree:

    grove switch feature/new-feature

Configuration

Configuration is stored in .grove/config.yaml. See examples/configs/ for example configurations:

  • basic.yaml - Simple configuration with Docker and nginx-proxy
  • advanced.yaml - Full-featured configuration with all options

Shell Integration

For enhanced functionality, add the shell integration to your shell:

# Add to ~/.bashrc or ~/.zshrc
source /path/to/grove/scripts/grove.sh

This provides:

  • Auto-completion for commands and worktree names
  • Enhanced grove switch that actually changes directory
  • Helper functions like grove-info, grove-up, grove-down
  • Aliases: grl, grc, grs, grr

Commands

  • grove init <repo-url> - Initialize a bare repository
  • grove create <branch> - Create a new worktree
  • grove list - List all worktrees
  • grove remove <worktree> - Remove a worktree
  • grove switch <worktree> - Switch to a worktree (with shell integration)
  • grove version - Show version information

Templates

Templates are stored in .grove/templates/ and processed when creating worktrees. See templates/README.md for available variables and usage.

Development

# Install dependencies
make deps

# Run tests
make test

# Build
make build

# Run
make run

# Clean
make clean

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests and ensure they pass
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

About

🚧 Git Worktree Manager - A CLI tool for managing git worktrees with Docker integration and template support (Work in Progress)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •