Skip to content

bemaru/trafficmonitor-ai-usage-plugin

Repository files navigation

TrafficMonitor AI Usage Limits

Platform TrafficMonitor Arch Usage Sources GitHub Sponsors

Languages: English | 한국어 | 简体中文

Taskbar usage limits for Claude and Codex through TrafficMonitor on Windows. Release packages include ClaudeUsagePlugin.dll plus the bundled helper files. Inside TrafficMonitor, the plugin appears as AI Usage Limits.

TrafficMonitor taskbar showing Claude and Codex usage bars

I built this because Windows did not have a convenient widget for this kind of AI usage-limit status. Claude usage can already be checked from places like Claude Code statusline, Claude Desktop, or Claude's VS Code extension, but those surfaces depend on the current workflow. The Windows taskbar stays visible across editors, terminals, and browsers, so TrafficMonitor's taskbar plugin surface was a good fit.

The plugin puts Claude and Codex usage limits in that fixed taskbar location, instead of requiring separate usage pages to stay open.

Highlights

  • Shows C5h, C7d, X5h, and X7d as used percentages directly in the Windows taskbar
  • Displays reset timing in the tooltip when the source exposes it
  • Uses a bundled Claude web helper for Claude values
  • Reads Codex values from local session JSONL files with CODEX_HOME support
  • Does not keep stale Claude values forever; stale Claude data becomes unavailable

Quick Start

  1. Install TrafficMonitor first:
    • Download an official release from TrafficMonitor Releases
    • Extract it anywhere you want, then run TrafficMonitor.exe
    • If you do not need temperature monitoring, the Lite package is usually enough
  2. Download the plugin zip that matches the installed TrafficMonitor build from the latest release:
    • TrafficMonitorAIUsageLimits_v0.3.11_x64.zip for x64 TrafficMonitor
    • TrafficMonitorAIUsageLimits_v0.3.11_x86.zip for x86 TrafficMonitor
  3. Extract the zip into the TrafficMonitor folder, the folder that contains TrafficMonitor.exe. After extraction, the layout should look like this:
TrafficMonitor
├─ TrafficMonitor.exe
└─ plugins
   ├─ ClaudeUsagePlugin.dll
   └─ ClaudeUsagePlugin
      ├─ claude-web-helper.ps1
      └─ helper
         └─ claude-web-helper
            ├─ index.mjs
            ├─ package.json
            └─ package-lock.json
  1. Restart TrafficMonitor.
  2. Open TrafficMonitor's taskbar window and enable Claude 5h, Claude 7d, Codex 5h, and Codex 7d.
  3. Run the one-time Claude login if you want live Claude values:
powershell -ExecutionPolicy Bypass -File .\plugins\ClaudeUsagePlugin\claude-web-helper.ps1 login
  1. If Codex state is not stored in %USERPROFILE%\.codex, set CODEX_HOME in the Windows environment before launching TrafficMonitor. Codex stays unavailable until a session JSONL file under that directory contains rate-limit payloads.

If the helper files stay under plugins\ClaudeUsagePlugin, the bundled Claude watcher can auto-start on plugin load after that first login.

For the full screenshot walkthrough, see docs/install.md.

What It Shows

  • C = Claude, X = Codex
  • 5h = current 5-hour limit window
  • 7d = current 7-day limit window
  • C5h, C7d, X5h, and X7d show used percentage
  • Tooltips show the same used percentage plus reset timing when reset metadata is available
  • If Codex local data reports remaining percentage, the plugin converts it before display

TrafficMonitor tooltip showing Claude and Codex usage limits with reset times

Data Sources

  • Claude reads a fresh helper snapshot from %LOCALAPPDATA%\trafficmonitor-claude-usage-plugin\claude-web-usage.json
  • Claude helper login stores cookies in a dedicated local browser profile; see PRIVACY.md
  • Codex reads local state from %USERPROFILE%\.codex\sessions\**\*.jsonl
  • Codex session JSONL files are the only supported local source; there is no logs_2.sqlite fallback
  • If no session JSONL file contains rate-limit payloads yet, Codex shows unavailable
  • Codex local payloads can expose either used_percent or remaining_percent; remaining values are converted to used percentage before display
  • CODEX_HOME overrides the default Codex path when it resolves to a Windows-readable location
  • TrafficMonitor runs on Windows, so Linux-only paths such as /home/<user>/.codex are not readable
  • Claude helper usage requires Node.js 22+ plus a local Edge or Chrome install

For the full runtime model and helper commands, see docs/runtime.md.

Compatibility

  • Windows only
  • TrafficMonitor plugin API v7
  • TrafficMonitor itself is not bundled by this repo
  • Official release assets are currently provided for x64 and x86
  • Internal deployment names stay ClaudeUsagePlugin.dll and ClaudeUsagePlugin\... for TrafficMonitor compatibility

If you do not need TrafficMonitor's temperature monitoring features, the official Lite release is usually enough.

Build From Source

Requirements:

  • Windows
  • Visual Studio 2022 or Build Tools 2022
  • Desktop development with C++
  • MSVC v143 toolset
  • MFC for the v143 toolset
  • Windows SDK selected by Visual Studio

Build with Visual Studio or run:

MSBuild.exe .\ClaudeUsagePlugin.sln /t:ClaudeUsagePlugin /p:Configuration=Release /p:Platform=x64

Primary build outputs:

  • build\x64\Release\plugins\ClaudeUsagePlugin.dll
  • build\Release\plugins\ClaudeUsagePlugin.dll

For the full output layout and packaging notes, see docs/build.md.

Docs

Support

If this plugin saves you time, you can support ongoing maintenance here:

Common Issues

About

TrafficMonitor plugin that shows Claude and Codex account usage in the Windows taskbar.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors