A fast CLI that scans a directory for git repos and shows which ones have uncommitted changes and which are local-only (no remote).
$ dirty ~/code
* apps/dashboard
apps/storefront
* libs/ui-kit [local]
libs/common
* services/auth
services/payments
tools/cli [local]
* tools/scripts [local]
8 repos, 4 dirty, 3 local-only
*— repo has uncommitted changes (red)[local]— repo has no remotes configured (yellow)
cargo install --git https://github.com/iamkaf/dirtydirty <path> # scan (default depth: 3)
dirty -L 1 <path> # scan immediate subdirectories only
dirty -d <path> # only dirty repos
dirty -l <path> # only local-only repos
dirty -dlr <path> # dirty + local, raw paths for piping
dirty -u <path> # include unpushed commits info (ahead of upstream)
dirty --include-unpushed <path>
| Flag | Short | Default | Description |
|---|---|---|---|
--depth |
-L |
3 |
Max directory depth to search for repos |
--dirty |
-d |
off | Only show repos with uncommitted changes |
--local |
-l |
off | Only show repos with no remotes |
--include-unpushed |
-u |
off | Include unpushed commit info (ahead of upstream) |
--raw |
-r |
off | One path per line, no decorations |