Skip to content

About

Self-hosted alternative to github-readme-stats. Static SVGs, cron-driven, no JS, no runtime API calls. Pure Python stdlib.

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

gh-widgets

Self-hosted alternative to github-readme-stats and friends. Renders seven profile SVGs and repository star-history SVGs on a cron — no JavaScript, no third-party service, no flakiness.

Followers: 14; public repositories: 11; stars received: 26; forks received: 5; contributions in the last year: 36,700.
Current streak: 95 days; longest streak: 95 days; total contributions: 36,700.
Top language: TypeScript (48.3% of code bytes).
Pull requests: 533 opened, 456 merged, 81 repos (86% merged); issues: 204 opened, 166 maintainer-accepted, 62 repos (81% maintainer-accepted).
Shown external repos: 10. Top live-code repo bamdadd/multicam-sim: 7,582 of 34,205 lines (22.2%).
Measured external PRs: 275 across 10 shown repos; median per-repo average wait: 5.3 h.
Repository popularity: top five owned repositories, scored relative to the leader on a 0–10 scale.
Star history of Nitjsefnie/Overflow: 39 stars.

Why

The popular widget services (vercel-hosted readme-stats, heroku streak counters, etc.) routinely break — Vercel rate-limits them, the Heroku ones sleep, GitHub camo caches the broken state, your README looks half-empty.

Render the SVGs yourself instead:

  • Static output. A cron job (or systemd timer) writes stats.svg, streak.svg, languages.svg to a directory. Your web server serves them as plain files. No request-time API calls, no runtime dependencies.
  • Fails gracefully. If a refresh fails (API rate limit, network), the previous SVGs keep serving. They can't 404 unless you delete them.
  • No JS, no fonts loaded by the SVG. Uses JetBrains Mono, monospace with system fallback so embedding into a GitHub README looks right without pulling Google Fonts.
  • Pure Python stdlib. urllib + json + argparse. CI tests Python 3.14 and 3.15; that does not establish compatibility with untested future releases. No pip install needed.

Install

sudo ./install.sh              # -> /usr/local/bin, or pass a directory

# token: a classic PAT with public_repo is enough; read:user is NOT required
# (nothing here reads your email). Save it to a file with mode 600.
echo "ghp_xxx..." | sudo tee /etc/gh-widget.token
sudo chmod 600 /etc/gh-widget.token

# customise the service unit (username, output dir, theme)
sudo cp examples/gh-widgets.service /etc/systemd/system/
sudo cp examples/gh-widgets.timer   /etc/systemd/system/
sudoedit /etc/systemd/system/gh-widgets.service   # set GH_WIDGETS_GH_USER, GH_WIDGETS_OUT_DIR

sudo systemctl daemon-reload
sudo systemctl enable --now gh-widgets.timer

# verify
sudo systemctl start gh-widgets.service
ls -la /var/www/example.com/widgets/

Then add the nginx snippet from examples/nginx.conf (CORS + cache-control).

Why install.sh rather than cp

install.sh stages an eleven-file deployment set: the five renderer entry points, src/render-impact.py's src/impact_loc.py sibling and its src/impact_clone.py dependency, their shared src/ghwidgets_common.py runtime dependency and its src/ghwidgets_cache.py and src/ghwidgets_journal.py siblings, and the separately installed ghwidgets_data.py public API for pinned consumers. The renderers assert src/ghwidgets_common.py's COMMON_VERSION on startup; they do not import ghwidgets_data.py. The installer moves the complete set into place and starts every entry point to prove the renderer deployment is coherent. A hand-rolled copy that omits a shared module can leave a renderer refusing to run, deliberately preventing rendering from a stale shared module.

Note the rename: src/render.py installs as render-gh-widgets.py (the name the units use). The scripts find their sibling modules relative to their own path, so the rename is safe.

Who counts as "you"

The external-contribution and impact cards need to know which repos are yours and which lines are yours. Both are derived from the token's own account — login, databaseId, and the orgs it administers — so taking over an organisation needs no config change; an org where the account is only a member is not yours and counts on no card. Ownership of a line is decided by exact match against the account's GitHub noreply addresses, not by pattern-matching a name.

The two identity overrides are additive — neither can remove something the API reported. GH_WIDGETS_GH_EXTRA_ORGS separately adds public organization repos to the stats card. Its stars received leave out the account's own stars on the repos it counts.

