Skip to content

Cartoone9/check-repo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

check-repo

A small and simple terminal dashboard to monitor many Git repositories at once.

Introduction

check-repo scans a configurable list of folders, detects Git repositories, fetches origin, and reports whether each repo is clean, dirty, missing, or out of sync with its tracked remote branch.

It can run either as:

  • a single-shot report (good for scripts/cron), or
  • a lightweight interactive TUI with keyboard actions for refresh, pull, push, add, and delete.

At a glance

What Details
Main script check-repo.py
Launcher check-repo.zsh
Config file repo_targets.json
Mode 1 Non-interactive dashboard output
Mode 2 Interactive terminal UI (-i / --interactive)
check-repo

Features

  • Concurrent repo scanning for fast updates.
  • Per-repo branch/ahead/behind indicators.
  • Colorized terminal UI with grouped categories (default, linux, macos, wsl).
  • Optional interactive mode with selection and actions.
  • JSON-backed target list (repo_targets.json) with in-app add/remove.

Requirements

  • Python 3.9+ (tested on modern Python 3)
  • git available in your PATH
  • A Unix-like terminal for interactive mode (uses termios/tty)

Installation

Clone into a stable tools directory, then make the launcher executable.

1) Clone

Common location:

mkdir -p ~/.local/share
git clone https://github.com/Cartoone9/check-repo ~/.local/share/check-repo
cd ~/.local/share/check-repo
chmod +x check-repo.zsh

If you prefer another location (for example ~/scripts/check-repo), use that path consistently in the steps below.

2) Pick command name

Create a symlink in ~/.local/bin so you can run either check or check-repo:

mkdir -p ~/.local/bin
ln -sf "$HOME/.local/share/check-repo/check-repo.zsh" ~/.local/bin/check
# or
ln -sf "$HOME/.local/share/check-repo/check-repo.zsh" ~/.local/bin/check-repo

3) Ensure ~/.local/bin is in PATH (zsh)

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

4) Optional: use aliases instead of symlinks

If you prefer aliases instead of symlinks:

alias check="$HOME/.local/share/check-repo/check-repo.zsh"
# or
alias check-repo="$HOME/.local/share/check-repo/check-repo.zsh"

Configuration

Edit repo_targets.json to define what gets scanned.

{
  "default": ["~/dotfiles", "~/scripts"],
  "linux": ["~/.config/hypr"],
  "macos": ["~/.config/kitty"],
  "wsl": []
}

Category behavior:

  • default: always included.
  • linux: included on Linux (except WSL, which uses the wsl category).
  • macos: included on macOS.
  • wsl: included on WSL.

Usage

Non-interactive mode

Run once and print dashboard output:

python3 check-repo.py

Alternative:

./check-repo.zsh

If aliased:

check

Interactive mode

Start the interactive dashboard:

python3 check-repo.py --interactive

or if you have set an alias:

check -i

Keyboard shortcuts

In interactive mode:

  • j / : next actionable repo
  • k / : previous actionable repo
  • p: git pull --ff-only on selected repo
  • P: git push on selected repo
  • r: refresh all repos
  • a: add a repo target to a category
  • d: delete selected repo target
  • t: toggle display mode (all categories ↔ current system categories)
  • q: quit

Output states

State Meaning
CLEAN No uncommitted changes, no ahead/behind.
DIRTY Local changes detected (git status --porcelain).
UPDATES Branch is ahead and/or behind remote.
NOT_FOUND Configured path does not exist.
NOT_REPO Path exists but is not a Git repository.
PULLING / PUSHING / DELETING Temporary interactive action states.

Environment variables

  • CHECK_REPOS_CONFIG: path to an alternate JSON config file.

Example:

CHECK_REPOS_CONFIG=~/my-repo-list.json python3 check-repo.py

Recommendation

check-repo works well after running system update tools such as topgrade.

For example, I use the following alias to update my system and then check the state of my repositories:

alias update='topgrade && echo && check'

Credits

Inspired by git-overview by David Bellot.

Similar projects:

License

MIT

About

Lightweight terminal dashboard for tracking multiple Git repositories.

Topics

Resources

License

Stars

Watchers

Forks

Contributors