Skip to main content

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:

  1. --token CLI flag
  2. GH_FINE_GRAINED_TOKEN
  3. GITHUB_TOKEN
  4. GH_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. ghscope logs remaining calls and the reset time when you run with --verbose.

Metadata

Release files for ghscope 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ghscope 0.2.0
File Size Uploaded
ghscope-0.2.0.tar.gz 19.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ghscope 0.2.0
File Interpreter ABI Platform
ghscope-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 45.5 kB

Release files / ghscope-0.2.0.tar.gz

Download URL ghscope-0.2.0.tar.gz
Size 19.0 kB
Tags Source
SHA-256 checksum
How to use checksums
178c9f573cd6eae2f1480799177279e9af5fc2a338f8560f6e8a7954496f2478
BLAKE2b-256 checksum
How to use checksums
7ac0521ecf4959de9aabc480542d6a024f264c98bf7cefc26b441797af4e27a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 11, 2026.

Transparency log

Release files / ghscope-0.2.0-py3-none-any.whl

Download URL ghscope-0.2.0-py3-none-any.whl
Size 26.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
292db2099965e0778511902772dbfff08e48ffb0234093e7f78ba227d4e7d64c
BLAKE2b-256 checksum
How to use checksums
9d9a8952cbeaf3e57ea75450d555044f486761982d756616b19c7c5b97d9e913
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page