CLI tool that scans directories for git repos and reports their sync status.
Working across multiple git repositories? It's easy to forget uncommitted changes, unpushed commits, or branches without upstreams.
gitsync gives you a quick overview of all repos in a directory so nothing falls through the cracks.
- Detect uncommitted changes
- Track ahead/behind status vs remote
- Find branches without upstream tracking
- Multiple output formats: JSON, table, minimal
- Recursive directory scanning
- Config file support (cosmiconfig)
npm install -g @roeus/gitsyncOr build locally:
git clone https://github.com/syz51/gitsync.git
cd gitsync
pnpm install
pnpm run build
pnpm link --globalgitsync [options] [paths...]| Flag | Description |
|---|---|
-a, --all |
Show all repos (not just outstanding) |
-f, --format <type> |
Output: json, table, minimal (default: json) |
-q, --quiet |
Suppress output |
-r, --recursive |
Scan recursively |
-d, --depth <n> |
Max depth (default: 1) |
--include-hidden |
Include hidden directories |
--filter <types> |
Filter: changes,ahead,behind,untracked |
--dir <path> |
Config file search directory |
# scan current dir, show only repos with issues
gitsync
# show all repos as table
gitsync -a -f table
# recursive scan, filter to repos with uncommitted changes
gitsync -r --filter changes
# scan specific directories
gitsync ~/projects ~/work
# combine filters
gitsync --filter changes,aheadSupports .gitsyncrc, .gitsyncrc.json, .gitsyncrc.yaml, gitsync.config.js, or package.json field.
Example .gitsyncrc.json:
{
"format": "table",
"recursive": true,
"depth": 2
}CLI args override config file values.
By default shows repos with issues:
- uncommitted changes
- ahead/behind remote
- no upstream
- untracked branches
[{"name": "repo", "uncommittedChanges": 3, "ahead": 1, ...}]REPO BRANCH CHANGES AHEAD BEHIND UNTRACKED
my-repo main 3 1 0 feature-x
my-repo (main): 3 changes, 1 ahead, [feature-x]
- Node.js >= 24
- git
git clone https://github.com/syz51/gitsync.git
cd gitsync
pnpm install
pnpm run build
# test locally
pnpm link --global
gitsync- Fork the repo
- Create a feature branch
- Make changes
- Submit a PR
MIT