Skip to content

yonasBSD/lazyworktree

 
 

Repository files navigation

Go Coverage

LazyWorktree

logo

LazyWorktree is a terminal UI for managing Git worktrees with a keyboard-first workflow.

It provides a easy way to work across multiple Git worktrees from one interface. From the current worktree, you can create, switch, remove, and run related operations without manually jumping between directories.

Built with Bubble Tea, it shows the state of your worktrees clearly and integrates with common development tools, including tmux, zellij, and OCI runtimes such as Docker or Podman.

Custom commands can be bound to keys or made available only from the command palette. To hide a command from key binding, prefix its config key with _.

Screenshot

lazyworktree screenshot

You can see more screenshots here

Main Features

  • Worktree management - Create worktrees from branches, PRs/MRs, or issues; delete, list, and switch between them
  • CI & PR/MR status - See GitHub Actions and GitLab CI results, check PR/MR details, view logs
  • Agent sessions pane - See confirmed active Claude and pi sessions attached to the selected worktree by default, with a toggle for recent and historical sessions
  • Command palette - Quick access to all actions and custom commands with ?.
  • Tmux and Zellij support - Automatically open worktrees in new tmux windows/panes or zellij tabs
  • Docker/Podman support - Run commands in Docker or Podman containers tied to the worktree
  • Custom commands - Set up custom shell commands in config, bind them to keys, show them in the palette.
  • Notes - Write markdown notes per worktree or tasks to track what you're working on
  • Hooks - .wt files per worktree to automate setup and cleanup tasks
  • Customise worktree metadata - Press e in the worktree pane to edit the description, colour, notes, icon, and tags for the selected worktree.
  • Shell helpers - cd "$(lazyworktree)" shortcut and shell completion for bash, zsh, and fish (making it easy to jump to worktrees from the terminal)
  • LLM-friendly CLI - Use doctor, describe, worktrees ..., and notes get for stable JSON automation without launching the TUI

Documentation

Primary documentation lives on the docs site:

Useful entry points:

Installation

Homebrew (macOS)

brew tap chmouel/lazyworktree https://github.com/chmouel/lazyworktree
brew install lazyworktree --cask

Arch Linux

yay -S lazyworktree-bin

From source

go install github.com/chmouel/lazyworktree/cmd/lazyworktree@latest

Quick Start

cd /path/to/your/repository
lazyworktree

Shell Integration

To jump to the selected worktree from your shell:

cd "$(lazyworktree)"

For shell integration helpers, see:

Requirements

  • Git 2.31+
  • Forge CLI (gh or glab) for PR/MR status

Optional tools are documented here:

Licence

Apache-2.0

About

Easy Git worktree management CLI and TUI for the terminal.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Go 95.3%
  • Roff 2.2%
  • Shell 0.9%
  • HTML 0.8%
  • CSS 0.6%
  • JavaScript 0.2%