gh-network: find the fork that kept going
These days I run into more “abandoned, but carried on in a fork” repos than ever. GitHub’s network graph is a wall of lines you have to pan around, and it doesn’t tell you which fork people actually use. So I made gh network, an extension for the GitHub CLI that finds the most active fork of a project.
gh extension install jamiew/gh-network
gh network hammem/monarchmoney

Here’s what the monarchmoney Python library’s network really looks like. 153 forks, about a third of them with commits of their own, and one clear winner: bradleyseanf/monarchmoneycommunity, with 157 stars, 35 forks of its own and a release three weeks ago. You’d never find it from the original repo.

How it works:
- Walks every fork, including forks of forks
- Compares each fork with the repo it came from, on every recent branch, so side-branch work counts too
- Ranks forks by stars, forks, recent commits, releases and open issues
- Reads the original’s README and description for “use X instead” links, and checks same-named repos for the original’s first commit. That catches successors GitHub doesn’t count as forks, like Diegovsky/riff for spot
I started this wondering if there was a better-maintained Requestrr fork. (There isn’t — thomst08’s is still the one.) Then I tested it on 14 repos where we already know which fork took over, against GitHub’s own forks page and Fork Finder, the best existing tool I found:
| GitHub’s forks page | Fork Finder | gh network | |
|---|---|---|---|
| Put the right fork first (9 repos) | 3 | 6 | 9 |
| Found a successor that isn’t a fork (5 repos) | 0 | 0 | 4 |
The one it misses is Atom → Pulsar. Pulsar re-uploaded the code under a new name, and Atom’s README never mentions it. Some things you still have to hear about from a friend.
The test repos are in eval/cases.json if you want to throw your own tool at them. Other tools worth a look: useful-forks, active-forks, Lovely Forks and Krzysztof Kowalczyk’s script.
Shoutout to everyone keeping other people’s projects alive in forks <3
This post also on: