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

@ttthree/tokmon

v0.2.6

Published

Token usage monitor for AI coding agents — track costs, review sessions, optimize workflows

Readme

tokmon

npm version npm downloads CI license node

Token usage monitor for AI coding agents — track costs, review sessions, optimize workflows.

Supports Claude Code, Codex, Copilot CLI, Eureka, and Mars orchestrator sessions. Aggregates across machines, breaks down by project / model / agent / machine, and exposes it all in a clean web dashboard.


Quick start

Run without installing:

npx @ttthree/tokmon

Or install globally:

npm install -g @ttthree/tokmon
tokmon

That's it — tokmon scans your local agent directories (~/.claude, ~/.codex, ~/.craft-agent, …), writes its own data under ~/.tokmon/, and opens the dashboard at http://localhost:3000.

Requirements: Node.js >= 20.


Detailed usage

Commands

tokmon              # collect + start dashboard (default)
tokmon config       # show current configuration
tokmon config set <key> <value>
tokmon config add-project <name> <folder>
tokmon config exclude-folder <pattern>
tokmon --help       # full CLI reference

collect, serve, and sync are also available as hidden subcommands for advanced workflows.

Options

| Option | Description | | --- | --- | | --port <port> | Dashboard port (default 3000). If omitted and the port is busy, tokmon auto-falls-back to the next free port (up to 10 tries). Pass --port explicitly to disable fallback. | | --no-open | Don't auto-open the browser. | | --reset | Reprocess all sessions from scratch (drops the cursor and re-parses everything). | | -V, --version | Print the version. | | -h, --help | Show help. |

Data locations

  • Config + machine data: ~/.tokmon/
  • Pricing snapshots: ~/.tokmon/pricing/ (auto-refreshed from LiteLLM)
  • Scanned sources (read-only): ~/.claude, ~/.codex, ~/.craft-agent, ~/.copilot (where present)

Multi-machine sync (optional)

tokmon can sync per-machine data through a private GitHub repo so one dashboard aggregates all your devices:

tokmon config set github.repo <owner>/<repo>    # private repo
tokmon sync --init                              # bootstrap
tokmon sync                                     # incremental

github.repo accepts owner/repo, HTTPS clone URLs, or SSH remotes such as [email protected]:owner/repo.git and git@gh:owner/repo.

Requires git plus working Git credentials, such as a credential helper for HTTPS or an SSH key/config.

The sync branch is treated as a latest-state snapshot, not an audit log: each successful tokmon sync rewrites the branch to a single current snapshot commit and uses --force-with-lease to avoid blind overwrites when another machine pushed first.

Native module note

tokmon depends on better-sqlite3. npm downloads a prebuilt binary for most platform/Node combos. If no prebuilt matches, it compiles from source — you'll need:

  • macOS: Xcode Command Line Tools (xcode-select --install)
  • Linux: build-essential + python3
  • Windows: Visual Studio with the "Desktop development with C++" workload

If npx @ttthree/tokmon seems stuck on first run, it's most likely compiling native bindings — subsequent runs use the cached binary.


License

MIT