Documentation menu▾
gitscore CLI
@gitdex-labs/gitscore is the open-source command-line tool that scores any gitlawb network repo. Same scoring engine as gitdex.app, packaged as a Node CLI + library.
Install
# Run without installing
npx @gitdex-labs/gitscore <ownerDid>/<repoName>
# Or install globally
npm install -g @gitdex-labs/gitscore
gitscore <ownerDid>/<repoName>
Requires Node 18+. Zero runtime dependencies.
Example
$ npx @gitdex-labs/gitscore z6MkqDnb7Siv3Cwj7pGJq4T5EsUisECqR8KpnDLwcaZq5TPr/openclaude
z6MkqDnb7Siv3Cwj7pGJq4T5EsUisECqR8KpnDLwcaZq5TPr/openclaude · GitScore 86/100
Longevity ██████████░░░░░░ 61% (15% weight)
Popularity ██░░░░░░░░░░░░░░ 15% (10% weight)
Originality ████████████████ 100% (10% weight)
Freshness ████████████████ 100% (20% weight)
Activity ████████████████ 100% (30% weight)
Contributors ████████████████ 100% (15% weight)
via gitdex.app · gitlawb network
Configuration
By default the CLI queries https://node.gitlawb.com. Point at a self-hosted gitlawb node with GITLAWB_NODE_URL:
GITLAWB_NODE_URL=https://my-node.example.com npx @gitdex-labs/gitscore <ownerDid>/<repoName>
Library usage
import { gitScore, fetchGitlawbRepo } from "@gitdex-labs/gitscore";
const inputs = await fetchGitlawbRepo("z6MkqDnb.../openclaude");
const { score, components } = gitScore(inputs);
console.log(score); // 86
console.log(components); // { longevity: 0.61, popularity: 0.15, ... }
Or pass your own inputs (custom data source):
const { score } = gitScore({
createdAt: "2024-05-24T00:00:00Z",
pushedAt: "2026-05-20T00:00:00Z",
stars: 100,
isFork: false,
commits: [{ author: "dev@example.com", date: "2026-05-20T00:00:00Z" }],
});
What the CLI computes vs gitdex.app
The CLI is the Lite version of GitScore — commits-only activity, no pull-count blending, no ownerTrust, no snapshot history. See the GitScore methodology for the full breakdown.
This means the CLI score may differ slightly from the score on gitdex.app — that's by design. The CLI is reproducible by anyone; gitdex.app uses additional signals from continuously-indexed data.
Source code
- GitHub mirror: github.com/gitdex-labs/gitscore (MIT)
- gitlawb primary:
gitlawb://did:key:z6MknVT5UjuYaL6F88F8DSfnPHX2uaNgF6s592PqNHoAtKmE/gitscore
The tool itself is a gitlawb-network repo (eating its own dog food).
See also
- GitScore methodology — the formula in detail
- Embed badge — show the score live in your README