A Claude Code token-usage meter for the Windows taskbar
Project description
English · Español
Claude Code Meter
A Claude Code token-usage meter for Windows. It reads Claude Code's local session logs and shows how much you've spent today / this week / this month, compared against a target you set yourself.
The figures (
Day ·Week ·Month) live inside the taskbar, next to the clock. Each percentage is colored by level: 🟢 < 70 % · 🟡 < 90 % · 🔴 ≥ 90 %. On a Spanish Windows the labels show asD·S·M(Día/Semana/Mes).
It ships three presentations of the same meter. You pick one (they don't run at the same time — they show the same data in different ways):
| Style | What it is | Looks like |
|---|---|---|
bar (bar.py) |
Figures inside the taskbar, next to the clock | ✳ D 77% · W 62% · M 63% |
tray (tray.py) |
System-tray icon with the value drawn on it and the detail in the tooltip | 63% |
panel (meter.py) |
Floating panel in the corner, with progress bars | box with TODAY/WEEK/MONTH |
D = today · W = week · M = month, each as a % of its target.
Colors update on their own: 🟢 < 70 % · 🟡 < 90 % · 🔴 ≥ 90 %.
⚠️ What it measures (and what it doesn't)
- ✅ Only the usage of Claude Code running on this computer, reading
~/.claude/projects/**/*.jsonl. - ❌ It does not measure Claude on the web/app, the API, or other computers.
- ❌ It is not your real subscription limit: that number lives on Anthropic's
servers and isn't stored locally (you only see it with
/usageinside Claude Code).
That's why "what's left" is computed against a personal target you define, not against the plan's limit.
By default it does not count cache reads (cache_read), which would inflate
the numbers ~100× as the context is resent. It measures real work:
input + output + cache_write.
Requirements
- Windows 10/11
- Python 3.9+ (with
tkinter, included in the official Python installer)
Install
pip install claude-code-meter
That pulls in the dependencies (Pillow, pystray) and adds a claude-code-meter
command. Config and the generated logo are stored in %APPDATA%\ClaudeCodeMeter.
Or from source: git clone … && cd claude-code-meter && pip install -e .
Usage
One command launches the style you choose. You don't need to run several things — pick one.
claude-code-meter # taskbar (default, recommended)
claude-code-meter tray # system-tray icon
claude-code-meter panel # floating panel in the corner
(Equivalent: python -m claude_code_meter.main [bar|tray|panel].)
Adjusting the targets
Right-click on the figures → Adjust target (opens config.json), or create
your own config.json from config.example.json:
{
"daily_budget": null, // daily target; null = weekly / 7
"weekly_budget": 10000000, // tokens/week
"monthly_budget": 60000000, // tokens/month
"count_cache_read": false, // true = include cache reads
"refresh_sec": 60
}
Auto-start (Windows)
To start it on boot, put a shortcut in the Startup folder (Win+R →
shell:startup) pointing to the installed command:
Target: …\Scripts\claude-code-meter.exe
Arguments: bar
(claude-code-meter is a GUI script, so it runs without a console window. The
repo also ships Iniciar Meter.vbs, which runs pythonw -m claude_code_meter.main bar.)
How the bar version works
Windows 11 repaints the taskbar on top of windows inserted with SetParent, so
bar.py uses a topmost window placed by screen coordinates just left of the
clock (TrayNotifyWnd) and re-raised every 0.7 s. Same idea as
TrafficMonitor / XMeters.
License
MIT — see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_code_meter-0.1.0.tar.gz.
File metadata
- Download URL: claude_code_meter-0.1.0.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2574fe54df4f8cd8302e88ae7afdea2332fe6baa456b641fc75116ce3b0953e
|
|
| MD5 |
ecdc43544d70a53264a0ac65ab9e8a18
|
|
| BLAKE2b-256 |
190748369bbe8a045bb79d50122cce9668e3366ab7843ef0dacb054e90aae9cc
|
Provenance
The following attestation bundles were made for claude_code_meter-0.1.0.tar.gz:
Publisher:
publish.yml on marcmayol/claude-code-meter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_code_meter-0.1.0.tar.gz -
Subject digest:
e2574fe54df4f8cd8302e88ae7afdea2332fe6baa456b641fc75116ce3b0953e - Sigstore transparency entry: 2116113857
- Sigstore integration time:
-
Permalink:
marcmayol/claude-code-meter@746c2f50efd20687accc3377a44546dd25e51b2a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/marcmayol
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@746c2f50efd20687accc3377a44546dd25e51b2a -
Trigger Event:
release
-
Statement type:
File details
Details for the file claude_code_meter-0.1.0-py3-none-any.whl.
File metadata
- Download URL: claude_code_meter-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30be8f81c190467404638f5a4afb8dbcc796b5ae2d07cbf829ca289d939c0261
|
|
| MD5 |
643334ce9ffadeac41c807d5845e6908
|
|
| BLAKE2b-256 |
782c5f2af0ea7de9ab1d1207d7fa77c3b5641d9bd6ba5f6479facbe1a0686a2d
|
Provenance
The following attestation bundles were made for claude_code_meter-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on marcmayol/claude-code-meter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_code_meter-0.1.0-py3-none-any.whl -
Subject digest:
30be8f81c190467404638f5a4afb8dbcc796b5ae2d07cbf829ca289d939c0261 - Sigstore transparency entry: 2116113911
- Sigstore integration time:
-
Permalink:
marcmayol/claude-code-meter@746c2f50efd20687accc3377a44546dd25e51b2a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/marcmayol
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@746c2f50efd20687accc3377a44546dd25e51b2a -
Trigger Event:
release
-
Statement type: