A DMS (Dank Material Shell) plugin that monitors your Claude Code subscription usage directly from the taskbar.
- Taskbar pill with circular progress ring showing 5-hour rate limit utilization
- Detailed popout with:
- 5-hour and 7-day rate window utilization with countdown timers
- Token consumption breakdown (today, calendar week, calendar month)
- Estimated API cost per period (today, calendar week, calendar month) with automatic pricing from LiteLLM
- Weekly activity bar chart (Monday–Sunday) with interactive hover tooltips (token count + cost)
- Per-model token usage for the current calendar week with dynamic model family detection
- All-time session and message statistics
- Automatic subscription detection via the Anthropic OAuth API
- Dynamic model pricing — new Anthropic model families are detected automatically, no code changes needed
- Currency support — costs displayed in EUR for French locale, USD otherwise (exchange rate from ECB via Frankfurter)
- Configurable refresh interval (2 to 15 minutes)
- Localization support (English and French)
- DMS Shell
- jq (JSON processor)
- An active Claude Code installation with OAuth credentials
dms plugins install claudeCodeUsage
Or browse the plugin list in DMS Settings (Mod + , > Plugins).
Clone this repository into your DMS plugins directory:
git clone https://github.com/titeya/dms-claudecode \
~/.config/DankMaterialShell/plugins/claudeCodeUsageThen restart DMS.
Open DMS Settings (Mod + , > Plugins > Claude Code Usage) to adjust the refresh interval.
The plugin runs a lightweight bash script at the configured interval that:
- Reads your OAuth token from
~/.claude/.credentials.json - Queries the Anthropic usage API for current rate limit status
- Parses local JSONL session files for token consumption statistics
- Fetches model pricing from LiteLLM and USD/EUR exchange rate from ECB (cached daily in
~/.claude/pricing-cache.json)
API usage responses are cached for 2 minutes (~/.claude/usage-cache.json) to avoid rate limiting, with stale fallback on errors.
All data stays local. Network requests are limited to the official Anthropic API (usage), GitHub (LiteLLM pricing, once/day), and Frankfurter (exchange rate, once/day).
