gh-momentum
Surface GitHub repos gaining traction fast, before they hit the front page.
gh-momentum queries the GitHub Search API for newly-created repositories and
ranks them by momentum (stars per day), not by total stars. A repo with 800
stars that's 6 days old is a stronger signal than one with 40,000 stars that's
8 years old. This tool finds the former.
Zero dependencies. Pure Python standard library. One file of logic, one CLI.
$ gh-momentum --days 7 --min-velocity 50
7.3/10 acme/turbo-agent (1240*, 177.1/day, Python)
A minimal autonomous agent runtime that fits in 500 lines.
https://github.com/acme/turbo-agent
3.6/10 data-co/ducklake (612*, 87.4/day, Rust)
Embedded analytics database with a Postgres wire protocol.
https://github.com/data-co/ducklake
Why
Star count is a lagging indicator. By the time a repo has 20k stars, the
opportunity to be early (to contribute, to build on top of it, to write the
first tutorial) is mostly gone. Star velocity is a leading indicator.
gh-momentum ranks by velocity so you see things while they're still small.
How it works
flowchart LR
GH[GitHub Search API]
Fetcher["github_api.py<br/>fetch + normalize"]
Scorer["detector.py<br/>score 0-10"]
CLI["gh-momentum<br/>CLI"]
Lib["find_momentum<br/>library"]
MCP["gh-momentum-mcp<br/>MCP server"]
Terminal[Your terminal]
Code[Your Python code]
Agent[MCP client]
GH --> Fetcher
Fetcher --> Scorer
Scorer --> CLI --> Terminal
Scorer --> Lib --> Code
Scorer --> MCP --> Agent
One fetcher, one scoring function, three surfaces (CLI / library / MCP). The
core has zero dependencies; only the optional MCP server pulls in the mcp
package.
Install
pip install gh-momentum
Or from source:
git clone https://github.com/Dheightsan/gh-momentum
cd gh-momentum
pip install -e .
Usage
# Repos created in the last 7 days, gaining at least 50 stars/day
gh-momentum --days 7 --min-velocity 50
# Also pull in repos tagged with specific GitHub topics
gh-momentum --topic llm --topic rust
# Boost repos that match keywords you care about
gh-momentum --match "python,fastapi,cli"
# Machine-readable output
gh-momentum --json | jq '.[] | .name'
# Log a summary of the run (repos seen, skipped, returned) to stderr
gh-momentum --verbose
Rate limits
The GitHub Search API allows 10 requests/minute unauthenticated. Set a token to raise that to 30/minute:
export GITHUB_TOKEN=ghp_your_token_here
gh-momentum
# or: gh-momentum --token ghp_your_token_here
A token with no scopes at all is enough, since gh-momentum only reads public data.
Use as a library
from gh_momentum import find_momentum
for repo in find_momentum(days_back=7, min_velocity=50, match=["llm"]):
print(repo.score, repo.name, repo.star_velocity_per_day)
find_momentum() returns a list of MomentumRepo dataclasses, sorted by score.
Use it as an MCP server
gh-momentum ships an optional Model Context Protocol server. Once installed, any MCP client can call it as a tool. Ask things like "what Python repos are trending this week with high velocity?" and the client fetches live data from GitHub.
Install with the mcp extra:
pip install "gh-momentum[mcp]"
Then add it to your client's MCP config:
Claude Desktop
Edit claude_desktop_config.json
(location) and add:
{
"mcpServers": {
"gh-momentum": {
"command": "gh-momentum-mcp",
"env": {
"GITHUB_TOKEN": "ghp_optional_for_higher_rate_limit"
}
}
}
}
Restart Claude Desktop. The find_trending_repos tool appears in the tool list.
Cursor / Cline / VS Code (MCP-enabled)
Add to your MCP config (e.g. ~/.cursor/mcp.json or the equivalent for your
client):
{
"mcpServers": {
"gh-momentum": {
"command": "gh-momentum-mcp"
}
}
}
Generic stdio clients
Any client that speaks MCP over stdio can spawn gh-momentum-mcp as a
subprocess. The GITHUB_TOKEN environment variable is optional and raises the
GitHub Search API rate limit from 10 to 30 requests/minute.
The exposed tool
The server exposes one tool, find_trending_repos, with the same
parameters as the CLI (days_back, min_stars, min_velocity, topics,
match, limit). Returns a JSON list of repos with name, URL, description,
stars, star velocity, language, topics, score (0-10) and matched keywords.
Example questions that route through this tool well:
- "Find Rust repos created in the last 14 days with at least 100 stars/day."
- "Show me LLM-related projects gaining traction this week and boost the ones matching agents, RAG, or vector search."
- "Compare star velocity on these two repos."
How the score works
The 0-10 score combines three signals:
| Signal | Weight |
|---|---|
| Star velocity | Primary. Stars per day since creation (min. 1 day), saturates near 8.0 |
| Absolute stars | Small confidence bonus (up to +1.0) |
| Keyword match | Optional boost when --match keywords hit (up to +1.5) |
The scoring lives in one function, _score() in
gh_momentum/detector.py, so it's easy to read,
fork, and tune to your own taste.
Development
pip install -e ".[dev]"
pytest -q
Tests run fully offline. The one network test is opt-in:
GH_MOMENTUM_LIVE_TEST=1 pytest -q
Contributing
Issues and PRs welcome. This is maintained on a best-effort basis. If you need a feature, a PR is the fastest path. Keep the zero-dependency rule intact.
License
MIT. See LICENSE.
Metadata
Release files for gh-momentum 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gh_momentum-0.1.1.tar.gz | 17.3 kB | With provenance | Details for gh_momentum-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gh_momentum-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for gh_momentum-0.1.1-py3-none-any.whl |
Total release size: 30.4 kB
Release files / gh_momentum-0.1.1.tar.gz
| Download URL | gh_momentum-0.1.1.tar.gz |
|---|---|
| Size | 17.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6283638b167ed0865fb2e1a7725c172c9a0ef3c62c738bc1b9650540003ebd3b
|
|
BLAKE2b-256 checksum How to use checksums |
00dc47822dd40f2a139524d72ca88049e50af5c39668d40ea572b3d5af9d4cab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logRelease files / gh_momentum-0.1.1-py3-none-any.whl
| Download URL | gh_momentum-0.1.1-py3-none-any.whl |
|---|---|
| Size | 13.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6dab49ce852e7faa3431a8462078798a9ed3e21347be93fd11404804144d58b4
|
|
BLAKE2b-256 checksum How to use checksums |
292ae6f38cfac8c19d198a1c7bad2ebdff23da36675072a71e3eadcf475be8a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logSecurity for gh-momentum 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for gh_momentum-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.