GitDEXGitDEX
Documentation menu
Concepts

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:

ComponentWeightSignal
Activity30%Commits in the last 90 days (log, saturates ~30)
Freshness20%Days since last push (linear decay, 0 at 90d)
Longevity15%Repo age (log, saturates ~2 years)
Contributors15%Distinct commit authors (log, saturates ~10)
Popularity10%Stars (log, saturates ~100)
Originality10%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:

ScoreColorTier
≥80emeraldhigh
60–79limeactive
40–59ambermedium
<40zinclow / 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:

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

What doesn't move the needle:

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