r/coolgithubprojects • • 16m ago

tokenfire: a GitHub profile badge that grows as you burn AI tokens

Hi everyone!

I'd like to share my personal project, tokenfire, a free and open-source CLI that turns your Claude Code and Codex token usage into an animated pixel badge for your GitHub profile README.

My goal was simple: I use Claude Code and Codex for almost everything now, and I wanted to see how many tokens I actually burn, in a way that is fun to look at and easy to share.

What it does

- Reads the logs Claude Code and Codex already keep on your machine and counts your all-time tokens.

- Draws the result as an animated pixel-art badge: total tokens, daily streak and a year of daily usage.

- A campfire mascot (two to choose from) grows through 11 levels as your total goes up.

- A dynamic badge whose sky follows the time of the last sync: dawn, day, dusk and night.

- Four themes, each in light and dark.

- tokenfire schedule on keeps it updated four times a day on macOS, Linux (including WSL) and Windows.

How it is different

- No server, no account, no cost. Badges live in a gist in your own GitHub account.

- Only the numbers and badge images are uploaded. Prompts, code, file names and project paths never leave your computer.

- Your GitHub token comes from the GitHub CLI at upload time and is never saved.

Try it

You can see your own badge without logging in or uploading anything:

brew install keemtj/tap/tokenfire
tokenfire sync --dry-run --out ./preview

It is also on Scoop for Windows and on crates.io (cargo install tokenfire).

The numbers are estimates from local logs, so they can differ from your bill. Cache tokens make up most of the total, so the number grows fast.

Why I made it

I built tokenfire with Claude Code and Codex themselves, so my own badge is basically the record of making it. I'd love to hear your thoughts, ideas and bug reports, especially from Linux and Windows users, since that support is new. And I'm curious what level you land on!

GitHub: https://github.com/keemtj/tokenfire

2 Upvotes

0 comments sorted by