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
Option A — Download the .exe (no Python needed)
Download the latest
claude-code-meter.exe
from the Releases page
and double-click it. It shows up in the taskbar right away. To launch a different
style, run it from a terminal: claude-code-meter.exe tray (or panel).
Option B — pip (needs Python 3.9+)
pip install claude-code-meter
Adds the claude-code-meter command and pulls in the dependencies (Pillow,
pystray). Config and the generated logo live in %APPDATA%\ClaudeCodeMeter.
Or from source: git clone … && cd claude-code-meter && pip install -e .
Usage
Pick one style. With the .exe, just double-click it (that's the bar
style) or run claude-code-meter.exe tray|panel. If you installed with pip:
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):
- Downloaded
.exe: point the shortcut straight toclaude-code-meter.exe. - pip install: point it to the installed command with
baras argument:Target: …\Scripts\claude-code-meter.exe Arguments: bar
Both run 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.1.tar.gz.
File metadata
- Download URL: claude_code_meter-0.1.1.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aab72322c12ab8ba73024536781a700a4a65564a40c1559329291d92fe11e32b
|
|
| MD5 |
a19068c0253468dedc9c4b95e2ad391f
|
|
| BLAKE2b-256 |
aacbd7c6786243ea66b885785cab62a25253880270c43ab5e85123c637b97c47
|
Provenance
The following attestation bundles were made for claude_code_meter-0.1.1.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.1.tar.gz -
Subject digest:
aab72322c12ab8ba73024536781a700a4a65564a40c1559329291d92fe11e32b - Sigstore transparency entry: 2128011810
- Sigstore integration time:
-
Permalink:
marcmayol/claude-code-meter@6eb0187d92bdf787a2d42dfc40aedcb65ae33801 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/marcmayol
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6eb0187d92bdf787a2d42dfc40aedcb65ae33801 -
Trigger Event:
release
-
Statement type:
File details
Details for the file claude_code_meter-0.1.1-py3-none-any.whl.
File metadata
- Download URL: claude_code_meter-0.1.1-py3-none-any.whl
- Upload date:
- Size: 17.8 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 |
ef8a16d986229e098725b18ae304ae59e2e82a7e2c2ee5836b3a072ea1c84a7e
|
|
| MD5 |
64c2b7f8f3d4a80d92bfba6aee210619
|
|
| BLAKE2b-256 |
52c5766d8adb1b8388015957bddf320d78134bdf311fb5df59d61bbba808182a
|
Provenance
The following attestation bundles were made for claude_code_meter-0.1.1-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.1-py3-none-any.whl -
Subject digest:
ef8a16d986229e098725b18ae304ae59e2e82a7e2c2ee5836b3a072ea1c84a7e - Sigstore transparency entry: 2128011919
- Sigstore integration time:
-
Permalink:
marcmayol/claude-code-meter@6eb0187d92bdf787a2d42dfc40aedcb65ae33801 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/marcmayol
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6eb0187d92bdf787a2d42dfc40aedcb65ae33801 -
Trigger Event:
release
-
Statement type: