I have a lot of git repos. At any given moment some of them have uncommitted work, some are behind remote, some have an open PR I forgot about. Switching between them to check is tedious, and git status only tells you about the one you're in.
git-repos scans a directory of repos and shows you everything at once: what branch you're on, whether you're ahead or behind remote, staged/modified/untracked files, stash count, last commit, and any open GitHub PRs, all in a single table.
Because the binary is named git-repos, Git treats it as a subcommand automatically, so you can just type git repos.
Interactive TUI by default, plain text or JSON when you need to pipe it.
ST REPO BRANCH SYNC CHANGES LAST CHANGED PR LAST COMMIT
─────────────────────────────────────────────────────────────────────────────────────────────
! my-api feature/auth ↑2↓1 S:1 M:3 2h ago #42 fix token refresh
↑ frontend feature/dash ↑3 ?:2 yesterday #38 add skeleton
✓ infra main ✓ clean 3d ago - bump terraform
· old-service main ✓ clean 8mo ago - initial commit
Status icons:
!— needs attention: dirty working tree or behind upstream↑— needs a push, or you're on a non-main branch✓— clean and in sync on main/master·— stale, no commits in 6+ months
The TUI aesthetic was shamelessly inspired by k9s, the wonderful Kubernetes terminal UI. If you haven't used it, you're missing out.
brew install samsar/tap/git-reposgo install github.com/samsar/git-repos@latestMake sure $(go env GOPATH)/bin is on your $PATH.
git clone https://github.com/samsar/git-repos
cd git-repos
go build -o git-repos .
mv git-repos /usr/local/bin/git repos # scan configured directory
git repos ~/projects # scan a specific directory
git repos --fetch ~/projects # git fetch in every repo first (slower but accurate)
git repos --no-prs # skip GitHub PR lookup
git repos --plain # plain text, no TUI
git repos --json # JSON outputThe first time you run it without arguments, it'll ask which directory to scan and save that to ~/.config/git-repos/config.json. You can also manage this manually:
git repos config add ~/projects
git repos config add ~/work
git repos config show
git repos config reset- Go 1.21+ (only if building from source)
giton your PATHghon your PATH and authenticated — only needed for PR lookup, everything else works without it
| Key | Action |
|---|---|
j / k or arrows |
Move up/down |
g / G or Home/End |
Jump to top/bottom |
Ctrl+f / Ctrl+b |
Page down/up |
Enter |
Open repo detail view |
Esc |
Back to list |
| Key | Action |
|---|---|
p |
Pull (git fetch) the selected repo |
o |
Open the repo's PR in your browser |
r |
Refresh all repos (runs fetch) |
? |
Toggle help overlay |
q |
Quit |
| Key | Sort by |
|---|---|
0 |
Status |
N |
Name |
B |
Branch |
S |
Sync |
C |
Changes |
T |
Last changed |
P |
PR |
| Flag | Description |
|---|---|
--fetch |
Run git fetch --prune before scanning (slower, catches upstream changes) |
--no-prs |
Skip GitHub PR lookup |
--no-color |
Disable color output |
--plain |
Plain text instead of TUI |
--json |
JSON output |
-
Ensure all changes are merged to
main. -
Tag and push:
git tag v<x.y.z> git push origin main --tags
-
The release workflow fires automatically, builds binaries for all platforms, publishes a GitHub Release, and updates the Homebrew formula in
samsar/homebrew-tap.
