Skip to main content

Real-time token usage monitor for Claude Code

Project description

Claude Code Dashboard

Real-time local usage monitoring for Claude Code and Codex, with Claude utilization pulled from Anthropic's own /usage API.

Weekly budget panel Full dashboard Live calls

If you're on Claude Max and also using Codex heavily, this gives you one place to see what you've spent, what is left, and how fast you're burning through each window.

What it does

  • Tracks Claude Code usage from ~/.claude/projects/**/*.jsonl
  • Pulls Claude utilization directly from https://api.anthropic.com/api/oauth/usage
  • Tracks Codex limits from ~/.codex/sessions/**/*.jsonl using token_count events
  • Shows Codex 7-day and 5-hour windows separately from Claude
  • Exposes a browser dashboard and a macOS menubar view
  • Keeps all processing local

Claude stays on its own calculation path. Codex is added as a separate source, with its own cycle and resets.

Main views

Live dashboard

The live dashboard shows:

  • Claude weekly utilization, Sonnet utilization, and 5h window
  • Codex 7d used, 7d left, 5h used, reset times, and plan type
  • A Claude burndown chart
  • A separate Codex chart built from local Codex session logs
  • Live API calls, session costs, and recent activity

Run it with:

claude-dashboard live
claude-dashboard live --no-browser --port 8765

Menubar

On macOS, the menubar app shows explicit text for both systems:

  • Claude: xx%
  • Codex: yy%

And in the dropdown menu:

  • Claude weekly, Sonnet, and 5h
  • Codex 7d and 5h
  • Claude and Codex reset times
  • Pace and recent session cost details

Run it with:

claude-dashboard menubar

Install menubar dependencies with:

pip install "claude-token-dashboard[menubar]"

Installation

pip install claude-token-dashboard

Or with menubar support:

pip install "claude-token-dashboard[menubar]"

Data sources

Claude

Claude Code stores its OAuth token in macOS Keychain under Claude Code-credentials. The dashboard reads it locally and calls:

GET https://api.anthropic.com/api/oauth/usage
Authorization: Bearer <your token>
anthropic-beta: oauth-2025-04-20

That is the same utilization source behind /usage.

Codex

Codex data is read locally from:

~/.codex/sessions/**/*.jsonl

The dashboard parses token_count events and uses:

  • rate_limits.secondary.used_percent for the 7-day window
  • rate_limits.primary.used_percent for the 5-hour window
  • resets_at for both reset times
  • plan_type when present

This avoids assuming Codex follows Claude's cycle.

Commands

claude-dashboard live
claude-dashboard menubar
claude-dashboard analyze
claude-dashboard burndown
claude-dashboard report

Requirements

  • Python 3.9+
  • macOS for Claude OAuth lookup through Keychain
  • Claude Code installed for Claude usage data
  • Codex local sessions available if you want Codex tracking

The browser dashboard works without extra dependencies. The menubar needs rumps and Pillow.

Privacy

  • All log parsing is local
  • Claude project logs are read-only
  • Codex session logs are read-only
  • The only outbound API call is the Claude usage call to Anthropic using your own local OAuth token

Billing cycle notes

Claude resets weekly according to Anthropic's Max billing cycle.

Codex is displayed from its own local rate-limit windows and reset timestamps. It is intentionally not forced into Claude's cycle.

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

claude_token_dashboard-0.2.1.tar.gz (48.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_token_dashboard-0.2.1-py3-none-any.whl (52.8 kB view details)

Uploaded Python 3

File details

Details for the file claude_token_dashboard-0.2.1.tar.gz.

File metadata

  • Download URL: claude_token_dashboard-0.2.1.tar.gz
  • Upload date:
  • Size: 48.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for claude_token_dashboard-0.2.1.tar.gz
Algorithm Hash digest
SHA256 b3dc52d11a56b6c74745743166cdaa3c5d5b0cd737f52a54504dd057bb077fd0
MD5 e511a03e547bf5201be662b50c9be7c3
BLAKE2b-256 0d229213ea9b045e632324ea45fb5fcb891e44772615623bb47a0dbf025d018d

See more details on using hashes here.

Provenance

The following attestation bundles were made for claude_token_dashboard-0.2.1.tar.gz:

Publisher: publish.yml on xaviguardia/claudedashboard

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file claude_token_dashboard-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for claude_token_dashboard-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ced323a9f109ee1576b88c6fdd604f218eee52ccd67424ff88542af46ce965c1
MD5 c7d1c42c23176d4530819da89bea992a
BLAKE2b-256 17c0e4bcf657dc28602151a9cdcc5ef378628146995f30fed6e867ae096feb0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for claude_token_dashboard-0.2.1-py3-none-any.whl:

Publisher: publish.yml on xaviguardia/claudedashboard

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page