Variable Use it for
GH_WIDGETS_GH_EXTRA_INSIDERS Owners to treat as yours that the API will not report — e.g. an org whose membership is private. Comma-separated.
GH_WIDGETS_GH_EXTRA_EMAILS Commit-author addresses that are yours but are not a GitHub noreply address — e.g. the address you use on a workstation. Comma-separated.
GH_WIDGETS_GH_EXTRA_ORGS Organization logins whose public, non-fork repos add to the stats card's repo, stars, and forks totals. Comma-separated; empty by default; the units in units/ fill it at each run with every org the token's account administers (gh api user/memberships/orgs, role admin, state active); private repos are filtered out.

Tuning the impact score (src/render-impact.py)

Each table ranks repos by WilsonLowerBound(mine/total, z) * mine**gamma. The defaults are the validated values; override only if you know why.

Pull-request and issue scores also carry a bounded per-contribution freshness weight. A merged PR or completed issue starts aging immediately: its weight is 0.05 + 0.95 * 2**(-age_days / 7), so credit halves within a week and settles at a twentieth rather than reaching zero. A repo's freshness is the mean of its contributions' weights; one new contribution therefore cannot refresh the whole history. PR age starts at merge, issue age at completion, and live code does not decay because surviving lines already describe current impact.

Display scores are renormalised so the strongest row in each section reads 10.00, anchored on every scored repo rather than the rendered five — a repo falling out of the top five therefore cannot rescale the rows that remain. Decay shows up in the ranking and in the gaps between rows, not in the leader's own number.

Each section renders five rows by default. -n N (--top N) renders N instead — the ranking, the scores, and the ten-point anchor are unchanged, so widening the card only reveals rows that were already there. The card grows taller to fit them. N must be a whole number of at least 1.

Variable Default Effect
GH_WIDGETS_IMPACT_Z 2.58 Confidence level of the lower bound. Higher = more sceptical of small samples.
GH_WIDGETS_IMPACT_PR_GAMMA 1.0 How much raw PR volume counts against share.
GH_WIDGETS_IMPACT_COUNT_BOT_PRS 0 Exclude merged PRs whose author is a GraphQL Bot from PR totals, shares and scores. Set 1 to include them; unset, empty or 0 excludes them. Other values abort. Cached fallback uses the same setting.
GH_WIDGETS_IMPACT_ISSUE_GAMMA 1.75 Same, for issues.
GH_WIDGETS_IMPACT_LOC_GAMMA 0.5 Same, for surviving lines.

An unparseable value aborts the run rather than silently reverting to the default — a mis-typed knob that quietly renders wrong numbers is worse than a failed run.

Tuning the responsiveness score (src/render-responsiveness.py)

The board ranks repos by n**gamma * 1/(1 + t/half_life), where n is your PRs in the repo that are merged or still open, and t is the trimmed-mean hours they waited (mean of the p10..p90 range, inclusive; plain mean for fewer than 4 PRs). A merged PR's wait ends at the merge; an open one is counted at its age right now, so it grows on every render until somebody acts on it. Without that, a repo that never answers would have no slow merges to average and would outrank one that answers late. A PR closed without merging is excluded: it was answered, with a no.

Variable Default Effect
GH_WIDGETS_RESP_GAMMA 0.5 How much raw PR volume counts against turnaround.
GH_WIDGETS_RESP_HALF_LIFE_H 24.0 Turnaround at which the speed factor is 0.5 (0.25 at three times it).
GH_WIDGETS_RESP_MIN_PRS 3 PRs (merged or open) a repo needs before it is ranked at all.

Same contract as the impact knobs: an unparseable value aborts the run.

Usage (manual run)

GH_WIDGETS_GH_USER=octocat GH_TOKEN=ghp_xxx GH_WIDGETS_OUT_DIR=./widgets ./src/render.py
GH_WIDGETS_GH_USER=octocat GH_WIDGETS_GH_TOKEN_FILE=/etc/gh-widget.token GH_WIDGETS_OUT_DIR=/var/www/example/widgets GH_WIDGETS_THEME=catppuccin ./src/render.py

Public snapshots

ghwidgets_data.py is the supported importable boundary for consumers such as ghpulse. Its public snapshot is an acquisition/interchange contract, not an input format for the renderer-private profile, impact, or responsiveness data.

