Create a complete, dedicated CLI solution (github_tracker.py) for monitoring software development metrics—commits, issues, pull requests, releases, and developer activity—across multiple GitHub projects in a centralized command center.
Important
Authentication & Rate Limits: GitHub's unauthenticated API allows only 60 requests/hour. The tool will support GITHUB_TOKEN (via environment variable or --token CLI option) to provide 5,000 requests/hour. A local cache (.github_tracker_cache.json) will be included to avoid wasting rate limits during repeated metric analysis.
Note
The tool supports specifying repositories directly via CLI (--repos facebook/react vercel/next.js ...), reading from a config file (repos.txt or repos.json), or auto-detecting GitHub remotes from local git clones.
- Multi-Project Metric Gathering:
- Commits: Recent commit activity (last 7 / 30 days), latest commit timestamp and message, commit velocity.
- Pull Requests: Open PR count, closed/merged PR count, stale PR indicator.
- Issues: Open vs closed issue counts, open issue health.
- Releases: Latest release tag, release publication date, total releases.
- Languages & Code Stats: Top languages breakdown and repository size.
- Engagement: Stars, forks, open watchers.
- Interactive & Visual Rich Terminal UI:
- High-level KPI summary cards (Total Repos, Active PRs, Open Issues, Latest Releases).
- Colorized comparison table displaying metrics side-by-side.
- Project detail view (
--detail owner/repo) providing deep breakdown of recent PRs, issues, and releases.
- Smart Caching & Rate Limit Management:
- Caches responses locally to prevent API exhaustion.
- Live display of remaining GitHub API quota.
--refreshflag to force fetch live updates.
- Export Engine:
- Export multi-project status reports to Markdown (
.md), CSV (.csv), and JSON (.json).
- Export multi-project status reports to Markdown (
GitHubClientclass: Handles GitHub REST API calls (/repos/{owner}/{repo},/commits,/pulls,/issues,/releases), headers with optional Auth token, rate-limit headers checking, and response pagination.RepoAnalyticsCollector: Concurrently fetches metrics for multiple repositories viaconcurrent.futures.CacheManager: Persists metrics with timestamps in.github_tracker_cache.json.RenderEngine: Rich terminal tables, status cards, detail panels, and progress bars.ExportEngine: Generates structured reports in JSON, CSV, and Markdown table format.- CLI Parser: Supports
--repos,--file,--detail,--refresh,--token,--sort,--export, and--clear-cache.
- Default sample project list (e.g. popular open-source projects or custom repos) so users can immediately run
python github_tracker.pyout of the box.
- Add
requests>=2.28.0to ensure dependencies are documented alongsiderich.
- Add section explaining
github_tracker.py, GitHub API token setup, CLI arguments, and export features.
- Verify help menus and options:
python github_tracker.py --help
- Run sample multi-repo tracking on public repos (e.g.
pallets/flaskandtiangolo/fastapi):python github_tracker.py --repos pallets/flask tiangolo/fastapi
- Test single project deep-dive:
python github_tracker.py --detail pallets/flask
- Test report export:
python github_tracker.py --repos pallets/flask --export test_analytics.md
- Test cache hit and refresh behavior:
python github_tracker.py python github_tracker.py --refresh