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

graphtrack

v0.1.2

Published

Visualize Claude Code token usage as an interactive graph. Local-first, open source, your logs never leave your machine.

Readme

Graphtrack

npm version license

Interactive token-usage dashboard for Claude Code.

Run npx graphtrack, open localhost:9090, and see exactly where your tokens go — as a graph, a table, or a multi-session overview.

Your logs never leave your machine.

Installation · Quick Start · Features · CLI Options · Development · License


Installation

# No install needed — runs directly from npm
npx graphtrack

# Or install globally
npm install -g graphtrack
graphtrack

Requires Node.js 18+.

Quick Start

npx graphtrack
# → Server starts at http://localhost:9090
# → Picks up sessions from ~/.claude/projects automatically
# → Pick a session from the dropdown and explore

Point at a custom log directory:

npx graphtrack --dir /path/to/.claude/projects

Use a different port:

npx graphtrack --port 3000

Features

Four views, one dashboard

| View | What it shows | | ----------------------- | ------------------------------------------------------------------------------------------- | | Overview | Aggregate stats across all sessions — total tokens, per-project breakdown, tool usage share | | Aggregate Graph | Hub-and-spoke network: each tool is a node, size = token share, color = tool type | | Chronological Graph | Turn-by-turn chain: each prompt links to the tools it triggered, ordered in time | | Table | Sortable per-tool and per-turn tables with color-coded token bars |

Session picker

A searchable dropdown groups sessions by project — type to filter by ID or project name, then click to load.

What gets tracked

  • Input / output / cache tokens per session, per turn, and per tool call
  • Real timestamps — session start time and wall-clock duration from the actual logs
  • Tool breakdown — which tools consume the most tokens, how many times each was called
  • Project grouping — sessions organized by project in the Overview view

Tool color legend

| Tool | Color | | ----- | ------------------------------------------- | | Edit | ● Red | | Bash | ● Yellow | | Read | ● Blue | | Write | ● Green | | Glob | ● Purple | | Grep | ● Pink | | Agent | ● Orange |

Project Structure

src/
  types.ts        Data model (Session, Turn, ToolCall, Usage, Overview)
  parser.ts       JSONL → Session + aggregateSessions()
  graph.ts        Session → vis.js nodes/edges (aggregate + chronological)
  server.ts       Express API + static file serving
  cli.ts          CLI entry point (--dir, --port, --help)

public/
  index.html      Dashboard UI (4 views, vanilla JS)
  images/         Icon and assets

test/
  parser.test.ts  Unit tests for parser, aggregation, and graph builders
  fixtures/       Sample session data for tests

License

MIT