A lightweight, cross-platform CLI tool to inspect recent GitHub user activity using GitHub’s public Events API.
gh-activity is designed for developers who want quick, readable insights into pushes, pull requests, and issues — directly from the terminal.
gh-activity is shipped as a single self-contained binary.
You download the release for your operating system, add it to your PATH, and start using it immediately — no Go installation required.
Releases are distributed as ZIP archives that already contain the correctly named binary inside a bin/ directory.
gh-activity/
└── bin/
└── gh-activity (or gh-activity.exe on Windows)
You only need to add the bin/ directory to your system PATH.
- Download the latest release:
gh-activity-windows-amd64.zip
- Extract the archive
- Add the extracted
binfolder to Environment Variables → PATH - Open a new terminal and verify:
gh-activity --help- Download:
gh-activity-linux-amd64.zip
- Extract:
unzip gh-activity-linux-amd64.zip- Add
bin/to PATH:
export PATH=$PATH:/path/to/gh-activity/bin- (Optional) If the binary is not executable:
chmod +x gh-activity- Verify:
gh-activity --help- Download the correct archive:
- Intel:
gh-activity-darwin-amd64.zip - Apple Silicon:
gh-activity-darwin-arm64.zip
- Extract:
unzip gh-activity-darwin-amd64.zip-
Add
bin/to PATH -
(Optional) If the binary is not executable:
chmod +x gh-activity- Verify:
gh-activity --helpTo avoid API rate limits, you can create a GitHub Personal Access Token.
-
Go to GitHub → Settings
-
Open Developer settings (left sidebar)
-
Click Personal access tokens
-
Select Tokens (classic)
-
Click Generate new token
-
Give it a name (e.g.
gh-activity) -
Select scopes:
- ✅
public_repo(recommended)
- ✅
-
Generate the token and copy it immediately
Then set it in the CLI:
gh-activity set token <your-token>- Token is stored locally at:
~/.gh-activity/config.json
- File permissions are restricted (
0600) - A timestamp is recorded
- You’ll receive a warning if the token is older than 90 days
To view the saved token:
gh-activity get token
### Authentication behavior
- The CLI prints a single auth status message once per run (token vs no token).
- If GitHub returns “Bad credentials”, the saved token is removed and the request is retried unauthenticated.
- Unauthenticated requests are rate-limited — set a valid token to avoid hitting limits.The CLI follows a strict positional structure:
gh-activity <scope> <entity> <command> [flags]Currently supported scopes:
userrepo
View repository metadata and a summary of recent events in one go.
gh-activity repo <owner>/<repo> info [--limit N]Shows a two-column table with key fields, followed by a compact events summary.
Field order:
- Name
- Description
- Primary Language
- License
- Visibility
- Stars
- Forks
- Open Issues
- Created
- Last Updated
- Last Push
- Topics
Events order: Push, Issues, Watch, Pull Requests.
- Using GitHub Token for authentication.
📦 Repository Info
FIELD VALUE
------------------ --------------------------------------------
Name ndk123-web/github-activity
Description A lightweight, cross-platform CLI tool to inspect recent GitHub user activity
Primary Language Go
License MIT
Visibility Public
Stars 1
Forks 0
Open Issues 0
Created 2025-12-24
Last Updated 2025-12-28
Last Push 2025-12-28
Topics [cli] [command-line-tool] [cross-platform] [golang] [tool]
📦 Repository Events (recent)
--------------------
EVENT COUNT
------------- -----
Push Events 20
Issues 2
Watch Events 1
Pull Requests 0
--limit controls the number of recent events considered when building the summary.
View recent push activity by a user, grouped by repository.
gh-activity user <username> pushes [--limit N]Flags:
--limit(optional) — Number of recent push events (default: 2)
View pull request activity filtered by state.
gh-activity user <username> pulls --state <open|closed|merged> [--limit N]Flags:
--state(required) —open,closed, ormerged--limit(optional) — Number of results (default: 2)
View issue activity (pull requests are automatically excluded).
gh-activity user <username> issues --state <open|closed> [--limit N]Flags:
--state(required) —openorclosed--limit(optional) — Number of results (default: 2)
View watch/star events grouped by repository.
gh-activity user <username> watches [--limit N]What it shows:
- Count of recent
WatchEventper repository for the user’s recent activity window - An overview summary and a neat table like other commands
Flags:
--limit(optional) — Number of distinct repositories to include (default: 2, max: 50)
Example:
gh-activity user octocat watches --limit 5Generate a combined summary of recent activity for a user (pushes, pull requests, issues, watches) with clean, tabular counts and an aggregated top repositories list.
gh-activity user <username> summary [--limit N]📊 Activity Summary (last 10 events)
Metric Count
Total Events 54
Total Push Events 45
Total Pull Request Events 2
Total Issues Events 2
Total Watch Events 5
Top Repositories (by total activity):
------------------------------------------
ndk123-web/DSA 21 events
ndk123-web/github-activity 20 events
ndk123-web/observability-learning 4 events
ndk123-web/study-sync-ai 4 events
spf13/cobra 1 events
- Current behavior:
--limit Ncaps the number of distinct repositories included per event type (pushes, pulls, issues, watches). It does not limit the total events processed globally. - If you prefer
--limitto mean “process only the last N events overall”, open an issue — this can be switched to a global event cap.
- Controls how many events are displayed
- Default:
2
- Required for
pullsandissues - Pull requests:
open,closed,merged - Issues:
open,closed
Generate a combined summary of recent activity for a user (pushes, pull requests, issues, watches) with clean, tabular counts and an aggregated top repositories list.
gh-activity user <username> summary [--limit N]📊 Activity Summary (last 10 events)
Metric Count
Total Events 54
Total Push Events 45
Total Pull Request Events 2
Total Issues Events 2
Total Watch Events 5
Top Repositories (by total activity):
------------------------------------------
ndk123-web/DSA 21 events
ndk123-web/github-activity 20 events
ndk123-web/observability-learning 4 events
ndk123-web/study-sync-ai 4 events
spf13/cobra 1 events
- Current behavior:
--limit Ncaps the number of distinct repositories included per event type (pushes, pulls, issues, watches). It does not limit the total events processed globally. - If you prefer
--limitto mean “process only the last N events overall”, open an issue — this can be switched to a global event cap.
For internal architecture and extension guidance, see docs/developer-guide.md.
- Data is fetched from GitHub’s Events API
- Events are recent activity only (not full history)
- One push event ≠ one commit
- Output is optimized for terminal readability and scripting
- Long descriptions are normalized (whitespace collapsed) and truncated to avoid breaking table layout.
- Topic tags render as bracketed labels:
[tag1] [tag2] ….
MIT License. See LICENSE.
