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

@claii/dashboard

v0.3.0

Published

clai dashboard: single-page app served by the CLI (local mode) and the team server.

Readme

@claii/dashboard

The clai web dashboard — a single-page app (hash routing, no router dependency) that visualizes AI usage and cost across Claude, ChatGPT/Codex, Gemini, Cursor, Copilot and raw API usage. It's served from dist/ by either:

  • clai dashboard (the CLI, local mode) — binds to 127.0.0.1, no auth, same-origin /api.
  • clai-server (the team server, team mode) — bearer-token auth via Authorization: Bearer <token>.

The API contract this app is built against is ../../docs/dashboard-api.md.

Develop

npm run dev -w @claii/dashboard        # vite dev server, proxies /api -> http://127.0.0.1:4321
npm run build -w @claii/dashboard      # -> apps/dashboard/dist
npm run preview -w @claii/dashboard    # serve the production build locally

Mock mode

No backend needed. Open the dev server (or the built dist/index.html) with:

  • ?mock=1 — deterministic generated data (60 days, anthropic/openai/google, a Max 20x subscription, a budget, an idle-seat story) served entirely in the browser from src/mock/.
  • ?mock=1&empty=1 — the same mock, but with zero events, to preview the onboarding empty state.
  • ?mock=1&team=1 — team mode: multiple actors, seats, and the same bearer-token gate the real team server enforces (any non-empty token is accepted).

VITE_MOCK=1 at build time turns on mock mode without the URL flag.

Structure

  • src/api.ts — typed client. Every page calls the same functions regardless of whether they hit /api/* or the in-browser mock (src/mock/engine.ts).
  • src/hash.ts — #/<page>?<query> routing; filters live in the query string.
  • src/types.ts — response shapes mirrored from the API contract.
  • src/colors.ts / src/format.ts — stable entity→color assignment and USD/token/date formatting.
  • src/pages/*.tsx — one file per top-nav page.
  • src/components/*.tsx — shared chart, table and form pieces.
  • src/styles.css — hand-written, CSS-variable-based, light/dark via prefers-color-scheme.