SCHEMA_VERSION is currently 1. fetch_authored_snapshot(token, login) acquires the complete authored issue and pull-request history, following every page until GitHub reports the final page. Pagination cursor failures and an explicit safety limit fail loudly instead of returning a plausible partial snapshot. Its exact v1 top-level shape is:

{
  "schema_version": 1,
  "generated_at": "2026-01-05T00:00:00Z",
  "account": {"login": "account-login"},
  "repositories": [],
  "issues": [],
  "pull_requests": []
}

There are no membership, insiders, token, credential, or other unlisted fields. Repository records have exactly id, nameWithOwner, url, isPrivate, and owner; owner has exactly login, and isPrivate is always false. Issue records have exactly node_id, repository_id, repository, owner, repository_url, is_private, number, url, created_at, updated_at, closed_at, state, and state_reason; pull-request records have exactly the same fields except state_reason, plus exactly merged_at and merged. The PR source does not produce an issue state_reason, so adding that field to a PR is rejected. Strings are non-empty, numbers are positive integers, booleans are actual booleans, nullable outcome timestamps are RFC 3339 strings or null, and every item references a repository in the same snapshot. States and final outcomes must be internally consistent. The allowed issue state matrix is — every state_reason is null or a non-empty, non-blank string of at most MAX_STATE_REASON_LENGTH characters, and each row adds the rules its state imposes:

record state closed_at state_reason
issue OPEN null null, REOPENED, or any reason string other than COMPLETED or NOT_PLANNED
issue CLOSED RFC 3339 any reason string that is not null or REOPENED

state and closed_at are exact; state_reason is bounded, not enumerated. An OPEN issue may not carry COMPLETED or NOT_PLANNED, and a CLOSED issue needs a closed_at plus a reason that is neither null nor REOPENED. Every other reason string is accepted and preserved verbatim — GitHub's IssueStateReason is upstream-controlled and returns values this contract never named (DUPLICATE, for one), so unknown reasons cross the boundary by design and a consumer can reconcile them.

The complete allowed pull-request state matrix is:

record state merged closed_at merged_at
pull request OPEN false null null
pull request CLOSED false RFC 3339 null
pull request MERGED true RFC 3339 RFC 3339

Those are all valid pull-request combinations. In particular, an open item cannot have a close timestamp, a closed issue requires a reason that is neither null nor REOPENED (and accepts any other reason string), PRs do not have a state_reason field, a PR in MERGED state must have both outcome timestamps, and an OPEN or CLOSED PR must be unmerged with merged_at: null.

The supported public functions are normalise_issue, normalise_pull_request, fetch_authored_snapshot, load_snapshot, and write_snapshot (plus SCHEMA_VERSION). Arbitrary snapshot construction is internal (_build_snapshot) and is not a consumer API. The producer publishes public external data only: private repositories are removed, the account and explicitly public organizations it administers are excluded transiently during acquisition, and credentials are never serialized. Membership relationships are not part of the interchange contract. Environment-based insider and email additions are not read by the public producer.

load_snapshot() and write_snapshot() perform the same exact nested validation. Invalid data raises the stable SnapshotValidationError (with unsupported versions reported as its SnapshotVersionError subclass) before write_snapshot() invokes the locked, atomic strict writer. Lock or filesystem failures raise separately instead of silently losing a snapshot. Consumers that embed or submodule gh-widgets must pin the exact gh-widgets commit defining this contract and upgrade it deliberately with compatibility tests; an unpinned moving branch is not a supported interface.

The renderer CLIs and their SVG output remain unchanged and independently runnable; they do not consume public snapshots. cache.json and impact-cache.json remain separate private implementation caches and are not the public integration API.

Caching

