← All projects
Developer toolsmacOS app·Shipped

Claude Token Counter

Shows a running total of my Claude Code token usage in the macOS menu bar, plus today's count and active sessions.

Period

Jul 2026

Role

Sole engineer

Type

macOS app

Tools

PythonrumpsmacOSpytest

How it works

Claude Code writes a log file for every session. The app tails those files every 15 seconds and adds up input, output and cache tokens. It remembers how far into each file it has read, so nothing gets counted twice, and the total keeps going even after Claude Code deletes old logs. Today's number is filtered by each entry's own timestamp, so the first run doesn't dump the whole backlog into today.

From the menu you can pause it, change the scan interval, and turn on start at login. There's an opt in leaderboard where a friend code points at a private GitHub Gist, with the token stored in the macOS Keychain. It's on the honor system.

Details

About 750 lines of Python using rumps, with an install script instead of a packaged binary. The lifetime total only covers what Claude Code still had on disk when I installed it, which is about the last 30 days, plus everything after.

← Previousclaude-linkNext →Blind Chess Trainer