npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

claude-usage-dashboard

v1.9.1

Published

Claude Code usage dashboard — token costs, quota cycle tracking, cache efficiency, multi-machine sync across all your devices

Downloads

780

Readme

Dashboard


A subscription is a fixed number. What it buys is not.

One figure carries the rail: API-equivalent value per subscription dollar, at full quota utilization. A $200 plan routinely meters five figures of API-equivalent traffic in a month.

Above it, the windows you are actually rationed by — five-hour and seven-day — read from Anthropic with the OAuth credentials already sitting on your machine. Plan tier is detected, not declared.

Below, the crossing point: the share of the quota window at which the API bill would have overtaken the fee. It is only drawn when the selected range is that window; a 90-day cost and a 7-day utilization are not the same measurement, and the panel would rather say nothing than average them.


Anthropic does not publish token limits, and limits move without announcement.

Quota cycles

Every seven-day window is recorded as it closes — consumption by kind, and the ceiling implied at 100% utilization. Ten cycles retained, pooled across machines.

The Δ column carries the change from the window before. When that number falls and your habits did not, you have the record.


Token consumption

Hourly through monthly. Tokens or dollars. Four bands in every bar, ordered by price: cache read, cache write, input, output.

Cache read is usually most of the mass and a tenth of the cost — the shape of that stack is the shape of your bill. Underneath, the hours you actually work, aggregated across the range.


Sessions

Bar length is session size; the segments are the token mix. Sortable by date, cost, or tokens, filterable by project. Exact counts on hover.


A laptop, a desktop, a work machine. Each one only ever sees itself.

Point them all at a single shared folder — Drive, Dropbox, OneDrive, a NAS, an rsync target — and the logs roll into one view. No server, no account, no API key. A folder you already have.


| | | | :--- | :--- | | Reads | ~/.claude/projects/**/*.jsonl | | Quota | Anthropic API · local OAuth credentials | | Refresh | 5 s log re-read · 30 s dashboard · 30 s sync copy · 120 s quota | | Retained | 10 quota cycles | | Granularity | Hourly · daily · weekly · monthly | | Ranges | Quota window · 7 / 30 / 90 days · custom | | Persists | Range, granularity, plan, refresh — localStorage | | Typefaces | Instrument Serif, IBM Plex Sans, IBM Plex Mono — bundled, not fetched | | Stack | Node · Express · D3. No build step. | | Leaves the machine | The quota read. Nothing else. |

Near-monochrome and warm. A single accent — Claude's terracotta — spent only on the figure that matters and on anything past a threshold. Healthy meters stay neutral: colour is an alarm here, not decoration.

Instrument Serif for figures, IBM Plex Sans for the interface, IBM Plex Mono wherever you might compare one row against another. All three ship inside the package, so first render works offline and no request goes anywhere it was not promised. One page, no routes — the header anchors move you without reloading you.


npx claude-usage-dashboard

Open localhost:3000.

If that port is taken — or silently blocked, which Windows does more often than you would expect — it falls through 8080, then 8765, then whatever the OS hands out, and prints the address it actually got.

git clone https://github.com/ludengz/claude-usage-dashboard.git
cd claude-usage-dashboard
npm install
npm start
PORT=8080 npx claude-usage-dashboard

Set explicitly, it does not fall back. It fails, and tells you why.

Multi-machine sync

Two environment variables per machine, then start normally.

# ~/.bashrc, ~/.zshrc, etc.
export CLAUDE_DASH_SYNC_DIR="$HOME/Google Drive/claude-sync"
export CLAUDE_DASH_MACHINE_NAME="MacBook"   # optional — defaults to hostname

As user environment variables:

[Environment]::SetEnvironmentVariable('CLAUDE_DASH_SYNC_DIR', 'C:\Users\you\Google Drive\claude-sync', 'User')
[Environment]::SetEnvironmentVariable('CLAUDE_DASH_MACHINE_NAME', 'Desktop', 'User')

Or inline, per run:

CLAUDE_DASH_SYNC_DIR="/path/to/shared" CLAUDE_DASH_MACHINE_NAME="MacBook" npx claude-usage-dashboard

Local logs are copied into <sync_dir>/<machine_name>/ on startup and every 30 seconds thereafter. The dashboard then reads every machine folder in that directory. Any machine pointed at the same folder contributes to the aggregate.

Works with anything that syncs a folder: Google Drive, Dropbox, OneDrive, iCloud Drive, Syncthing, a NAS, a plain rsync cronjob.

How it works

The data already exists. Claude Code writes JSONL session logs to ~/.claude/projects/ as it runs; this reads them, prices each record server-side, and aggregates on request. Logs are re-read every five seconds, and only files whose size or mtime changed are parsed again — new usage appears without a restart.

Quota comes from the Anthropic API, authenticated with the OAuth credentials the claude CLI already stored locally. That request is the only thing that leaves your machine.

Tests

npm test

License

ISC. Bundled typefaces are SIL Open Font License 1.1 — see public/fonts/OFL.txt.