GitHub rejects a full-year contribution-calendar query with RESOURCE_LIMITS_EXCEEDED once an account's history is large enough, so the renderer caches the data that cannot change and refetches only what can.

  • GH_WIDGETS_CACHE_FILE — cache location, default /var/lib/gh-widgets/cache.json. Missing, unreadable, corrupt, or schema-mismatched caches are not errors: the run falls back to a full fetch.
  • GH_WIDGETS_REST_CACHE — REST conditional-GET store (per-URL ETag, body and Link header) for the popularity renderer's reads of public listings, default /var/lib/gh-widgets/rest-cache.json under the units. An unchanged resource is re-requested with If-None-Match and answered from the store on a 304 Not Modified, which GitHub does not charge against the primary rate limit; each run prints rest-cache: requests=N not-modified=M. Each save rewrites the file with just the URLs that run used, so idle URLs drop out. Missing or corrupt stores degrade to a full fetch; unset, the renderer fetches everything.
  • cache.json and impact-cache.json are private renderer implementation details. Do not use either cache as an interchange format for another process; use the versioned ghwidgets_data API instead.
  • Settled calendar days and MERGED pull requests are cached. Open and closed PRs, issues, and the trailing 7 days of calendar are refetched every run — closed items can be reopened, so they are never treated as final.
  • A cold cache backfills the year in 12 monthly windows rather than one full-year request, so the first run cannot trip the node limit.
  • If a fetch fails and a cache exists, the widgets render from cache and the card shows the cache timestamp, so staleness is visible rather than silent.
  • --resync discards the cache and rebuilds it. Run it periodically (a weekly timer is enough) so nothing depends indefinitely on MERGED being one-way.

Themes

Four built-in palettes. Pick one in GH_WIDGETS_THEME= or via --theme:

  • tokyonight (default)
  • catppuccin
  • gruvbox
  • github-dark

Adding a new theme is ~12 lines — just add a dict to THEMES in src/ghwidgets_common.py.

Embedding

<img src="https://your-domain/widgets/stats.svg"     width="720" alt="GitHub stats" />
<img src="https://your-domain/widgets/streak.svg"    width="720" alt="Contribution streak" />
<img src="https://your-domain/widgets/languages.svg" width="720" alt="Top languages" />
<img src="https://your-domain/widgets/external.svg"  width="720" alt="External contributions" />
<img src="https://your-domain/widgets/impact.svg"    width="720" alt="External impact" />
<img src="https://your-domain/widgets/responsiveness.svg" width="720" alt="External responsiveness" />
<img src="https://your-domain/widgets/popularity.svg" width="720" alt="Repository popularity" />

