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

ccusage-web

v0.1.3

Published

Local web dashboard for monitoring Claude Code token usage and costs

Downloads

504

Readme

ccusage-web

Track your Claude Code spending, visualize Anthropic API token usage, and monitor billing windows — all from a local web dashboard. No account needed, no data sent anywhere.

A web UI for ccusage — the Claude Code usage analyzer. See your Claude costs by day, month, session, and 5-hour billing block with interactive charts and per-model breakdowns, instead of re-running terminal commands.

| Daily view | Monthly view | |-----------|--------------| | Daily | Monthly |

| Sessions view | Blocks view | |--------------|-------------| | Sessions | Blocks |

Why a web dashboard instead of the terminal?

The ccusage CLI is great for quick one-off checks. The web dashboard gives you something persistent and visual to keep open alongside your work.

| Feature | ccusage CLI | ccusage-web | |---------|--------------|---------------| | Spend over time | Text table | Interactive area/bar charts | | Model cost breakdown | --breakdown flag | Always-visible bar chart + legend | | Token type split (input / output / cache) | Not shown by default | Donut chart on every view | | Navigate between time ranges | Re-run command each time | Click tabs — Daily · Monthly · Sessions · Blocks | | Keep watching usage | Manual reruns | Auto-refreshes every 2 minutes | | Zero typing once open | Every check needs a new command | One browser tab |

What it shows

  • Daily view — Claude Code spend per day with a trend chart, per-model badges, and a full breakdown table
  • Monthly view — bar chart of month-over-month Claude API spend with top-model callouts
  • Sessions view — per-project session costs sorted by recency
  • Blocks view — 5-hour billing window tracking (the same windows Claude Code uses for rate limiting), with an active-block indicator

Each view includes:

  • Overview stat cards: total cost, total tokens, cache read %, cache write tokens
  • Cost-by-model bar chart with color-coded model labels (Opus, Sonnet, Haiku)
  • Token distribution donut (cache read · cache write · output · input)

Requirements

  • Node.js 18+
  • ccusage installed globally, or npx available (falls back automatically)
  • Claude Code must have run at least once so ~/.claude/projects/ exists with usage data

Quick start

# Run directly without installing (builds on first run, ~30s)
npx ccusage-web

# Or install globally for instant starts
npm install -g ccusage-web
ccusage-web

Your browser opens automatically at http://localhost:4242.

Development

git clone https://github.com/hamzaahmedkhan/ccusage-web
cd ccusage-web
npm install
npm run dev           # hot-reload dev server on localhost:3000
npm run screenshots   # re-capture docs/ screenshots (requires server running)

How it works

The dashboard runs entirely on your machine. A single API route (/api/usage) shells out to ccusage <view> --json and normalises the output for the frontend. No data leaves your machine — it reads the same ~/.claude/projects/*.jsonl files that ccusage uses.

Tech stack

Related

  • ccusage — the CLI this dashboard is built on top of
  • Claude Code — the AI coding tool whose usage this tracks

License

MIT