GitHub Features Commands Install FAQ Toggle Theme
v1.0.0

GitHub stats in your terminal.

Fetch profiles, repos, contributions, and activity for any GitHub user. Rich colored output, file-based caching, zero bloat.

terminal — ghstats
@P-kaizoku Profile Name: Pabitra Mondal Followers: 16 Public Repos: 43 Total Stars: 4
$ ghstats contrib --no-cache
tab switch context · ctrl-p commands

Features


  • [+]
    Profile stats Your or any user's followers, repos, stars, and more
  • [+]
    Repository details Stars, forks, languages, topics, license in one call
  • [+]
    Contribution calendar Full-year heatmap with streaks, top languages, green or grey theme
  • [+]
    Recent activity Push events, PRs, issues for any public user
  • [+]
    Organization stats Public repos and total stars for any org
  • [+]
    Smart caching File-based, 30-min TTL, configurable. Skip with --no-cache
$ ghstats user torvalds
@torvalds
Followers: 230,000+
Public Repos: 7
Member Since: 2011-01-25
$ ghstats repo spf13/cobra
spf13/cobra
Stars: 44,000+
Forks: 3,100+
Language: Go

Commands


  • ghstats me [username] Show your GitHub profile stats
  • ghstats user <username> Show stats for any GitHub user
  • ghstats repo <owner/repo> Show repository statistics
  • ghstats repos --sort stars List your repositories with metrics
  • ghstats contrib [username] --theme green|grey Contribution calendar with heatmap
  • ghstats activity [user] --limit N Recent GitHub activity feed
  • ghstats org <name> Organization stats and repo count
  • ghstats config list|token|clear Manage token and cache settings

Install


git clone https://github.com/P-kaizoku/ghstats.git && cd ghstats && go build -o ghstats .

Then set your token: ghstats config token ghp_your_token

Structure


ghstats/ ├── main.go ├── cmd/ │ ├── root.go # root command, --no-cache │ ├── me.go # ghstats me │ ├── user.go # ghstats user │ ├── repo.go # ghstats repo │ ├── repos.go # ghstats repos │ ├── contrib.go # ghstats contrib │ ├── activity.go # ghstats activity │ ├── org.go # ghstats org │ └── config.go # ghstats config └── internal/ ├── cache/ # file-based cache with TTL ├── config/ # ~/.config/ghstats/ ├── github/ # REST + GraphQL client └── ui/ # lipgloss terminal output

FAQ


  • Do I need a GitHub token?
    Yes. Generate one at github.com/settings/tokens with repo scope, then run ghstats config token ghp_.... Stored locally at ~/.config/ghstats/config.yaml. Never in the repo.
  • Where is data cached?
    API responses cached in ~/.config/ghstats/cache/ with a 30-minute TTL. Bypass with --no-cache or wipe with ghstats config clear-cache.
  • What does the contribution calendar show?
    Full-year GitHub-style heatmap with current streak, longest streak, total contributions, and top languages from your most-starred repos. Uses the GitHub GraphQL API.
  • Can I look up other users?
    Yes. ghstats user, ghstats contrib, ghstats activity, and ghstats org all accept any public GitHub username.
  • How do I uninstall?
    Remove the binary: sudo rm /usr/local/bin/ghstats. Remove config and cache: rm -rf ~/.config/ghstats.