Works in GitHub READMEs (it goes through GitHub's camo proxy — note camo caches images for ~10 minutes, so README updates lag by that much).

Repository star history (src/render-stars.py)

The cumulative step line plots dates from the first star to render time and shows the current total. It uses the shared card, fonts, and four theme palettes; the existing palettes are all dark themes.

GH_WIDGETS_GH_STAR_REPOS=Nitjsefnie/Overflow GH_WIDGETS_GH_TOKEN_FILE=/etc/gh-widget.token \
  GH_WIDGETS_OUT_DIR=./widgets ./src/render-stars.py
./src/render-stars.py --repos owner/one,owner/two --token-file /path/to/token \
  --out-dir ./widgets --cache-file ./stars-cache.json --theme catppuccin

--repos overrides the comma-separated GH_WIDGETS_GH_STAR_REPOS list. Names are deduplicated case-insensitively, and each repository writes a lowercase stars-<owner>-<repo>.svg (for Overflow, stars-nitjsefnie-overflow.svg). A list whose names would produce the same filename is rejected. GitHub's canonical nameWithOwner casing is used for the card's subtitle, title, and description and retained in the cache. Older cache entries without it use the first configured spelling of the repository name. Only public repositories are published. GH_WIDGETS_OUT_DIR, GH_WIDGETS_THEME, GH_TOKEN, and GH_WIDGETS_GH_TOKEN_FILE and their CLI flags behave like the other renderers.

GitHub supplies timestamps for current stargazers only: users who un-starred are absent, so this reconstructs surviving stars rather than a complete historical total. GitHub caps the list at 40,000. Above that limit, the graph shows the first 40,000 returned stars and discloses the cap; the headline still shows the repository's current total. Neither limitation is worked around.

Every run fetches the complete available list through the shared GraphQL retry helper, so un-stars are reflected on the next refresh. The separate cache defaults to /var/lib/gh-widgets/stars-cache.json, configurable with GH_WIDGETS_STARS_CACHE_FILE or --cache-file; it ignores the profile's GH_WIDGETS_CACHE_FILE. Updates use the shared locked, atomic cache writer. A failed fetch uses a valid cached history with a visible fetch timestamp; without one it fails and leaves the previous SVG intact. An explicitly missing or private repo fails even if a formerly public history is cached. No credentials or stargazer identities are cached.

Both services in units/ configure GH_WIDGETS_GH_STAR_REPOS=Nitjsefnie/Overflow and run the stars renderer after the other renderers, with its cache passed explicitly. It has no --resync: every run already refetches the current list. After deployment, embed Overflow's widget with:

<img src="https://nitjsefni.eu/widgets/stars-nitjsefnie-overflow.svg" width="720" alt="Overflow star history" />

Repository popularity (src/render-popularity.py)

popularity.svg ranks your public, non-fork, non-archived repositories and those owned by every organization the token's GET /user/memberships/orgs lists with role admin and state active. It uses the shared card, fonts, accessibility and four themes.

GH_WIDGETS_GH_TOKEN_FILE=/etc/gh-widget.token GH_WIDGETS_OUT_DIR=./widgets ./src/render-popularity.py
./src/render-popularity.py --token-file /path/to/token --out-dir ./widgets --theme catppuccin

The score is stars × 50 + forks × 40 + outsider commits × 5 + unique cloners × 2 + unique visitors. Cloners and visitors are the 14-day uniques from GitHub's traffic API, not the raw checkout or view counts. Traffic requires push access to every eligible repository; an unreadable endpoint (including HTTP 403) fails the whole run with the repository named, leaving the previous SVG intact.

Outsider commits are counted from a fresh blobless, single-branch clone of each repository's default branch, removed after the count. An author is excluded when their lowercased email exactly matches one of your GitHub noreply addresses (with or without your numeric account id), an additive GH_WIDGETS_GH_EXTRA_EMAILS address, the public/profile email returned by GET /user, or any of [email protected], [email protected], [email protected], [email protected], and [email protected]. Authors are also excluded when [bot] appears in their name or email (case-insensitive), or their name exactly matches the token account's name or login. All remaining commits count, including authors whose email is not linked to a GitHub account. Clone or log failures abort. Private owner addresses unavailable to the token can be added with GH_WIDGETS_GH_EXTRA_EMAILS; fetched addresses and noreply identities remain excluded. Empty repositories contribute zero outsider commits; missing branches in nonempty repositories and corrupt histories remain errors.

Only the top five repositories appear, sorted by descending score and then case-insensitive owner/repository name (canonical casing breaks remaining ties). Scores display as raw × 10 / top raw to two decimals: the leader is 10.00, tied leaders share 10.00, and an all-zero population shows 0.00. Raw scores are never displayed.

Every run fetches all API data and clones anew; there is no cache or --resync. GH_WIDGETS_OUT_DIR, GH_WIDGETS_THEME, GH_TOKEN, GH_WIDGETS_GH_TOKEN_FILE and their CLI flags work like the star-history renderer. Both services in units/ run it after responsiveness. After deployment, embed it with:

<img src="https://nitjsefni.eu/widgets/popularity.svg" width="720" alt="Repository popularity" />

The external widget

external.svg answers "what have I done in other people's repos" — the number profile stats usually bury, since a repo you own and a repo you contributed to both just count as "a repo". It has two parallel rows, pull requests and issues, each with three figures.

Pull requests:

  • opened — PRs you authored in repos owned by neither you nor any org you belong to.
  • merged — how many of those were merged. Merged is what the API actually records, so that's what it says.
  • repos — how many distinct external repos you reached.

Issues (the same external predicate — repos owned by neither you nor your orgs, private repos excluded):

  • opened — issues you filed in those external repos.
  • maintainer-accepted — how many the maintainer closed as completed (state CLOSED + stateReason COMPLETED; NOT_PLANNED closures don't count). It's the issue analog of a merged PR — and the wording is deliberate: you opened the report, the maintainer accepted it, so it doesn't claim you did the fixing.
  • repos — how many distinct external repos those issues touched.

Issues come from the GraphQL user.issues connection, which returns issues only, so pull requests are never double-counted. The footer pairs the two rows' success rates: PR merge rate and the maintainer-accepted rate.

Your orgs are read from the API and excluded automatically, so it keeps working when you join or leave one. Private repos are left out — nobody looking at the SVG could verify them.

It pages through your whole PR and issue history (100 per request), so a run costs a few extra API calls. A non-issue on an hourly timer; worth knowing if you run it every minute.

The responsiveness widget

responsiveness.svg answers the other half of the external question: not just how much lands in other people's repos, but how long it takes to land. One row per repo, ranked by volume × speed — n merged PRs with diminishing returns, damped by the trimmed-mean hours from PR creation to merge.

Trimmed mean, not plain mean, on purpose. A plain mean ranks a repo by its single worst outlier — one PR parked over a holiday — rather than by what a contributor should actually expect. The p10..p90 trim keeps the body of typical PRs while dropping the holiday-weekend tail. Repos with fewer than 4 merged PRs fall back to the plain mean so the trim cannot collapse to a single value or an empty set.

A repo needs GH_WIDGETS_RESP_MIN_PRS merged PRs (default 3) to be ranked: a summary over one or two samples is not an estimate of anything. The excluded tail is stated on the card — repo count and PR count — rather than quietly dropped, along with the number of rows the top-N cut hides.

It needs a token for standalone PR acquisition; in the units it reuses the profile renderer's same-run acquisition share. Both units invoke scripts/run-gh-widgets.sh: lookup → profile → impact → responsiveness → stars is serial, while popularity runs independently alongside it. The runner waits for all branches and fails the unit if any step fails, skipping its dependents. Stars uses GraphQL too, so serializing it keeps the unit's in-flight GraphQL requests within the per-process cap of two. The hourly timer uses normal mode; the weekly resync uses --resync on render-gh-widgets.py and render-impact.py only — render-responsiveness.py takes none, since re-running it after the impact resync is its resync — and the order is load-bearing: src/render-impact.py refreshes the shared cache src/render-responsiveness.py then reads. It shares that script's cache, because that is where the account's authored PRs already live: it merges its half in and leaves every other section alone, above all ourloc, the git-blame result src/render-impact.py produces. Both writers take a lock around the file and write it via a temp file plus os.replace, so the two can overlap without either observing or leaving a half-written cache. A failed fetch renders from the cache and says so, exactly like the other two.

Merged PRs recorded in a cache without timestamps stay frozen there, so their timestamps only arrive on a render-impact.py --resync (the weekly timer does one). Until then the card counts what it can and says how many PRs it had to leave out — run the resync once after installing if you don't want to wait.

Caveats

  • The streak counter walks newest→oldest contribution days and skips a single leading zero (today might not be logged yet, or your timezone is ahead of UTC). A second zero is a real gap and ends the streak. It does not try to be cleverer than that.
  • Token only needs read access. If you accidentally grant repo write scope, that's on you.

Tests

python3 -m unittest discover -v

Stdlib unittest, no network — the streak and external-contribution maths run against hand-built calendars. Nothing to install.

Auditing the blame method

GH_WIDGETS_BLAME_METHOD selects how per-repo line counts are produced: targeted (the default) blames only the files your own commits touched, fame runs git-fame over every file, and both runs the two and compares them per repo. The fast path's failure mode is a silent under-count — a smaller number on the card, never an error — so both makes the renderer exit non-zero on any disagreement rather than reporting it into a log.

.github/workflows/targeted-blame-audit.yml runs that comparison weekly. It must audit the identity that renders your card (GH_WIDGETS_GH_EXTRA_EMAILS), or it measures a different set of lines than production does.

Comparing two runs only means something if they blame the same code, so pin the commits first:

scripts/resolve-repo-pins.py --user <login> --out pins.json
GH_WIDGETS_IMPACT_REPO_PINS=pins.json GH_WIDGETS_BLAME_METHOD=both python3 src/render-impact.py --resync

The manifest is {repo: {branch, head}}, resolved from the same query the renderer uses, with an integer shard per repo under --shards N. With it set, every clone is detached to its pinned commit; a pin that cannot be honoured, an unreadable manifest, or a blamed repo the manifest does not mention ends the run rather than falling back to a live branch tip. Unset, clones follow the default branch, which is what production does.

--shards N balances the repos' GitHub disk usage across shards 0 to N-1, and GH_WIDGETS_IMPACT_SHARD=K then blames only shard K's repos, so the weekly audit runs its shards as parallel jobs. Naming a shard without a manifest whose every repo carries one ends the run.

Security

Report vulnerabilities through GitHub's private reporting route on this repository's Security tab — not as a public issue. SECURITY.md covers the reporting path, the single-maintainer situation, and the renderer's API credential (scope, rotation, and what to do on suspected exposure).

License

MIT. See LICENSE.

About

Self-hosted alternative to github-readme-stats. Static SVGs, cron-driven, no JS, no runtime API calls. Pure Python stdlib.

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages