Skip to main content

Crate git_nav

Crate git_nav 

Source
Expand description

git-nav: a fast interactive navigator for local git repositories.

The binary walks a configured root directory, gathers status for every git repo it finds (in parallel), then hands the list off to a fullscreen TUI selector. On selection, the chosen repo’s path is printed to stdout so a shell wrapper can cd into it.

Modules§

cli
Manual arg parsing — kept dependency-free so compile times stay small and the binary size doesn’t balloon from clap.
config
Persistent config stored at ~/.config/git-nav/config.toml. First run prompts for the root directory and writes it there.
git
Repo metadata gathered by shelling out to git. Every repo’s info is collected on its own rayon thread — this is where the “slow first start” win comes from: N sequential git status calls become max(N, #cores).
scanner
Recursive git-repo discovery. Directory listing is sequential but the recursion into children happens in a rayon parallel iterator, which is the piece that actually mattered for wall-clock time on the old version.
shell
Shell integration: emits and installs a gnav wrapper that captures the path git-nav prints on stdout and cds into it.
ui
UI layer: fullscreen ratatui selector, plus a plain-text table used as a fallback when stderr isn’t a TTY.

Functions§

run

Type Aliases§

Result