Git-Repos - ๐ Scan and manage git repositories

About This Project
This project is an experimentation built entirely using vibe-coding with GitHub Copilot. The goal was to explore how easy it is to develop a complete TUI application using only AI assistance, and to evaluate whether the resulting code is maintainable and follows good practices.
Vibe-coding approach:
- All code was generated through natural language conversations with GitHub Copilot
- Features were added incrementally by describing the desired functionality
- The AI handled architecture decisions, refactoring, and code organization
- Following the DTDP (Detailed Technical Development Process) with investigation, discussion, action, and summary phases
Key learnings:
- TUI development with
ratatuiwas straightforward through conversation - Code quality remained high with proper use of Rust idioms (edition 2024)
- Refactoring and separation of concerns was handled naturally
- Git commits followed conventional commits format consistently
The project serves as a case study for AI-assisted development and demonstrates that maintainable, well-structured code can be created through conversational programming.
[!NOTE] Even the README has been AI generated, except for this line. Apparently Copilot has a high opinion of itself :laughing:
Overview
Git-Repos is a command-line tool with a Text User Interface (TUI) that helps you discover and manage git repositories on your system. It recursively scans directories to find all git repositories and displays them in an interactive table with current branch information.
Features
- ๐ Recursive scanning - Find all git repositories in a directory tree
- ๐ฏ Smart filtering - Excludes nested repositories (submodules) for cleaner results
- ๐ Interactive TUI - Beautiful table interface with rounded borders
- ๐ฟ Branch detection - Shows the current branch for each repository
- ๐ก Remote status - Displays ahead/behind status, local-only, or up-to-date
- ๐ Working tree status - Shows clean, modified, or staged changes
- ๐ Last commit info - Display last commit time (relative) and author
- โก Async loading - Fast startup with background data loading
- ๐ Auto-fetch - Automatically fetch all repositories with remotes asynchronously
- ๐ Auto-update - Optionally fast-forward merge local branches after fetch
- ๐ Search filter - Press
/to search repositories by name - ๐ View modes - Filter repositories by: All, No Upstream, Behind, Modified
- ๐จ Color-coded display - Visual indicators for repository states
- โจ๏ธ Keyboard navigation - Vim-style (j/k) and arrow key navigation
- ๐ Quick navigation - Press Enter to change directory to selected repository
- ๐พ Persistent cache - Saves repository list for cross-machine sharing
- ๐๏ธ Repository management - Delete repositories with 'd' key
- ๐ฅ Clone missing repos - Clone repositories marked as missing with 'c' key
- ๐ง Configuration - Set root path and auto-update preferences
- โก Fast and efficient - Written in Rust for optimal performance
Installation
Installation via Cargo
cargo install git-repos-manager
Installation via Scoop
Install git-repos with scoop:
scoop bucket add narnaud https://github.com/narnaud/scoop-bucket
scoop install git-repos
Prebuilt binaries
Download the latest archive for your platform from the Releases page, extract it, and add the binary to your PATH.
| Platform | Archive |
|---|---|
| Windows (x86_64) | git-repos-x86_64-pc-windows-msvc.zip |
| Linux (x86_64) | git-repos-x86_64-unknown-linux-gnu.tar.gz |
| Linux (aarch64) | git-repos-aarch64-unknown-linux-gnu.tar.gz |
| macOS (Apple Silicon) | git-repos-aarch64-apple-darwin.tar.gz |
Build from source
git clone https://github.com/narnaud/git-repos.git
cd git-repos
cargo build --release
The compiled binary will be in target/release/git-repos.exe
Usage
Basic usage
Scan the current directory:
git-repos
Scan a specific directory:
git-repos D:\projects
By default, the tool automatically fetches all repositories with remotes. To disable this:
git-repos --no-fetch
To also update local branches with fast-forward merge after fetching:
git-repos --update
When auto-fetch is enabled (default), the tool runs git fetch --all --prune for each repository that has a remote configured. A spinner animation in the status bar shows the progress. With --update, it also performs git merge --ff-only to update local branches when possible.
Configuration
Set the root path to scan by default:
git-repos set root D:\projects
Enable auto-update by default (fast-forward merge after fetch):
git-repos set update true
The configuration is stored in:
- Windows:
%APPDATA%\git-repos\config.toml - Linux/macOS:
~/.config/git-repos/config.toml
Repository cache
The tool maintains a cache of discovered repositories in repos.yaml (same directory as config). This cache:
- Saves the list of all repositories with their remote URLs
- Persists across sessions for cross-machine sharing
- Tracks deleted repositories as "missing" (shown in gray)
- Merges with newly discovered repositories when scanning
Missing repositories can be:
- Cloned back using the 'c' key
- Permanently removed from cache using the 'd' key
Shell integration (recommended)
Shell integration (recommended)
Since a program cannot change the shell's working directory, you need a wrapper that uses a temp file and the --cwd-file flag.
PowerShell
Add this to your PowerShell profile ($PROFILE):
function gr {
$tmp = "$env:TEMP\git-repos-cwd.txt"
Remove-Item $tmp -ErrorAction SilentlyContinue
git-repos --cwd-file $tmp $args
if (Test-Path $tmp) {
$path = Get-Content $tmp -Raw
if ($path) { Set-Location $path }
Remove-Item $tmp
}
}
Bash/Zsh
Add this to your .bashrc or .zshrc:
Now you can use gr to interactively select and navigate to a repository:
gr # Scan current directory
gr D:\projects # Scan specific directory
Keyboard controls
- โ/โ or j/k - Navigate through the repository list
- [ / ] - Switch between view modes (All, Needs Attention, Behind, Modified)
- / - Enter search mode to filter repositories by name
- Esc - Exit search mode and clear search filter
- d - Delete selected repository (marks as missing) or remove from cache if already missing
- c - Clone selected missing repository (auto-detects GitHub for
ghvsgit clone) - u - Update selected repository (fetch + status)
- Enter - Change directory to selected repository (exits the app)
- q or Ctrl-C - Quit the application
View Modes
- All - Show all repositories
- No Upstream - Show repositories that are local-only or have no tracking branch
- Behind - Show only repositories that are behind their upstream
- Modified - Show only repositories with uncommitted changes
The current mode is highlighted at the bottom right of the table.
Example output
โญโ Git Repositories - D:\projects โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ Repository โ Branch โ Remote Status โ Status โ Last Commit โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ > kdab/knut โ main โ โ2 โ0 โ 3M โ 2 days ago by John Doe โ
โ kdab/training-materialโ develop โ up-to-date โ clean โ 1 week ago by Jane Smith โ
โ narnaud/git-repos โ main โ local-only โ 1S 2M โ 5 minutes ago by Nicolas Arnaud โ
โ oss/ratatui โ main โ โณ loading... โ clean โ โณ loading... โ
โ user/deleted-repo โ - โ - โ missing โ - โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโดโโAllโ[No Upstream]โBehindโModifiedโโโโโค
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Found 5 repositories (1 missing) | โ Fetching 2 repositories... | Mode: [/] | Search: / | Quit: q or Ctrl-C
Color indicators
Remote Status:
- ๐ข Green -
up-to-date - ๐ต Cyan -
โX โY(ahead/behind) - ๐ก Yellow -
no-tracking - ๐ด Red -
local-only - โซ DarkGray -
โณ loading...
Working Tree Status:
- ๐ข Green -
clean - ๐ก Yellow -
XM(modified),XS(staged),XS YM(both) - โซ DarkGray -
โณ loading...orunknown
Missing Repositories:
- โซ DarkGray - Repository deleted or not present on this machine
- โช White - Missing repository when selected (for better visibility)
Repository lifecycle
Deleting repositories:
- Select a repository and press 'd'
- Confirm the deletion (default: No)
- The repository is deleted from disk and marked as "missing" in the cache
- Missing repositories appear in gray at the bottom of the list
Cloning missing repositories:
- Select a missing repository (shown in gray)
- Press 'c' to clone it back
- The tool automatically detects GitHub repos and uses
gh repo cloneif available - Progress is shown with an animated spinner
- Once cloned, the repository appears normally in the list
Removing from cache:
- Select a missing repository
- Press 'd' again to permanently remove it from the cache
- It will no longer appear in the list
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - Copyright (c) Nicolas Arnaud-Cormos
See LICENSE file for details.