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

@jnst/cursor-usage

v0.7.0

Published

Visualize Cursor usage-events CSV: terminal stats and a drag-and-drop local dashboard

Readme

cursor-usage

Visualize the usage events CSV exported from the Cursor dashboard.

  • Terminal: summary and bar charts right in your terminal
  • Dashboard: a local web dashboard — just drag & drop your CSV

Dashboard

Runs on Node.js 20+ (npx) or Bun (bunx).

Usage

Dashboard (default)

npx @jnst/cursor-usage   # or: bunx @jnst/cursor-usage

Starts a local server and opens your browser. Drag & drop a CSV exported from Cursor onto the page. All data is processed in the browser and never sent anywhere.

Click any bar in the Daily Window cost chart to drill into that window (hourly breakdown, per-model / per-user / per-kind costs, and every event in the window). Click a user bar to filter the current analysis to that User; the selected User remains visible while other users are dimmed, and clicking the selected user again clears the filter. The selected Daily Window, user, and analysis time zone are reflected in the URL hash (#daily-window=YYYY-MM-DD&user=jnst%40example.jp&timezone=Asia%2FTokyo), so the browser back button and shareable links work after loading the same CSV.

The default port is 4321; if it is already in use, a free port is picked automatically. When --port is specified explicitly, that port is used as-is.

npx @jnst/cursor-usage serve --port 8080 --no-open

Terminal stats

npx @jnst/cursor-usage stats team-usage-events.csv
Cursor Usage  2026-06-01 – 2026-06-10  (610 events, 10 daily windows)

  Total Cost    $1446.69      Total Tokens  1.1B
  Avg/Active    $144.67       Max Mode      96%
  Users         4             Models        8

Daily Window Cost
  2026-06-01  $147.44  ████████████████▊            10% 102.9M tok, 68 ev
  2026-06-02  $246.57  ████████████████████████████ 17% 180.0M tok, 79 ev
  ...

By Model
  gpt-5.5-medium                 $954.95  ████████████████████████████ 66% 804.2M tok, 472 ev
  claude-opus-4-8-thinking-high  $357.92  ██████████▌                  25% 135.5M tok, 69 ev
  ...

Options:

| Option | Description | | ---------------------------------- | -------------------------------------------------------------- | | --by <daily-window\|user\|model> | Show a single breakdown axis | | --daily-window <YYYY-MM-DD> | Drill into a single Daily Window | | --start-hour <0-23> | Daily Window start hour (default: 0) | | --user <identifier> | Filter analysis to a single User | | --timezone <iana-tz> | Group Daily Windows and hours in a specific analysis time zone | | --json | Output aggregated stats as JSON (pipe to jq etc.) | | --include-no-charge | Include "Errored, No Charge" events |

# Extract key numbers
npx @jnst/cursor-usage stats usage.csv --json | jq .summary.totalCost

# Drill into a Daily Window
npx @jnst/cursor-usage stats usage.csv --daily-window 2026-06-02 --timezone Asia/Tokyo

# Filter to a single user
npx @jnst/cursor-usage stats usage.csv --user [email protected]

Or install globally to use the short cursor-usage command:

npm install -g @jnst/cursor-usage   # or: bun add -g @jnst/cursor-usage
cursor-usage stats usage.csv

Screenshots

npx @jnst/cursor-usage screenshot team-usage-events.csv

Captures the dashboard as a PNG next to the CSV. The default screenshot is an Overview:

team-usage-events.csv -> team-usage-events.png

Use --daily-window to capture the detail view for one Daily Window:

npx @jnst/cursor-usage screenshot team-usage-events.csv --daily-window 2026-06-14
team-usage-events.csv --daily-window 2026-06-14 -> team-usage-events-2026-06-14-daily.png

Use --start-hour when a Daily Window should start after midnight, and --event-limit to limit the event table in the screenshot:

npx @jnst/cursor-usage screenshot usage.csv --daily-window 2026-06-14 --start-hour 5 --event-limit 20

For a shareable report of the latest work session in the CSV, use daily-report. It captures the latest 5:00-start Daily Window, limits the event table to the top 10 events by cost, and writes daily-report.png in the current directory:

npx @jnst/cursor-usage daily-report usage.csv

Screenshots use a headless browser and require an installed Chrome/Chromium. Set CHROME_PATH if Chrome is not available on the default channel. Screenshots can also be filtered the same way as terminal stats:

npx @jnst/cursor-usage screenshot usage.csv --daily-window 2026-06-14 --user [email protected] --timezone Asia/Tokyo
npx @jnst/cursor-usage screenshot usage.csv --out dashboard.png

Development

Development tooling uses Bun (runtime code itself is Node-compatible).

bun install
bun test              # core logic tests
bun run dev           # dev server with hot reload
bun run build         # bundle CLI and dashboard into dist/
bun dist/cli.js stats usage.csv

# Generate a dummy CSV for screenshots
bun scripts/generate-dummy-csv.ts > dummy-usage.csv

Release

The release command verifies, versions, publishes, pushes commits/tags, and creates a GitHub Release with generated notes:

bun run release

Use --dry-run to print mutating steps without running them:

bun run release --dry-run

The release command is safe to rerun after a partial failure. The script checks the current tag, npm package version, and GitHub Release before each publishing step:

# If npm publish, git push, or GitHub Release creation failed midway,
# fix the problem and run the same command again.
bun run release

Architecture

  • src/core/ — CSV parsing and aggregation (pure TS, shared between terminal and browser)
  • src/cli/ — CLI entry point and terminal rendering
  • src/server/ — static file server built on Bun.serve
  • web/ — React + Recharts dashboard (bundled at build time)

License

MIT