@roeus/gitsync
v1.0.1
Published
CLI to check git sync status of repos in current directory
Readme
gitsync
CLI tool that scans directories for git repos and reports their sync status.
Demo
Why gitsync?
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.
Features
- 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)
Install
npm install -g @roeus/gitsyncOr build locally:
git clone https://github.com/syz51/gitsync.git
cd gitsync
pnpm install
pnpm run build
pnpm link --globalUsage
gitsync [options] [paths...]Options
| 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 |
Examples
# 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,aheadConfig File
Supports .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.
Output
By default shows repos with issues:
- uncommitted changes
- ahead/behind remote
- no upstream
- untracked branches
JSON (default)
[{"name": "repo", "uncommittedChanges": 3, "ahead": 1, ...}]Table
REPO BRANCH CHANGES AHEAD BEHIND UNTRACKED
my-repo main 3 1 0 feature-xMinimal
my-repo (main): 3 changes, 1 ahead, [feature-x]Requirements
- Node.js >= 24
- git
Development
git clone https://github.com/syz51/gitsync.git
cd gitsync
pnpm install
pnpm run build
# test locally
pnpm link --global
gitsyncContributing
- Fork the repo
- Create a feature branch
- Make changes
- Submit a PR
License
MIT
