Skip to content

About

Windows taskbar widget for your Claude usage limits, with a forecast of when they run out

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Claude Usage Widget

A small Windows app that shows how much of your Claude usage limits you have used and when you are likely to run out. It lives on the taskbar and in the notification area; a click opens the details.

It was made for plans without a 5-hour limit (such as Claude Ultra), where the weekly limit is the one that matters. On plans that also have a 5-hour limit it shows and forecasts both, with the same detail.

Details window, dark theme Details window, light theme

  • Weekly limit for all models, with the part of the week already gone, per-model limits and this week's split by product (Claude Code, chats, Cowork). The numbers are the same as /usage in Claude Code.

  • 5-hour limit, on plans that have one: time to reset, the part of the window gone, a forecast and your current pace.

  • When it runs out. The forecast is learned from your own Claude Code history instead of drawing a straight line (see below).

  • Taskbar strip next to the notification area, or in place of the weather, and a tray icon with the current percentage. Both show a red "!" when something goes wrong. With a 5-hour limit the strip shows both limits:

    Taskbar strip with the 5-hour and weekly limit

  • Light and dark theme, English and Czech.

Unofficial; not affiliated with or endorsed by Anthropic.

Requirements

  • Windows 10 or 11. The taskbar strip needs Windows 11; on Windows 10 you get the tray icon and the window.
  • Claude Code on the same PC, signed in with a Claude account. The widget uses its login and its local history.

Install

  1. Download ClaudeUsageWidget.exe from the latest release.
  2. Put it somewhere permanent, for example %LOCALAPPDATA%\Programs\ClaudeUsageWidget, and run it.
  3. To have it start when you sign in, right-click the tray icon and tick Start with Windows.

Nothing else needs to be installed: the app runs on .NET Framework 4.8, which is part of Windows. The exe is not code-signed, so SmartScreen may warn about an unknown publisher the first time (More info, Run anyway).

To remove it, untick Start with Windows, quit the app and delete the exe and %APPDATA%\ClaudeUsageWidget.

What it reads and sends

  • Usage numbers come from https://api.anthropic.com/api/oauth/usage, the endpoint Claude Code itself uses for /usage, with the Claude Code login from ~/.claude/.credentials.json. When the access token has expired, the widget refreshes it the same way Claude Code does and writes the new token back to that file (the previous file is kept as .credentials.json.widget-bak). The endpoint is not a documented public API and may change at any time.
  • Your history: ~/.claude/projects/**/*.jsonl is read, never written, to learn when and how much you work. Only token counts, model names and timestamps are used, not the content of your conversations.
  • Nothing else is sent anywhere. Settings, the widget's own readings and the activity summary are kept in %APPDATA%\ClaudeUsageWidget.

If you moved the Claude Code folder with CLAUDE_CONFIG_DIR, the widget follows it.

How the forecast works

Activity is measured as cost-weighted tokens (output counts more than input, cache reads much less, Haiku and Sonnet less than Opus) in 15-minute steps. From your complete past weeks the widget learns:

  • which hours of the week you usually work, and how much,
  • your typical weekly total, with recent weeks weighted more so that it follows the trend,
  • how this week compares so far: quiet weeks tend to stay quiet, busy weeks partly calm down,
  • your current session: the last hour's pace carries on for a while and fades out.

The widget's own readings of the usage API turn "how much you will work" into "how much of the limit that is". The range next to the weekly estimate (for example 62-86 %) is how far off the model was on your own past weeks.

The 5-hour limit uses the same model for the rest of its window. Because 5-hour windows are short and bursty, the widget also shows when the limit would run out if the last hour's pace simply carried on, and warns when either of the two runs out before the reset.

Until there is a complete week of history and a few percent of the limit used, a straight line is used instead.

You can check how well it does on your own data:

ClaudeUsageWidget.exe --backtest report.txt

On the author's 21 weeks of history the weekly forecast was off by 27 % of the week's total on average, a straight line by 51 %. The 5-hour forecast was checked with synthetic limits, since past 5-hour limits are not recorded: every 30 minutes before a window ran out, the warning was already showing about 70 % of the time, and in windows that did not run out it gave a false alarm 10-16 % of the time.

Command line

Option
--demo [out|lasts|calibrating|session|error] sample data; nothing is read from the API or saved
--snapshot file.png render the window to a PNG and exit
--theme light|dark, --lang en|cs override the saved setting for this run
--backtest report.txt check the forecasts against your own history

Building

On Windows with the .NET SDK 8 or newer:

dotnet build src/ClaudeUsageWidget -c Release

The result is src/ClaudeUsageWidget/bin/Release/net48/ClaudeUsageWidget.exe.

Contributing

Bug reports and pull requests are welcome. Changes are accepted only as pull requests to this repository.

License

Source available, not open source. You can use the widget for free and share it by linking here or by passing on unmodified releases. Forks are only for preparing pull requests to this repository, and modified versions may not be published. See LICENSE for the exact terms.

About

Windows taskbar widget for your Claude usage limits, with a forecast of when they run out

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages