ghp
Compact GitHub activity summary with repository-scoped checkpoints.
Install
uv tool install ghp
# or
uvx ghp
Dev
uv sync
uv run ghp --version
Usage
ghp # open issues + PRs snapshot
ghp upstream # use the GitHub repo from the upstream remote
ghp 1h # deltas since 1 hour ago
ghp upstream 1h # upstream deltas since 1 hour ago
ghp 2026-03-07T14:00:00Z # deltas since timestamp
ghp --json # machine-readable output
ghp --me @clod # highlight mentions
ghp --repo owner/name # explicit repo
ghp inbox # unread notifications across all repositories
ghp inbox 1d # read and unread notifications since 1 day ago
ghp inbox --repo owner/name # unread notifications for one repository
ghp owned # PRs awaiting workflow approval, unwatched repositories
Behavior
- Cursor defaults to the saved checkpoint for the current GitHub repository when
--sinceis omitted. upstreamselects the repository configured as the Git remote namedupstream.- Checkpoints are stored under
$XDG_STATE_HOME/ghp/checkpoints/. WhenXDG_STATE_HOMEis unset or invalid, ghp uses~/.local/state/ghp/checkpoints/. - Each repository has its own atomically replaced checkpoint file, so
origin,upstream, and--repoqueries do not advance each other's checkpoints. - Saved checkpoints include a one-second margin because GitHub's
sincefilters are strict and timestamps have second precision. Boundary activity may appear again on the next run. - Tool installs and upgrades leave checkpoint state in place.
- Repository-keyed
.ghp-last-update-timestampfiles are migrated to XDG state and removed after successful writes. Older plaintext files require an explicit window such asghp 1honce because they do not identify a repository. --sinceaccepts relative shorthands (30m,2h,1d,1w) and normalizes timestamps to canonical UTC.- Snapshot mode returns open issues and open PRs.
- Delta mode returns issues, PRs, issue comments, PR review comments, and recent commits since the cutoff.
inboxlists the authenticated account's notifications, grouped by repository and newest first. It ignores the current checkout and reads and writes no checkpoint: GitHub's unread state is the cursor, and ghp never marks a notification as read.inboxalone returns unread notifications. With a TIME it returns read and unread notifications updated since then, and marks the read onesread.- Each inbox line gives the issue or pull request number (or short commit hash), the subject type, the reason GitHub sent it (such as
mention,review_requested, orauthor), the update time, and the title. ownedchecks every account you own: your user account and each organization where you are an admin. It ignores the current checkout and keeps no checkpoint.ownedlists open pull requests whose GitHub Actions runs wait for maintainer approval, oldest first. GitHub holds runs from first-time and fork contributors this way, and sends no reminder while they wait. A pull request matches when its head commit has a run in theaction_requiredstate.ownedalso lists non-fork, non-archived repositories you own but do not watch. GitHub sends no notifications for those, so their new issues and pull requests never reachghp inbox.ownedprints anawaiting-approvalsection, with oneowner/repo#N @author created_at titleline per pull request, and anunwatchedsection with oneowner/repoline per repository. It printsnonewhen both are empty, and lists every match regardless of--limit.- API or auth failures exit non-zero instead of silently pretending there was no activity.
--jsonprints a machine-readable payload; on failure it emits a JSON object with anerrorfield and exits non-zero.
JSON output
ghp inbox --json prints repo (the --repo filter, or null), timestamp, since (the TIME cutoff, or null), and a notifications list. Each notification has:
| Field | Meaning |
|---|---|
id |
GitHub's notification thread ID |
repo |
owner/repo the notification belongs to |
type |
issue, pr, commit, release, discussion, ci, or GitHub's subject type in lowercase |
number |
issue or pull request number, or commit hash, as a string; null for other types |
title |
subject title |
reason |
why GitHub sent it, such as mention, review_requested, or author |
unread |
true while the notification is unread |
updated_at |
last update time, ISO 8601 UTC |
url |
website link to the issue, pull request, or commit; the repository page for other types |
ghp owned --json prints timestamp, owners (your login, then the organizations you administer), an awaiting_approval list, and unwatched, a list of owner/repo names. Each pull request in awaiting_approval has:
| Field | Meaning |
|---|---|
repo |
owner/repo the pull request targets |
number |
pull request number |
title |
pull request title |
user |
author login |
created_at |
when the pull request was opened, ISO 8601 UTC |
url |
website link to the pull request |
Auth
Looks for tokens in this order:
$GITHUB_PAT$GITHUB_TOKEN$GH_TOKENgh auth token(gh CLI)
ghp owned always needs a token.
ghp inbox always needs a token, and GitHub's notifications API accepts only a gh CLI token or a classic personal access token with the notifications or repo scope. Fine-grained personal access tokens are rejected.
Test
uv run python -m unittest discover -s tests
scripts/test-install.sh
Metadata
Release files for ghp 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ghp-0.3.1.tar.gz | 19.4 kB | Without provenance | Details for ghp-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ghp-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for ghp-0.3.1-py3-none-any.whl |
Total release size: 31.7 kB
Release files / ghp-0.3.1.tar.gz
| Download URL | ghp-0.3.1.tar.gz |
|---|---|
| Size | 19.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4b9dca518677cd1e06ede06b84bb10b1b1199eb6eca59efaaf4f2ff67894c60
|
|
BLAKE2b-256 checksum How to use checksums |
5e3717c3b121f2425de16f92380b80a6ec9539d19f4ebc62059b1926c2961ca1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / ghp-0.3.1-py3-none-any.whl
| Download URL | ghp-0.3.1-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7028d903b5d8cc98f6bbbb62ba32c82c96cdc59ccec0a239fdaf662a05f46845
|
|
BLAKE2b-256 checksum How to use checksums |
6f28f0f2c5e743854df2f0476e91e634857d65ff8a2113b95228f6d3280bdb3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for ghp 0.3.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.