ghstat is an interactive terminal application for exploring a GitHub contribution calendar.
It opens a live view where you can move day by day, inspect totals, and switch year windows without leaving the terminal.
- Contribution grid with keyboard navigation
- Day detail panel with week, month, streak, and best-day stats
- Window switching across available years
- Loading and error states that keep context visible
- Go 1.25 or newer
- A GitHub token in
GITHUB_TOKENor passed with--token
go run . <github-username>Prebuilt binaries are published with every release. Download the archive for your platform from the GitHub Releases page in the Assets section.
Install the latest version:
go install github.com/senasphy/ghstat-go/cmd/ghstat-go@latestInstall a specific version:
go install github.com/senasphy/ghstat-go/cmd/ghstat-go@v0.1.1You can install directly from releases using the scripts in this repository.
Linux and macOS:
curl -fsSL https://raw.githubusercontent.com/senasphy/ghstat-go/main/scripts/install.sh | shWindows PowerShell:
iwr -useb https://raw.githubusercontent.com/senasphy/ghstat-go/main/scripts/install.ps1 | iexInstall a specific version:
Linux and macOS:
curl -fsSL https://raw.githubusercontent.com/senasphy/ghstat-go/main/scripts/install.sh | sh -s -- v1.2.3Windows PowerShell:
$tmp = Join-Path $env:TEMP "ghstat-install.ps1"; iwr -useb https://raw.githubusercontent.com/senasphy/ghstat-go/main/scripts/install.ps1 -OutFile $tmp; & $tmp -Version v1.2.3Run with explicit token:
go run . --token "$GITHUB_TOKEN" <github-username>Run with a specific end-year window:
go run . --year 2025 <github-username>--year: End year for the rolling 12-month window--token: GitHub token (falls back toGITHUB_TOKEN)
←/hand→/l: previous or next week↑/kand↓/j: move up or down weekday rowsgandG: first day or last day in the loaded window0and$: row start or row endHandL: previous or next month[and]: select previous or next available windowEnter: load the selected windowt: jump to today if it exists in the current window?: toggle helpq,Esc,Ctrl+C: quit
Run tests:
go test ./...Regenerate GraphQL types after query or schema updates:
go run github.com/Khan/genqlient genqlient.yaml- If the app cannot load data, verify your token and username first.
- If private contributions are missing, check token permissions and GitHub profile settings.
.
├── .github/
│ └── workflows/
│ ├── release-validate.yml # PR and main snapshot validation
│ └── release.yml # tag-driven release pipeline
├── cmd/
│ └── ghstat-go/
│ └── main.go # CLI entrypoint
├── internal/
│ ├── contrib/ # calendar model, stats, and navigation
│ ├── githubapi/ # GitHub GraphQL client and mapping
│ └── ui/ # terminal model, keys, styles, rendering
├── queries/ # GraphQL operations
├── scripts/ # install scripts for release binaries
├── .goreleaser.yaml # release packaging and publishing config
├── genqlient.yaml # GraphQL code generation config
└── schema.graphql # pinned GraphQL schema