Fast git repository navigator with fuzzy finding.
gitnav (command: gn) scans for git repositories, caches results, and provides an interactive fuzzy finder (powered by fzf) with rich git information.
- Fast: Written in Rust with native git operations via git2 (no subprocess overhead)
- Fuzzy Finding: Interactive selection powered by fzf
- Rich Preview: Branch, last activity, status, recent commits, and project type
- Inline List Info: Branch name and dirty indicator shown directly in the fzf list
- Project Type Badges: Detects Rust, Node, Go, Python, Ruby, Java, C# projects
- Smart Caching: Results cached with configurable TTL (default: 5 minutes)
- Multiple Search Paths: Scan across several directories simultaneously
- Query Filter:
gn reactopens fzf pre-filtered to "react" - Shell Integration: zsh, bash, fish, nushell, and PowerShell
- Zero Config: Works out-of-the-box, configure only what you want
Select repo > my-project
┌──────────────────────────────────────┐
│ Repository: my-project │
│ Location: /Users/you/dev/my-project │
│ │
│ Branch: main │
│ Last Activity: 2 hours ago │
│ (2025-10-27 14:30) │
│ │
│ Status: │
│ +2 staged │
│ ~1 unstaged │
│ │
│ Recent commits: │
│ a1b2c3d Add new feature │
│ e4f5g6h Fix bug in parser │
│ ... │
└──────────────────────────────────────┘
brew install msetsma/gitnav/gitnavcargo install gitnavscoop bucket add gitnav https://github.com/msetsma/scoop-gitnav
scoop install gitnavDownload pre-compiled binaries from the releases page.
Available for:
- Linux (x86_64, aarch64, musl)
- macOS (x86_64, Apple Silicon)
- Windows (x86_64)
Add to your shell configuration file:
Zsh (~/.zshrc):
eval "$(gitnav init zsh)"Bash (~/.bashrc):
eval "$(gitnav init bash)"Fish (~/.config/fish/config.fish):
gitnav init fish | sourceNushell (~/.config/nushell/config.nu):
gitnav init nu | save --force ~/.cache/gitnav/init.nu
source ~/.cache/gitnav/init.nuPowerShell ($PROFILE):
Invoke-Expression (& gitnav init powershell)gn # Navigate to a repo
gn react # Open fzf pre-filtered to "react"
gn -f # Force refresh (bypass cache)
gn --path ~/work # Search a specific path
gn --list # List all repos (no fzf)
gitnav config # Print example config
gitnav clear-cache # Clear cacheZero configuration required. Optional config file at ~/.config/gitnav/config.toml:
mkdir -p ~/.config/gitnav
gitnav config > ~/.config/gitnav/config.toml[search]
base_path = "~" # Single search root
# paths = ["~/dev", "~/work"] # Multiple roots (overrides base_path)
max_depth = 5
# ignore_patterns = ["node_modules", "vendor", ".tox"]
[cache]
enabled = true
ttl_seconds = 300 # 5 minutes
[ui]
prompt = "Select repo > "
header = "Repository (↑/↓, ⏎, Esc)"
preview_width_percent = 60
layout = "reverse"
height_percent = 90
show_border = true
show_inline_meta = true # Show branch + dirty indicator in list
badge_style = "text" # "text" ([rust]), "icon" (🦀), or "none"
[preview]
show_branch = true
show_last_activity = true
show_status = true
recent_commits = 5
date_format = "%Y-%m-%d %H:%M"See config/config.example.toml for a full example with comments.
- Scan: Fast filesystem traversal using ignore crate (ripgrep engine)
- Cache: SHA256-keyed cache with configurable TTL
- Select: Interactive fuzzy finder powered by fzf
- Preview: Native git operations via git2 (no subprocess overhead)
- Navigate: Shell wrapper handles
cdto selected path
- fzf: Must be installed and in PATH
- macOS:
brew install fzf - Linux:
apt install fzforpacman -S fzf - Windows:
scoop install fzf
- macOS:
- Rust 1.70+: For building from source
Compared to shell-based alternatives:
| Operation | Shell Script | gitnav (Rust) |
|---|---|---|
| Startup | ~50ms | <5ms |
| Scan (cold) | ~200ms | ~100ms |
| Git info | ~50ms/repo | ~10ms/repo |
| Total (cold) | ~500ms | ~200ms |
| Total (cached) | ~100ms | ~20ms |
See ROADMAP.md for detailed future plans and release targets.
Upcoming:
- v0.3: Keybindings — open in editor (
ctrl-o), lazygit (ctrl-g), browser (ctrl-b) - v0.4: Frecency-based sorting, pinned repositories
- v0.5: Worktree support, GitHub CLI integration
| Tool | Language | Speed | Git Info | Caching | Config |
|---|---|---|---|---|---|
| gitnav | Rust | Fast | Rich | Smart TTL | TOML |
| zoxide | Rust | Fast | None | Yes | Yes |
| z | Shell | Slow | None | Yes | No |
| autojump | Python | Med | None | Yes | No |
gitnav is git-specific with rich repository previews. Alternatives handle all directories but lack git context.
Contributions welcome! Submit a Pull Request.
git clone https://github.com/msetsma/gitnav.git
cd gitnav
cargo build
cargo test
cargo run -- -fLicensed under either of Apache License 2.0 or MIT license, at your option. See LICENSE.
Built with fzf, ripgrep, and git2-rs. Inspired by zoxide and z.
Author: @msetsma | License: MIT OR Apache-2.0