Skip to content

Latest commit

 

History

32 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-zen

Fuzzy git branch switcher with live GitHub PR status in your terminal.

platform go license

demo

Features

  • Fuzzy Search: Instantly filter through massive lists of local branches as you type.
  • Async GitHub Integration: Fetches live Pull Request statuses in the background without freezing the UI thread.
  • Clean Unicode Aesthetics: Uses minimalist colored status indicators (● Open, ● Merged, ● Closed) instead of heavy text blocks or emojis to ensure a native terminal look.
  • Shell Autocompletion: bash, zsh, fish, and PowerShell supported via git-zen completion <shell>
  • Graceful Degradation: Functions flawlessly as a local fuzzy branch switcher even if you are offline or unauthenticated with GitHub.

Requirements

  • Go 1.24+
  • gh CLI installed and authenticated (gh auth login)
  • macOS, Linux, or Windows

Installation

macOS & Linux (Recommended)

Install via Homebrew. Shell autocompletions are configured automatically — no extra steps needed.

brew install achill06/tap/git-zen

Windows (Recommended)

Install via Scoop, then add completions to your PowerShell profile:

scoop bucket add git-zen https://github.com/achill06/scoop-bucket.git
scoop install git-zen

# Add completions to your PowerShell profile:
echo 'git-zen completion powershell | Out-String | Invoke-Expression' >> $PROFILE

Install via Go

go install github.com/achill06/git-zen@latest

Note: Ensure ~/go/bin is in your system PATH. Add export PATH=$PATH:~/go/bin to your ~/.bashrc or ~/.zshrc, then run source ~/.bashrc.

Then add completions for your shell:

# bash
echo 'source <(git-zen completion bash)' >> ~/.bashrc
source ~/.bashrc

# zsh
echo 'source <(git-zen completion zsh)' >> ~/.zshrc
source ~/.zshrc

# fish
git-zen completion fish > ~/.config/fish/completions/git-zen.fish

Manual Binary Download

Head over to the GitHub Releases page, download the pre-compiled binary for your OS, and move it into a folder in your PATH.

Then add completions for your shell:

# bash
echo 'source <(git-zen completion bash)' >> ~/.bashrc
source ~/.bashrc

# zsh
echo 'source <(git-zen completion zsh)' >> ~/.zshrc
source ~/.zshrc

# fish
git-zen completion fish > ~/.config/fish/completions/git-zen.fish

# PowerShell
echo 'git-zen completion powershell | Out-String | Invoke-Expression' >> $PROFILE

Upgrading

Homebrew:

brew upgrade git-zen

Scoop:

scoop update git-zen

Go:

go install github.com/achill06/git-zen@latest

Usage

CLI Commands

Command Description
git-zen switch Launch the interactive fuzzy branch switcher (TUI)
git-zen completion <shell> Generate shell autocompletion script (bash/zsh/fish/PowerShell)
git-zen version Show version information

Navigate to any local git repository and run:

git-zen switch

Tip: With completion set up, type git-zen sw<TAB> and it will autocomplete to git-zen switch.

Keyboard Controls

Key Action
Arrow Keys /Ctrl+J / Ctrl+K Navigate up and down through the filtered branch list
Alphanumeric Keys Start typing at any time to instantly fuzzy-search and filter your branches
Enter Confirm your selection and immediately perform agit checkout onto the selected branch
Escape / Ctrl+C Safely exit the interface without changing your current branch status

Tech Stack

Component Library
Language Go (Golang)
CLI Engine Cobra
TUI Architecture Bubble Tea
Styling & Layout Lipgloss
Fuzzy Filtering Fuzzy

Roadmap

  • v1.1: AI Commit Summarizer (git-zen log) — Automatically convert cryptic commit histories into polished markdown changelogs using local LLMs.
  • v2.0: Background Undo Daemon — A safety net mechanism allowing developers to instantly reverse accidental git operations.

License

MIT

About

A Go CLI extension and interactive TUI for git branch management with fuzzy search and live GitHub PR statuses.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages