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

agent-usage-stat

v2.2.2

Published

A local usage analytics portal for Claude Code and Codex

Readme

Agent Usage Stat

A private desktop analytics app for understanding how Claude Code, OpenAI Codex, and GitHub Copilot CLI use tokens, time, and API-equivalent cost.

Agent Usage Stat overview

Weekly and monthly session timeline

Weekly and monthly session usage maps

Agent Usage Stat turns local coding-agent transcripts into one searchable usage ledger. Compare providers and models, follow spend and token volume, inspect projects and sessions, and see when work happened. Prompt and response text never enters the ledger.

Supported

  • Windows and macOS
  • Claude Code
  • OpenAI Codex, including Codex sessions used through ChatGPT
  • GitHub Copilot CLI

Agent Usage Stat does not read general ChatGPT or Claude.ai chats. All usage data stays on the local machine or in the folder selected by the user.

Install

Download the current installer from GitHub Releases:

  • Windows installer: Agent-Usage-Stat-Setup.exe
  • Windows portable: Agent Usage Stat-win32-x64-*.zip
  • macOS: Agent-Usage-Stat.dmg

No separate Node.js or npm installation is required.

On first launch, choose where to keep the durable usage ledger and how sessions should be captured. Agent Usage Stat then reconciles existing sessions and opens the dashboard. The recommended local ledger is %LOCALAPPDATA%\Agent Usage Stat\ledger on Windows and ~/Library/Application Support/Agent Usage Stat/ledger on macOS.

To combine usage from multiple computers, choose a folder in Google Drive, OneDrive, Dropbox, or another synchronized drive, then select the corresponding local folder on each computer.

Explore the data

Every view uses the same date window, so cost, token, project, and session totals stay comparable as you move through the app.

Data and privacy

Each completed session becomes one JSON file under <data-root>/logbook.d/. This ledger is the only spend source and can be synchronized across Windows and macOS machines.

The ledger contains usage totals, model names, project names, branches, machine names, and local project paths. It does not contain prompt or response text. Parsing and dashboard caches remain local and disposable.

Costs are API-equivalent list-price estimates. They are not charges added to a ChatGPT, Claude, or Copilot subscription.

Capture and settings

Continuous capture is recommended. It installs best-effort hooks for detected agents so usage can be checkpointed while the application is closed. Opening the application and choosing Sync now also reconciles every discoverable transcript. Codex requires one security confirmation after its hook is first installed: open /hooks in Codex and trust the Agent Usage Stat hook when prompted.

Batch sync installs no Agent Usage Stat hooks. It reconciles discoverable local transcripts whenever the application opens or Sync now is selected, but it cannot recover a session deleted by an agent before the next sync.

Settings reports the last hook attempt and the last successful checkpoint separately. The default capture policy and per-agent overrides can be changed at any time. Changing the ledger folder merges existing history into the selected ledger without replacing newer records, and preserves the original ledger as a backup by default.

Advanced agent locations normally resolve from CLAUDE_CONFIG_DIR, CODEX_HOME, and COPILOT_HOME, then fall back to each provider's standard per-user directory. Explicit overrides only change where Agent Usage Stat scans and manages its hook. They never move or delete provider-owned data.

Application architecture

Claude / Codex / Copilot hooks (continuous policy, best effort)
  -> installed standalone helper
  -> provider-specific transcript parser and pricing
  -> logbook.d/<session-id>.json

Provider transcript discovery (all modes)
  -> launch / refresh reconciliation
  -> logbook.d/<session-id>.json

Agent Usage Stat desktop application
  -> Electron lifecycle and user workflows
  -> HelperRuntime -> stable installed helper
  -> PortalRuntime -> generated snapshot -> aus:// renderer

The production application opens no localhost server. The sandboxed renderer reads packaged assets and generated data through the aus:// application protocol.

Development

Node.js 20 or newer is required for development only.

npm install
npm test
npm run test:desktop
npm start
npm run make
  • npm test runs the core and portal regression suite.
  • npm run test:desktop packages the application and exercises the standalone helper, first-run hook installation, custom protocol, refresh, and renderer.
  • npm start builds and launches the development desktop application.
  • npm run make creates platform installers under dist/forge/make/.

Tagged releases are built for Windows and macOS by .github/workflows/desktop-release.yml. Published releases require signing credentials. Local npm run make artifacts are unsigned development builds; published releases are signed, and macOS releases are notarized.

The npm package does not expose a supported JavaScript library API.

Licensed under MIT.