Skip to content

Claude Usage

A local dashboard for tracking your Claude Code token usage, costs, and session history. Pro and Max subscribers get a progress bar. This gives you the full picture.

Install

$brew install phuryn/claude-usage/claude-usage

Install command taken from the project's README or registry entry. Always review code before running it.

Claude Code Usage Dashboard

Pro and Max subscribers get a progress bar. This gives you the full picture.

Claude Code writes detailed usage logs locally — token counts, models, sessions, projects — regardless of your plan. This dashboard reads those logs and turns them into charts and cost estimates. Works on API, Pro, and Max plans.

Available as a web app (python cli.py dashboard) and as a VS Code extension.

Created by: The Product Compass Newsletter


What this tracks

Works on API, Pro, and Max plans — Claude Code writes local usage logs regardless of subscription type. This tool reads those logs and gives you visibility that Anthropic's UI doesn't provide.

Captures usage from:

  • Claude Code CLI (claude command in terminal)
  • VS Code extension (Claude Code sidebar)
  • Dispatched Code sessions (sessions routed through Claude Code)

Not captured:

  • Cowork sessions — these run server-side and do not write local JSONL transcripts

Requirements

  • Python 3.8+
  • No third-party packages — uses only the standard library (sqlite3, http.server, json, pathlib)

Anyone running Claude Code already has Python installed.

Quick Start

No pip install, no virtual environment, no build step.

macOS / Linux (Homebrew)

brew tap phuryn/claude-usage https://github.com/phuryn/claude-usage
brew install phuryn/claude-usage/claude-usage
claude-usage dashboard

Homebrew has disabled installing a formula from an arbitrary raw URL, so tap the repo first (thanks @adrianlungu for the working incantation in #46).

After install, the claude-usage command is on your PATH and accepts the same subcommands as python cli.py (scan, today, stats, dashboard).

Any OS (uv tool / pipx)

uv tool install git+https://github.com/phuryn/claude-usage
claude-usage dashboard

Installs the claude-usage command without a clone (works with pipx too: pipx install git+https://github.com/phuryn/claude-usage). The tool stays dependency-free — this only adds packaging metadata, no third-party runtime deps (#144).

macOS / Linux (clone)

git clone https://github.com/phuryn/claude-usage
cd claude-usage
python3 cli.py dashboard

Windows

git clone https://github.com/phuryn/claude-usage
cd claude-usage
python cli.py dashboard

Docker

git clone https://github.com/phuryn/claude-usage
cd claude-usage
bash scripts/run-docker.sh

Opens the dashboard at http://localhost:9898.

The script builds the image, then runs the container with:

  • ~/.claude mounted read-only — the container can read your transcripts but cannot modify them
  • A named Docker volume (claude-usage-data) for the SQLite database — persisted across restarts, isolated from your home directory

Usage

On macOS/Linux, use python3 instead of python in all commands below. If you installed via Homebrew, replace python cli.py with claude-usage.

# Scan JSONL files and populate the database (~/.claude/usage.db)
python cli.py scan

# Show today's usage summary by model (in terminal)
python cli.py today

# Show the last 7 days (per-day breakdown + by-model totals)
python cli.py week

# Show all-time statistics (in terminal)
python cli.py stats

Similar plugs

Universal SEO skill for Claude Code. 26 sub-skills + 19 sub-agents covering technical SEO, E-E-A-T, schema, GEO/AEO, agent readiness (Lighthouse Agentic Browsing, WebMCP,…

Memori is agent-native memory infrastructure. A LLM-agnostic layer that turns agent execution and conversation into structured, persistent state for production systems. Built…

A股全栈数据工具包:行情K线·当日逐笔·研报·信号·资金面·新闻·财务·公告·打板·ETF期权·舆情·宏观利率·期货大宗(含大商所日K)·事件驱动·可转债 | 15层·87端点·34数据源·除iwencai外免Key | A-share data for AI agents: K-lines, ticks, reports, fund flow,…

All-in-one New-API/Sub2API account hub: balance/usage dashboard, auto check-in, one-click keys, price comparison, health checks, plus advanced channel management | 一站式…

Explore related