Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>Claude Code Usage by Paweł HurynNew to Visual Studio Code? Get it now.
Claude Code Usage by Paweł Huryn

Claude Code Usage by Paweł Huryn

Paweł Huryn

|
32 installs
| (1) | Free
Embed your Claude Code usage dashboard (token counts, costs, sessions, projects) directly inside VS Code. Reads local JSONL transcripts, no API calls.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Claude Code Usage — VS Code extension

License: MIT

See your Claude Code usage — tokens, costs, sessions, projects — right inside VS Code.

Daily usage view

The extension reads your local Claude Code JSONL transcripts (the ones Claude Code already writes regardless of plan) and renders the same dashboard the Python tool ships, embedded as a VS Code sidebar. No API calls, no telemetry — all data stays on your machine.

Works on API, Pro, and Max plans. Captures usage from the Claude Code CLI, the official VS Code extension, and dispatched Code sessions.


Install

From the VS Code Marketplace

Search the Extensions sidebar for "Claude Code Usage" (publisher: PawelHuryn), or open the marketplace link from the Open VSX page.

From a .vsix file (local install)

git clone https://github.com/phuryn/claude-usage
cd claude-usage/vscode-extension
./scripts/install.sh        # macOS / Linux / WSL
.\scripts\install.ps1       # Windows PowerShell

The scripts run vsce package then code --install-extension against your local VS Code install.


Requirements

  • Python 3.8 or newer on your PATH. Almost everyone running Claude Code already has Python installed; if not, see python.org/downloads. On Windows make sure to check "Add Python to PATH" during the installer.

That's the only dependency. The Python sources (cli.py, scanner.py, dashboard.py) are bundled inside the extension — no separate clone or Homebrew install needed.


Usage

  1. Click the gauge icon in the activity bar (left sidebar of VS Code).
  2. The extension starts the dashboard server on a free local port and embeds it in a sidebar webview.
  3. Filter by model, range, or project — same UI as the standalone web dashboard.

Hourly + project breakdown

Commands

Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):

Command What it does
Claude Usage: Open Dashboard Reveal the sidebar and start the server (also fires automatically when you click the activity-bar icon)
Claude Usage: Rescan Transcripts Refresh the iframe; the dashboard's own Rescan button triggers a full DB rebuild
Claude Usage: Restart Server Kill and respawn the Python process (use after changing settings)
Claude Usage: Show Logs Open the extension's output channel — useful when something doesn't work

Settings

Setting Default Description
claudeUsage.pythonPath (auto-discover) Path to a Python 3.8+ interpreter. Leave empty to auto-detect (claude-usage on PATH first, then python3, then python).
claudeUsage.cliPath (bundled) Path to a custom cli.py (or its parent directory). Empty = use the bundled copy that ships with the extension.
claudeUsage.port 0 Port for the local dashboard server. 0 = OS picks a free one.

How discovery works

When you click the icon, the extension resolves how to run the dashboard in this order:

  1. claudeUsage.cliPath setting if you've set one
  2. The bundled python/cli.py that ships inside this .vsix (most installs hit this)
  3. The claude-usage shim on PATH (if you installed via Homebrew)
  4. A cli.py in any open VS Code workspace folder (the legacy "open the cloned repo" path)
  5. A sibling cli.py from the extension dir (dev mode, when running from source via F5)

If none of those find anything, you'll get a friendly message in the sidebar — most often "Python 3.8+ is required" with a platform-specific install hint.


Privacy

The extension only:

  • Reads local JSONL transcripts from ~/.claude/projects/ (and the Xcode coding-assistant directory on macOS, if present)
  • Runs a small HTTP server bound to 127.0.0.1 (localhost-only — never 0.0.0.0) on a port the OS picks for you
  • Embeds that server's dashboard in a VS Code webview

No data leaves your machine. No API calls. No telemetry.


Troubleshooting

  • "Python 3.8 or newer required" — install from python.org and reload VS Code (Ctrl+Shift+P → Developer: Reload Window). On Windows make sure "Add Python to PATH" is checked in the installer.
  • Sidebar stays blank or shows "starting…" — run Claude Usage: Show Logs. The extension logs the resolved Python path, the install mode, the spawn command, and any stdout/stderr from the server.
  • Dashboard renders but shows "No usage recorded" — Claude Code hasn't written transcripts to ~/.claude/projects/ yet. Run a Claude Code session first.

Source

The Python tool, this extension, and a Homebrew formula all live at github.com/phuryn/claude-usage. Bug reports and feature discussions: Issues, Discussions.

Made by The Product Compass Newsletter.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft