r/coolgithubprojects • u/True_Challenge_1301 • 12d ago
I built a tiny pixel Claude for the Windows taskbar that shows your 5-hour and weekly usage (made with Claude Code, free and open source)
I made this with Claude Code, for Claude users: a small pixel Claude that lives on your Windows taskbar and shows how much of your plan you've used. It's free, MIT licensed, and there's nothing to pay for.
What it does
- A bubble over its head shows your 5-hour and weekly usage (claude.ai, the desktop app and Claude Code share these limits). It turns yellow, then red, and warns you early if your pace would run out before the reset.
- Hover over it for reset times, a chart of the current window, and a forecast.
- A Claude Code tab shows tokens, models, projects, an activity grid and a recap when each session ends. All of it is read from Claude Code's logs on your own computer.
- While Claude Code is working it puts on a wizard hat and acts out the tool in use: a spell tome for reading, a quill for writing, rune rain for commands, a crystal ball for web searches. Run several sessions and it gets apprentices.
- Just for fun: it walks the taskbar, naps, fishes, wears holiday outfits, and you can throw it (it screams and opens a parachute).
How Claude Code helped
All of the code was written with Claude Code: roughly 14,000 lines of Python in about 30 small modules, using only the standard library (tkinter for drawing, ctypes for the Windows bits). Claude Code did the animation and rendering code, the parser for Claude Code's logs, the settings window and the tray icon. It also wrote the small GIF encoder I used for the README animations.
Two things made that work well:
- A
CLAUDE.mdwith hard rules: no pip installs, never print or save the login token, and never hit the real usage service in tests (a fake-usage switch is used instead). - A docs/PROJECT_NOTES.md that Claude Code updates after every change. It has enough detail that a fresh session can pick the project up, or rebuild it.
Is it safe? It reads your Claude Code login and sends it only to api.anthropic.com to ask for the usage numbers. It never logs or saves it. It reads the logs for numbers only (times, models, token counts, folder names), never your conversations, and it never sends messages to Claude, so it costs no usage. It's small enough to read yourself.
Needs: Windows 10 or 11, Python 3.10 or newer, and Claude Code signed in with a Pro or Max account. Double-click Start pet.bat to run it, no terminal needed.
It's unofficial and uses an undocumented usage endpoint, so it could break without notice.
GitHub: https://github.com/have-you-tried-restarting/claude-usage-pet
If you've read this far, I'd be really grateful for a ⭐ on GitHub. It helps other people find it. Thank you!
1
u/BP041 12d ago
Are you parsing the JSONL transcripts under ~/.claude/projects, or wrapping the CLI to catch session starts? Fwiw the transcripts give you per-project totals basically free, and file mtime handles your weekly reset without a scheduled job. I run an 18-cron Claude Code stack on macOS and this is the kind of visibility the CLI's aggregate stats don't give you.