I live in the terminal. I use tmux, neovim, all of it. I almost never need to open a browser to do anything. But GitHub kept dragging me back in. I'd want to check if someone starred one of my repos, or see if there was a notification I missed, and suddenly I'm in a browser tab loading the whole GitHub UI just to see one number. It annoyed me enough that I built something to fix it.
ghboard is a terminal dashboard for GitHub. Contribution heatmap, starred repos, notifications. Tab between them. No browser involved.
Why Go
I've been doing a lot of Python. My main projects are all Python. But for this kind of tool, something that opens fast and stays in the background, Go made more sense. Single binary, starts instantly, no runtime to worry about. I also wanted to actually learn Go properly on a real project instead of just reading about it.
BubbleTea is the TUI framework I used. Charm's stuff in general is well designed. The model BubbleTea uses is basically Elm: you have a model, a view that renders it, and an update function that handles messages. It keeps the code clean once you get used to it. The first hour was confusing because I kept trying to mutate state directly. Once I stopped fighting the pattern it made sense.
What it shows you
Three tabs. The heatmap tab renders your full contribution graph for the current year in the terminal using block characters. It looks exactly like the one on your GitHub profile page. The stars tab is a scrollable list of everything you've starred with descriptions. The notifications tab shows your live GitHub notifications with type labels so you can tell at a glance if it's a PR, an issue, or a mention.
Tab / Shift+Tab switch tabs j / k scroll r refresh q quit
The refresh is configurable. I have mine set to 60 seconds. It polls the GitHub API in the background and updates the view automatically. You just leave it running in a tmux pane.
The GitHub API side
The contribution data is the interesting one to pull. GitHub doesn't expose a clean REST endpoint for it, the heatmap data comes from the GraphQL API. You have to query contributionsCollection with a from/to date range and then walk the contributionCalendar weeks. It's not complicated once you find the right query but it took me a bit to figure out that this was the path to take.
Stars and notifications are both straightforward REST. Standard pagination. Nothing surprising there.
Auth is a personal access token in an environment variable. Classic token or fine-grained, either works. I didn't want to build anything more complicated than that for a personal tool.
What I learned
Go is genuinely pleasant for this kind of project. The compiled binary is small, the concurrency primitives are straightforward, and the standard library covers most of what you need without pulling in a bunch of external packages. I'll probably write more tools in it going forward.
BubbleTea specifically is worth learning if you want to build TUIs. The pattern takes a little time to internalize but once it clicks everything else follows from it. The Lipgloss library they have for styling pairs well with it too. I used Lipgloss for the heatmap color rendering.
Code is at github.com/Null-Phnix/ghboard. Single binary, MIT license. Pull requests welcome.