I’ve built a small hardware project that combines a Raspberry Pi Zero 2 W with a Waveshare 2.13″ e-ink HAT+ to passively display my GitHub Copilot AI credit usage — and it scratches an itch I’ve had since Copilot moved to consumption-based billing.
I’ve always enjoyed combining hardware with software and cloud services. There’s something satisfying about pulling data from an API and having it show up on a physical display sitting on your desk, no screen tap or app switch required. This project is a good example of that.
The problem
With consumption-based billing, how many credits you’ve used becomes relevant pretty quickly. VS Code shows it in the status bar while you’re coding, but the moment you switch contexts, so does that info. I wanted it on something physical — always visible, no interaction required.
What it does
A small Python app runs on the Pi and pulls Copilot AI credit usage from the GitHub API at a configurable interval. It renders the result as a compact card — VS Code-inspired — with a progress bar that alternates between showing the percentage and the exact used/included credit numbers.
It supports three output modes: console, eink, or both, which makes it easy to develop and test without the physical hardware in front of you.
A few things worth knowing
The GitHub billing usage API is not real-time. It can lag behind what VS Code shows by around five minutes, so don’t expect it to tick down the moment you fire off a request.
Also, if your Copilot subscription is billed through an organization or enterprise, the personal endpoint will return empty data. This only works for accounts billed directly through GitHub.
Hardware
- Raspberry Pi Zero 2 W
- Waveshare 2.13″ e-ink HAT+
The e-ink display is a good fit for this use case — low power, always on, no backlight glare, and it holds the last image even when the script isn’t actively refreshing.
You’ll find the full project, setup instructions, and code on GitHub: GitHub – gerbermarco/github-copilot-usage-display · GitHub
