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

terminal-agents-usage

v0.2.1

Published

Unified usage dashboard for terminal AI coding agents (Claude Code, Codex, OpenClaw, etc.)

Readme

terminal-agents-usage

Unified usage tracker for terminal AI coding agents — scan local agent logs, store usage data in SQLite, and view dashboards with token counts and cost estimates.

Supported agents: Claude Code, OpenAI Codex, OpenClaw, DeepCode, Cursor, Gemini.

Install

npm install -g terminal-agents-usage

Or run directly:

npx terminal-agents-usage scan

Tip: After global install, you can use either terminal-agents-usage or the shorter alias usage. Both are equivalent. Examples below use usage for brevity.

Quick Start

The fastest way to get started — just launch the interactive terminal dashboard. It auto-scans your agent logs on first run:

npx terminal-agents-usage tui

Press s to re-scan anytime, r to refresh, / to switch tabs, q to quit.

Commands

scan

Scan local agent log files and populate the database.

usage scan              # scan all agents
usage scan --agent claude  # scan a specific agent
usage scan --rebuild     # clear and re-scan from scratch

Data is stored in ~/.config/terminal-agents/usage.db by default. Override with --db-path.

today

Show today's token usage summary (terminal UI).

usage today
usage today --agent claude

week

Show the last 7 days of usage, grouped by day and agent.

usage week

stats

Show all-time statistics — total sessions, total tokens, first/last usage per agent.

usage stats

dashboard

Start a web dashboard with interactive Chart.js charts.

usage dashboard
usage dashboard --port 3000

Open http://localhost:8080 to view daily charts, top projects, agent breakdowns, and cost estimates.

tui

Start the interactive terminal dashboard (built with Ink/React). Auto-scans on first run if no data exists. Press s to manually re-scan.

usage tui

How it works

  1. Each agent keeps local log files (JSONL, JSON) of conversations with token usage metadata.
  2. scan reads those files via agent-specific adapters and writes structured records into a local SQLite database.
  3. tui auto-scans on first run, so you can jump straight in with npx terminal-agents-usage tui.
  4. today / week / stats / dashboard / tui query the database and present the data.

Pricing

Cost estimates are calculated from published API pricing (Anthropic, OpenAI, Google). Pricing data is embedded in the tool and sent to the frontend for the web dashboard.

License

MIT