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

@juliantanx/aiusage

v1.5.3

Published

Track and analyze AI coding assistant usage across Claude Code, Codex, and more

Readme

Track tokens, cost, sessions, models, projects, tool calls, and quota pressure across 20+ AI coding tools in one local dashboard. Local use needs no account, sends no telemetry, and does not require cloud sync.

Highlights

  • One local dashboard for tokens, cost, sessions, models, projects, tool calls, and quotas.
  • Broad parser support for Claude Code, Codex, OpenCode, Cursor, Copilot, Gemini CLI, and more.
  • Optional sync through GitHub, S3, R2, or MinIO.
  • Optional public leaderboard with signed aggregate uploads only.
  • Desktop widget for a tray/menu-bar glance at recent usage.
  • Private by default: local parsing and local dashboards do not upload your prompts, completions, source code, or file paths.

Quick Start

Requirements: Node.js 20+ on macOS, Linux, or Windows.

npm install -g @juliantanx/aiusage
aiusage serve

Open http://localhost:3847 to use the dashboard. serve parses once on startup and then serves the local web UI.

Prefer pnpm:

pnpm add -g @juliantanx/aiusage

Use Docker:

docker run -d \
  -p 3847:3847 \
  -v ~/.aiusage:/root/.aiusage \
  juliantanx/aiusage

Docker persists AIUsage data with the ~/.aiusage mount. To parse AI tool logs from the host, also mount each source log directory and configure the matching AIUSAGE_*_PATH variable. See the Docker docs.

Common Commands

| Command | What it does | |---|---| | aiusage / aiusage summary | Print a terminal summary | | aiusage parse | Parse supported local AI tool logs | | aiusage serve | Start the local dashboard on port 3847 | | aiusage status | Show data source and local database status | | aiusage export --range month | Export usage data | | aiusage init | Configure optional sync | | aiusage sync | Sync with the configured backend | | aiusage widget | Launch the desktop tray widget | | aiusage leaderboard | View public leaderboard rankings | | aiusage login / aiusage upload | Authorize this device and upload aggregate leaderboard data | | aiusage pm2-start | Run dashboard and widget as PM2 background services |

Full CLI reference: aiusage.jtanx.com/docs#cli-reference.

Supported Tools

| | | | | | |---|---|---|---|---| | Claude Code | Codex | OpenCode | Cursor | Hermes | | Qoder | OpenClaw | KiloCode | Kelivo | Copilot | | Gemini CLI | Kimi Code | CodeBuddy | Kiro | Grok Build | | Antigravity | Roo Code | Zed | Goose | oh-my-pi | | pi | Craft | Droid | | |

Default paths and environment variable overrides are documented in Data Sources and Source Env Vars.

Dashboard Password

The local dashboard is open on localhost by default. Set AIUSAGE_DASHBOARD_PASSWORD to protect dashboard APIs.

| Shell | Command | |---|---| | macOS / Linux | AIUSAGE_DASHBOARD_PASSWORD="change-me" aiusage serve | | Windows PowerShell | $env:AIUSAGE_DASHBOARD_PASSWORD="change-me"; aiusage serve | | Windows CMD | set AIUSAGE_DASHBOARD_PASSWORD=change-me && aiusage serve |

For PM2 background services, pass the same variable when starting aiusage pm2-start, and use pm2 restart aiusage-server --update-env after changing it. Details: Dashboard Password and PM2.

Privacy and Data

AIUsage is designed to be local-first.

  • Local parsing reads tool logs and stores parsed usage in ~/.aiusage/cache.db.
  • Local dashboard mode does not require an account and does not send telemetry.
  • Optional sync is user-configured and can use GitHub, S3, R2, or MinIO.
  • Optional leaderboard uploads contain aggregate token totals for ranking periods. They do not include prompts, completions, source code, file paths, or local cost estimates.
  • Cost is an estimate based on pricing metadata and can change when pricing is refreshed or recalculated.
  • Historical totals depend on whether each AI tool still retains its source logs or local databases.

Security issues should be reported privately when possible. See SECURITY.md.

Sync and Leaderboard

Sync and leaderboard are independent optional features.

  • Sync keeps your own devices aligned through GitHub, S3, R2, or MinIO. Configure it with aiusage init, then run aiusage sync.
  • Leaderboard is public ranking for users who explicitly upload aggregate totals. Authorize a device with aiusage login, then run aiusage upload.
  • Anonymous mode is available in site settings for leaderboard participation.

The official site handles accounts, OAuth login, profile settings, authorized devices, upload review status, and admin moderation. The CLI handles local parsing, local dashboards, sync, terminal summaries, and signed uploads.

Desktop Widget

Install the optional tray/menu-bar widget:

npm install -g @juliantanx/aiusage-widget
aiusage-widget

The widget reads the same local AIUsage database and can open the full dashboard from its tray menu. See Widget docs.

Development

git clone https://github.com/juliantanx/aiusage.git
cd aiusage
pnpm install
pnpm build
pnpm test
pnpm dev

Project layout:

| Path | Purpose | |---|---| | packages/core | Shared types, schema, pricing, and utilities | | packages/cli | Published CLI, parsers, local API server, sync, PM2 helpers | | packages/web | Local dashboard UI bundled into the CLI | | packages/widget | Electron tray/menu-bar widget | | packages/site | Official website, docs, accounts, uploads, leaderboard |

Contributions are welcome. Read CONTRIBUTING.md, use the issue templates, and run pnpm test before opening a PR.

Documentation

Community

linux.do - thanks to the linux.do community for support and inspiration during the development of this project.

License

MIT