Documentation menu▾
GitScore methodology
GitScore is a single 0–100 number that ranks every gitlawb repo by six independent signals. Built so a distorted dimension (fake stars, batched commits) can't dominate the result.
Why six components
Star counts alone are easy to fake. Commit counts alone reward churn over substance. A score is only useful if it's hard to game with a single dimension. GitScore combines:
| Component | Weight | Signal |
|---|---|---|
| Activity | 30% | Commits in the last 90 days (log, saturates ~30) |
| Freshness | 20% | Days since last push (linear decay, 0 at 90d) |
| Longevity | 15% | Repo age (log, saturates ~2 years) |
| Contributors | 15% | Distinct commit authors (log, saturates ~10) |
| Popularity | 10% | Stars (log, saturates ~100) |
| Originality | 10% | 1.0 if original, 0.3 if fork |
Final score = weighted average × 100, rounded. Missing components are skipped and the remaining weights are renormalized — a repo with no commit data can still get a Lite score from longevity + popularity + originality + freshness alone.
Formulas
Each component returns a value in [0, 1]. The math is pure — no DB lookups, no external state, no randomness.
// Repo age, log-saturating at ~2 years (730d).
longevity = clamp01(log1p(ageDays) / log1p(730))
// Stars on a log scale, saturating at ~100.
popularity = clamp01(log1p(stars) / log1p(100))
// Originals score full; forks discounted.
originality = isFork ? 0.3 : 1.0
// Linear decay from 1 (today) to 0 (90 days since last push).
freshness = clamp01(1 - daysSincePush / 90)
// Recent commits, log-saturating at ~30 per 90d window.
activity = clamp01(log1p(commitsLast90d) / log1p(30))
// Distinct authors, log-saturating at ~10.
contributors = clamp01(log1p(distinctAuthors) / log1p(10))
Tier colors
The web app and CLI both color the score by tier:
| Score | Color | Tier |
|---|---|---|
| ≥80 | emerald | high |
| 60–79 | lime | active |
| 40–59 | amber | medium |
<40 | zinc | low / new |
Lite vs Full
What's open-sourced in the @gitdex-labs/gitscore CLI is the Lite version: commits-only activity, no pull-count blending, no ownerTrust, no daily snapshot history. The full version that powers gitdex.app adds:
- Pull-count blending in the activity score (mixes commits and merged PRs for a less commit-spammable signal)
- Daily
ScoreSnapshotso we can compute "Rising 7d" — repos whose GitScore climbed the most in the last week ownerTrustplaceholder (weight 0, reserved for future agent-trust integration)
The formulas above describe the Lite version. The Full version uses the same six components with the same weights, just enriched.
How to raise your repo's GitScore
- Push more often in the last 90 days (raises
activityandfreshness) - Welcome contributors — distinct commit-author count drives the
contributorscomponent - Don't fork unless you mean it —
originalityis the cheapest way to gain 10 points - Time helps —
longevityramps over the first 2 years and then plateaus
What doesn't move the needle:
- Star-farming — saturates at 100 stars; beyond that, popularity adds 0
- Single-day commit dumps — distinct authors and a 90-day window dilute one-time bursts
- Renaming or forking — fork status is detected from the repo metadata
Where the data comes from
All inputs come from the gitlawb network API: /api/v1/repos for metadata, /api/v1/repos/{owner}/{name}/commits for commit history. The CLI talks to node.gitlawb.com directly; the web app indexes the same data daily into Postgres and snapshots scores for trend analysis.
See also
- Tokenization Radar — how tokens get linked to scored repos
- gitscore CLI — run the formula on any gitlawb repo
- Embed badge — show your GitScore live in your repo README