Token Tracker Display
Featured Project

Terminal Token Tracker

A desk-sized display showing your Claude Code token usage in real time. Pink for today, green for this request, blue for cache costs you didn't know you had.

"The best ambient displays don't compete for attention. They wait."

1.47"
ST7789 Display
320×172
Resolution
~$15
Board Cost
~1.2s
Update Latency
The Design

Status, Not Interruption.

A hardware display that shows what your Claude Code session is actually costing you, without demanding your attention.

Token Tracker Display

Five Things at a Glance

Pink number: Total tokens spent today. Big and impossible to miss. The main event.

Green number: Per-request output tokens. Matches the ↑ X tokens in your chat status line. Ticks during streaming.

Blue number: Cache write tokens — the bill that never shows up in your chat. This is the number that surprises people the most.

"On long Claude Code sessions with prompt caching, the chat reads four digits while the blue number rolls past six. Most users never realize how much of their bill that is."

The Architecture

Two Independent Producers.

Two separate data paths feed a single JSON state file — either or both can run. A 5-second truth-checker reconciles state against Anthropic's actual numbers.

Hardware

ESP32-S3-LCD

Waveshare board with 8 MB PSRAM, 16 MB flash. ST7789 SPI display. WS2812 RGB LED for events. <1s boot time.

Firmware

Arduino + GFX

Arduino-CLI, Adafruit GFX, ArduinoJson. Monospace UI with pink, purple, lavender palette. Animation on LED, static on screen.

Host Path A

Claude Code Hooks

Stop, PostToolUse, Prompt events. Atomic writes to JSON state file. ~150 LOC shell script.

Host Path B

Anthropic SSE Proxy

Intercepts streaming chunks. Token counting from `usage` events. ~150 LOC Python. ANTHROPIC_BASE_URL injection.

Key Features

Designed for the Periphery.

Every detail tuned for peripheral awareness — never asking for attention, always rewarding a glance.

Live Token Tracking

Real-time display of daily spending, per-request output, and cache write costs. Updates from two independent data sources.

Session Rings

5-hour and weekly limit indicators. Visual progress rings that never overflow. Know your quota at a glance.

RGB Event LED

WS2812 LED swirls a 2.5-second rainbow on every token tick. 65% brightness calibrated for visibility across the room.

No Flicker

1.2-second cooldown bunches rapid ticks into meaningful jumps. Screen is static. Only the LED reacts. No distraction.

Truth Reconciler

5-second truth-checker. Compares state file against Anthropic's actual numbers. Atomic updates from two independent paths.

Cold Boot Ready

Display up and running in less than 1 second from power-on. Firmware is tight. Ready to go before your coffee brews.

Why It Matters

The Bill You Never See.

Prompt caching is a quiet majority of what Claude Code costs. The chat status line shows you four digits. Anthropic is billing six.

The cache_write number is the one that surprised me most.

When Claude Code reuses your codebase context between turns, it's paying to write the cache up front — and the chat's ↑ X tokens counter doesn't include any of it. You see the tip of an iceberg.

On a long session with prompt caching working hard, the chat reads four digits while the blue number on the desk rolls past six. That's not a rounding error. That's most of the bill.

Once you see the cache cost in your peripheral vision, you start to instinctively shape your sessions differently: shorter context windows for cheap tasks, deliberate long-context for hard ones. The display doesn't tell you what to do — it just makes the trade-off visible for the first time.

Most users never realize how much of their bill the cache writes are. Once it's a number on your desk, you can't un-see it.

Pink, green, and blue token displays
The Philosophy

A Number You Can Glance At.

The status line lives in the terminal — which is also where you're trying to work. The whole point of an ambient display is to take that signal somewhere your eyes can reach without your brain leaving what it's doing.

Context Cost

No Tab Switching

Looking at a number on a small screen next to your monitor doesn't break flow. Switching to a billing dashboard, or scrolling up in a terminal, does. The difference is enormous over a workday.

Signal vs Noise

Screen Holds. LED Reacts.

The big number doesn't twitch. Animation is offloaded to a single onboard RGB LED that swirls when a value changes — visible from across the room, ignorable when you're focused.

Behavior Change

Glanceable Accountability

You can't budget what you can't see. A real number, on a real screen, on your real desk, changes how you use the tool — quietly, and without anyone in the loop nagging you.

What Was Hard

Real-Time Wasn't Free.

Hooks don't fire while Claude is streaming a 30-second answer. Owning the wire is the only way to see a token the moment it leaves the API.

Architecture in action

A 150-line proxy did what hooks couldn't.

The first version drove the display from Claude Code's hook events. For tool-heavy work it felt instant. For plain text replies the screen sat frozen for 5–30 seconds while Claude streamed, then jumped by thousands of tokens at the end.

The fix was to put a tiny HTTP proxy between Claude Code and the Anthropic API. It forwards every byte transparently and sniffs the SSE stream for usage events as they arrive — bumping the on-screen count every few hundred output tokens, in real time.

There were dragons along the way. USB-CDC on macOS silently dropping writes. An aggregator summing cumulative snapshots and inventing 21 billion phantom tokens. A gzip-encoded SSE stream that looked like it was working but parsed nothing. The fixes are in the code, not the talking points — but each one was the kind of thing you only find by trusting a number on your desk over the number in your chat.

The "real-time" was never going to come from the hooks. It came from owning the wire.

Token Tracker

Know What Your Tokens Actually Cost.

A beautiful little display that sits on your desk and tells you the truth about your Anthropic bill.