Extensive GitHub activity and contribution reporting
Project description
ghscope
ghscope generates auditable activity reports for GitHub organisations and users.
It pulls commits, pull requests, issues and reviews through the GitHub GraphQL API, then aggregates them into human‑readable reports in Markdown, HTML, PDF, JSON and CSV.
The HTML export is a self‑contained dashboard with a sidebar, filters and per‑entity breakdowns; PDFs are generated from the same template for a print‑ready view.
Installation
ghscope targets Python 3.12+.
With uv (recommended):
uv add ghscope
With pip:
pip install ghscope
Authentication
ghscope uses a GitHub fine‑grained personal access token.
The token must have:
- Repository access to the repos you want to analyse (ideally “All repositories” for the organisation).
- Scopes/permissions that allow reading:
- code
- pull requests
- issues
- organisation members (for org‑wide reports)
You can pass the token explicitly or via environment variables.
Checked in order:
--tokenCLI flagGH_FINE_GRAINED_TOKENGITHUB_TOKENGH_TOKEN
CLI usage
Once installed, a ghscope entrypoint is available on your PATH.
Basic help:
ghscope --help
ghscope report --help
Generate a Markdown report for an organisation over a date range:
ghscope report \
--org Alievs-corp \
--since 2026-01-01 \
--until 2026-02-28 \
--format md \
--output ./report.md
Generate an HTML dashboard:
ghscope report \
--org Alievs-corp \
--since 2026-01-01 \
--until 2026-02-28 \
--format html \
--output ./report.html
Generate a JSON export suitable for further processing:
ghscope report \
--org Alievs-corp \
--since 2026-01-01 \
--until 2026-02-28 \
--format json \
--output ./report.json
Generate a PDF (requires WeasyPrint and its system dependencies):
ghscope report \
--org Alievs-corp \
--since 2026-01-01 \
--until 2026-02-28 \
--format pdf \
--output ./report.pdf
You can also run reports for a single user:
ghscope report \
--user martian56 \
--since 2026-01-01 \
--until 2026-02-28 \
--format html \
--output ./user-report.html
--org and --user can be combined; the tool will analyse all repos visible to the token in that scope.
HTML dashboard
The HTML output is a static, portable dashboard with:
- Overview: repository count, commit/PR/issue totals, lines changed, active/inactive contributors.
- Contributors: per‑user activity, sorted by total impact.
- Repositories: per‑repo summaries (commits, lines, PRs, issues, distinct contributors).
- Activity timeline: stacked bars per day (commits, PRs, issues).
- Pull requests, commits, issues: detailed tables with titles/messages, authors, counts and state.
There is a small filter bar at the top:
- Focus on contributor: pick a user to see only their work; all sections (overview, repos, timeline, PRs, commits, issues) realign to that view.
- Filter by text: search across titles and messages.
The page is fully static: no build step, no external assets, and it can be served from any static host or converted to PDF.
Data exported
Depending on the format, ghscope exports:
-
Aggregates
- per‑user counts (commits, lines added/deleted, PRs opened/merged, issues opened/closed/assigned, reviews given/received)
- per‑repo counts (commits, lines, PRs, issues, contributor count)
- active vs inactive contributors
- daily activity buckets
-
Raw entities
- users
- repositories
- commits
- pull requests
- issues
The JSON export contains both the aggregates and the raw entities so you can reshape the data as needed.
Notes
- The reports only include repositories and members that the token can see. If you expect more data than appears in a report, check the token’s repo and organisation permissions first.
- For large organisations, keep an eye on GitHub GraphQL rate limits.
ghscopelogs remaining calls and the reset time when you run with--verbose.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ghscope-0.1.0.tar.gz.
File metadata
- Download URL: ghscope-0.1.0.tar.gz
- Upload date:
- Size: 18.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33cc3b0d33b1fc9412670bf76b748932f083554135084523029db569f91ad555
|
|
| MD5 |
f4059dab58e723187367587bd87854e6
|
|
| BLAKE2b-256 |
25477ce00b2b670727e5a852102f2b3a03a5b7f8b412c6f700ab586e91b3ad59
|
Provenance
The following attestation bundles were made for ghscope-0.1.0.tar.gz:
Publisher:
cd.yml on Alievs-corp/ghscope
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ghscope-0.1.0.tar.gz -
Subject digest:
33cc3b0d33b1fc9412670bf76b748932f083554135084523029db569f91ad555 - Sigstore transparency entry: 1030883215
- Sigstore integration time:
-
Permalink:
Alievs-corp/ghscope@ec5075974e985fdbeaf11b23f12a054714a4292c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Alievs-corp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@ec5075974e985fdbeaf11b23f12a054714a4292c -
Trigger Event:
push
-
Statement type:
File details
Details for the file ghscope-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ghscope-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aeee1ca136cdd8ef38aac13e394154540fe6c9fb897eab0c01480f2a62babc21
|
|
| MD5 |
c7cc6150811dcc9c5979263b917e3fc6
|
|
| BLAKE2b-256 |
18c9f5464f4467bab24ef2dfe5d4fb9ae518d81784fca20b1c9de26b371f8c92
|
Provenance
The following attestation bundles were made for ghscope-0.1.0-py3-none-any.whl:
Publisher:
cd.yml on Alievs-corp/ghscope
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ghscope-0.1.0-py3-none-any.whl -
Subject digest:
aeee1ca136cdd8ef38aac13e394154540fe6c9fb897eab0c01480f2a62babc21 - Sigstore transparency entry: 1030883271
- Sigstore integration time:
-
Permalink:
Alievs-corp/ghscope@ec5075974e985fdbeaf11b23f12a054714a4292c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Alievs-corp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@ec5075974e985fdbeaf11b23f12a054714a4292c -
Trigger Event:
push
-
Statement type: