DEV Community

Cover image for I built a GitHub CLI extension that shows your contribution graph in the terminal
Jangmyun
Jangmyun

Posted on

I built a GitHub CLI extension that shows your contribution graph in the terminal

gh-contrib-graph: your GitHub contribution graph, right in the terminal

I built a small GitHub CLI extension that renders your
contribution graph directly in the terminal — no browser tab needed.

demo

Why

I found myself opening github.com just to check my contribution streak or peek at
someone else's activity. That felt like overkill for something that's really just
a grid of colored squares. So I wrote a gh extension that draws it for you,
right where you're already working.

Install

It's a gh CLI extension, so setup is one command:


bash
gh extension install Jangmyun/gh-contrib-graph

No separate token or config — it reuses your existing gh auth login session.

Usage

# your own contribution graph
gh contrib-graph

# someone else's
gh contrib-graph octocat

That's it. It fetches your contribution data via the GitHub API and renders it
with charmbracelet/lipgloss for
proper terminal styling and colors.

Under the hood

- Written in Go, built on cli/go-gh so it
plugs cleanly into the gh CLI ecosystem
- Uses your existing gh session — no extra auth flow
- Terminal-aware rendering (color depth, width) via lipgloss + golang.org/x/term

Design was inspired by ghstats-cli —
credit where it's due.

Try it / feedback welcome

Repo: https://github.com/Jangmyun/gh-contrib-graph

It's a small tool, but I'd love feedback, issues, or PRs if you find it useful
(or find something broken). A ⭐ on the repo also helps other people find it!
Enter fullscreen mode Exit fullscreen mode

Top comments (0)