(Although name may change in the future)
A lightweight and efficient Git navigation and productivity tool inspired by SCM Breeze
Git Navigator is a modern reimagining of SCM Breeze's core workflow, built in Rust for speed and reliability. It provides numbered file and branch navigation for Git operations, making your Git workflow faster and more intuitive.
A huge thanks to the SCM Breeze team for their pioneering work in this space! It was a core part of my daily workflow, and this project aims to carry that legacy forward as a clean, lean and fast git productivity tool.
I may be wrong, of course. So, feel free to reach out if you have any suggestions or improvements!
Disclaimer: this tool has been put together by using LLM tools. I'm by no means a rust expert, so there may be some gaps.
- ๐งน Clean: Simple, intuitive commands without bloat
- โก Fast: Rust performance with efficient Git operations and smart caching
- ๐ชถ Lean: Zero runtime dependencies, single static binary
- ๐ฏ Best UX: Optimized for the 80% use case that developers need daily
curl -sSL https://raw.githubusercontent.com/blitux/git-navigator/main/install.sh | bashThis one-liner will:
- ๐ Auto-detect your platform (Linux/macOS/Windows, x64/ARM64)
- ๐ฅ Download the latest release binary
- ๐ Install to
~/.local/binand add to PATH - โก Setup shell aliases automatically
git clone https://github.com/git-navigator/git-navigator
cd git-navigator
./install.sh- Download the appropriate binary from releases
- Extract and move to a directory in your PATH
- Add shell aliases manually
# After making changes
make install-local # Builds and installs to ~/.local/binalias gs='git-navigator status'
alias ga='git-navigator add'
alias gd='git-navigator diff'
alias grs='git-navigator reset'
alias gco='git-navigator checkout'
alias gb='git-navigator branches'
alias gcb='git-navigator checkout-branch'
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"- Linux: x64, ARM64 (glibc and musl)
- Windows: x64
-
- macOS: Intel (x64), Apple Silicon (ARM64): I have some problems setting up the cross compilation for macos
- Bash (Linux/macOS/Windows)
- Zsh (with auto PATH and alias setup)
- Fish (with proper fish alias syntax)
- Other POSIX shells
- โ
gs- Numbered git status with colored, grouped output - โ
ga [indices]- Add files by index with error handling - โ
gd [indices]- Show diff for indexed files with color output - โ
grs [indices]- Reset files by index from staging area - โ
gco [indices]- Checkout files by index or create branches (-b flag) - โ
gb [index]- Numbered branch list with optional checkout - โ Smart caching for improved performance
- โ Cross-shell compatibility (bash, zsh, fish)
- โ
Flexible index syntax (
1,1-3,1,3,5,1 3-5,8) - โ Modern UI with section grouping and color-coded arrows
- โ Domain-specific error handling with clear user messages
- โ Sub-50ms startup time performance
gs
# Output:
Branch: main
Parent: a1b2c3d Initial commit
โค Staged:
(new) [1] newfile.txt
(modified) [2] src/main.rs
โค Not staged:
(modified) [3] src/lib.rs
(deleted) [4] oldfile.py
โค Untracked:
(untracked) [5] temp.txt# Add single files
ga 1 # Add file [1]
ga 3 # Add file [3]
# Add multiple files
ga 1 2 5 # Add files [1], [2], [5]
ga 1,3,5 # Add files [1], [3], [5]
# Add ranges
ga 2-4 # Add files [2], [3], [4]
ga 1-3,7 # Add files [1], [2], [3], [7]
# Mixed syntax
ga 1 3-5,8 # Add files [1], [3], [4], [5], [8]# File operations by index
ga 1 3-5,8 # Add files [1], [3], [4], [5], [8]
gd 3 # Diff file [3]
grs 1-3,7 # Reset files [1], [2], [3], [7]
gco 1 5 # Checkout files [1], [5]
# Branch operations
gb # List numbered branches
gb 2 # Checkout branch [2]
gco -b new-branch # Create and switch to new branchsrc/
โโโ commands/ # Command implementations
โ โโโ status.rs # gs command (โ
674 lines)
โ โโโ add.rs # ga command (โ
220 lines)
โ โโโ diff.rs # gd command (โ
300 lines)
โ โโโ reset.rs # grs command (โ
161 lines)
โ โโโ checkout.rs # gco command (โ
229 lines)
โ โโโ branches.rs # gb command (โ
447 lines)
โ โโโ mod.rs # Module exports
โโโ core/ # Core functionality
โ โโโ colors.rs # Unified color system with GitStatus enum
โ โโโ git.rs # Git operations via git2 library and git commands
โ โโโ git_status.rs # GitStatus enum for type safety
โ โโโ index_parser.rs # Flexible index parsing logic
โ โโโ state.rs # JSON caching and state management
โ โโโ templates.rs # Template-based output formatting
โ โโโ args_parser.rs # Centralized argument parsing
โ โโโ error.rs # Domain-specific error types
โ โโโ output.rs # Output utilities
โโโ main.rs # CLI entry point with clap
# Build release binary
make build
# Run all tests
make test
# Run the status command
make run
# Development workflow
make format lint test build# Build
cargo build --release
# Test
cargo test
# Format and lint
cargo fmt
cargo clippymake help # Show all available commands
make build # Build release binary
make test # Run all tests
make test-int # Run integration tests only
make run # Run git-navigator status
make install # Install binary and aliases
make format # Format code
make lint # Run clippy linter
make all # Format, lint, test, and build| Feature | SCM Breeze | Git Navigator |
|---|---|---|
| Language | Ruby/Shell | Rust |
| Performance | Slow startup | Sub-50ms startup |
| Dependencies | Ruby, complex shell setup | Single binary |
| Cross-shell | bash/zsh only | bash/zsh/fish/etc |
| Features | 100+ commands | Essential 20% that matter |
- โ Numbered file/branch navigation
- โ Flexible index syntax
- โ Colored, readable output
- โ Fast Git workflow
- โก Native performance (Rust vs Ruby/Shell)
- ๐ Reliable state management (JSON cache vs environment variables)
- ๐ Cross-shell compatibility
- ๐ง Zero configuration required
Git Navigator works out of the box with no configuration required. State is automatically cached in:
$XDG_CACHE_HOME/git-navigator/(Linux/macOS)- Per-repository cache using path hashes
-
gs- Git status with numbering โ -
ga [indices]- Add files by index โ -
gd [indices]- Show diff for indexed files โ -
grs [indices]- Reset files by index โ -
gco [indices]- Checkout files by index โ -
gb [index]- Numbered branch list with checkout โ - Domain-specific error handling - Clear user messages โ
- GitStatus enum - Type-safe status system โ
- Template system - Consistent output formatting โ
- String optimizations - Performance improvements โ
- Custom color themes and configuration
- TUI mode for interactive navigation
- Maybe more!
Contributions welcome! Please see the development setup above.
MIT License - see LICENSE file for details.
Inspired by SCM Breeze - Thank you for pioneering numbered Git navigation!