Skip to content

Commit 5e039fa

Browse files
committed
v1.2.3
- Updated README.md
1 parent 6d03532 commit 5e039fa

File tree

3 files changed

+88
-45
lines changed

3 files changed

+88
-45
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "claude-code-usage-monitor"
3-
version = "1.2.2"
3+
version = "1.2.3"
44
edition = "2021"
55
license = "MIT"
66
description = "Windows taskbar widget for monitoring Claude Code usage and rate limits"

README.md

Lines changed: 86 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,116 @@
11
# Claude Code Usage Monitor
22

3-
A lightweight Windows taskbar widget that displays your Claude API rate limit usage in real time.
3+
A lightweight Windows taskbar widget for people already using Claude Code.
4+
5+
It sits in your taskbar and shows how much of your Claude Code usage window you have left, without needing to open the terminal or the Claude site.
46

57
![Windows](https://img.shields.io/badge/platform-Windows-blue)
6-
![Rust](https://img.shields.io/badge/language-Rust-orange)
78
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
89

910
![Screenshot](.github/screenshot.png)
1011

11-
## What it does
12+
## What You Get
1213

13-
Embeds directly into the Windows taskbar and shows two progress bars:
14+
- A **5h** bar for your current 5-hour Claude usage window
15+
- A **7d** bar for your current 7-day window
16+
- A live countdown until each limit resets
17+
- A small native widget that lives directly in the Windows taskbar
18+
- Right-click options for refresh, update frequency, language, startup, and updates
1419

15-
- **5h** — Session usage (5-hour rolling window)
16-
- **7d** — Weekly usage (7-day rolling window)
20+
## Who This Is For
1721

18-
Each bar shows the current utilization percentage and a countdown until the rate limit resets.
22+
This app is for Windows users who already have **Claude Code (CLI or App) installed and signed in**.
1923

20-
## How it works
24+
It works best if you want a simple "how close am I to the limit?" display that is always visible.
2125

22-
1. Reads your Claude OAuth token from `~/.claude/.credentials.json`, or from `~/.claude/.credentials.json` inside an installed WSL distro if the Windows file is missing or expired (automatically refreshes expired tokens via the matching Claude CLI)
23-
2. Queries the dedicated Anthropic OAuth usage endpoint (`/api/oauth/usage`) for utilization data
24-
3. Falls back to the Messages API with rate limit header parsing (`anthropic-ratelimit-unified-*`) if the usage endpoint is unavailable
25-
4. Renders the widget using Win32 GDI, embedded as a child window of the taskbar
26-
5. Polls every 15 minutes by default (adjustable via context menu) and updates countdown timers between polls
26+
## Requirements
2727

28-
The widget automatically detects dark/light mode from Windows system settings. You can drag the left divider to reposition the widget along the taskbar. Settings (position and poll frequency) are persisted to `%APPDATA%\ClaudeCodeUsageMonitor\settings.json`.
28+
- Windows 10 or Windows 11
29+
- Claude Code (CLI or App) installed and authenticated
2930

30-
## Requirements
31+
If you use Claude Code through WSL, that is supported too. The monitor can read your Claude Code credentials from Windows or from your WSL environment.
3132

32-
- Windows 10/11
33-
- [Rust toolchain](https://rustup.rs/) (MSVC target)
34-
- An active Claude Pro/Team subscription with OAuth credentials stored by [Claude Code](https://docs.anthropic.com/en/docs/claude-code)
33+
## Install
3534

36-
If you use Claude Code inside WSL2, keep `claude` installed and authenticated in that distro. The monitor will scan installed WSL distros and use the first accessible non-expired credential set it finds.
35+
For now, download the latest `claude-code-usage-monitor.exe` from the [Releases](../../releases) page and run it.
3736

38-
## Building
37+
WinGet support is on the way and currently waiting on final approval. When that is live, installation will be a one-liner.
3938

40-
```bash
41-
cargo build --release
42-
```
39+
Planned command:
4340

44-
The binary will be at `target/release/claude-code-usage-monitor.exe`.
41+
```powershell
42+
winget install CodeZeno.ClaudeCodeUsageMonitor
43+
```
4544

46-
## Usage
45+
## Use
4746

48-
Run the executable — the widget appears in your taskbar.
47+
Run the app and it will appear in your taskbar.
4948

50-
- **Drag** the left divider to reposition the widget along the taskbar
51-
- **Right-click** for a context menu with **Refresh**, **Update Frequency**, **Settings** (Start with Windows, Reset Position), and **Exit**
52-
- Installations managed by WinGet defer upgrades to `winget upgrade` instead of replacing the executable in place
49+
- Drag the left divider to move it
50+
- Right-click for refresh, update frequency, start with Windows, reset position, language, updates, and exit
5351

54-
## Project structure
52+
Settings are saved to:
5553

54+
```text
55+
%APPDATA%\ClaudeCodeUsageMonitor\settings.json
5656
```
57-
src/
58-
├── main.rs # Entry point
59-
├── models.rs # UsageData / UsageSection types
60-
├── poller.rs # API polling, header parsing, formatting
61-
├── window.rs # Win32 window, rendering, message loop
62-
├── native_interop.rs # Win32 helper functions (taskbar, colors, etc.)
63-
└── theme.rs # Dark/light mode detection via registry
64-
```
6557

66-
## Releases
58+
## Account Support
59+
60+
This app works with the same account types that Claude Code itself supports.
61+
62+
As of **March 19, 2026**, Anthropic's Claude Code setup documentation says:
63+
64+
- **Supported:** Pro, Max, Teams, Enterprise, and Console accounts
65+
- **Not supported:** the free Claude.ai plan
66+
67+
If Anthropic changes Claude Code availability in the future, this app should follow whatever Claude Code supports, as long as the usage data remains exposed through the same authenticated endpoints.
68+
69+
## Privacy And Security
70+
71+
This project is **open source**, so you can inspect exactly what it does.
72+
73+
What the app reads:
74+
75+
- Your local Claude Code OAuth credentials from `~/.claude/.credentials.json`
76+
- If needed, the same credentials file inside an installed WSL distro
77+
78+
What the app sends over the network:
79+
80+
- Requests to Anthropic's Claude endpoints to read your usage and rate-limit information
81+
- Requests to GitHub only if you use the app's update check / self-update feature
82+
83+
What the app stores locally:
84+
85+
- Widget position
86+
- Polling frequency
87+
- Language preference
88+
89+
What it does **not** do:
90+
91+
- It does not send your credentials to any other server
92+
- It does not use a separate backend service
93+
- It does not collect analytics or telemetry
94+
- It does not upload your project files
95+
96+
Notes:
97+
98+
- If your Claude Code token is expired, the app may ask the local Claude CLI to refresh it in the background
99+
- Portable installs can update themselves by downloading the latest release from this repository
100+
101+
## How It Works
102+
103+
The monitor:
104+
105+
1. Finds your Claude Code login credentials
106+
2. Reads your current usage from Anthropic
107+
3. Shows the result directly in the Windows taskbar
108+
4. Refreshes periodically in the background
109+
110+
If the newer usage endpoint is unavailable, it can fall back to reading the rate-limit headers returned by Claude's Messages API.
67111

68-
Pre-built Windows executables are available on the [Releases](../../releases) page. Download `claude-code-usage-monitor.exe` and run it directly — no Rust toolchain required.
112+
## Open Source
69113

70-
After the GitHub Release is published, the release workflow also attempts to submit a WinGet manifest update for `CodeZeno.ClaudeCodeUsageMonitor`.
114+
This project is licensed under MIT.
71115

72-
- Configure a classic PAT as the `WINGETCREATE_GITHUB_TOKEN` repository secret with `public_repo` scope so `wingetcreate` can submit to `microsoft/winget-pkgs`
73-
- The first WinGet submission still needs to be created manually; after the package exists, later tagged releases can update it automatically
116+
If you want to inspect the behavior or audit the code, everything is in this repository.

0 commit comments

Comments
 (0)