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

quotatracker

v0.1.2

Published

Real-time quota monitoring for Claude Pro & Max plans — session limits, costs, burn rate, and recommendations

Readme


What is this?

QuotaTracker reads your Claude Code credentials and JSONL logs to give you a single, unified view of your API quota — session limits, weekly limits, per-model breakdowns, cost estimates, and burn rate projections.

It ships as:

| | Platform | Stack | |---|---|---| | CLI | macOS, Linux, Windows (WSL) | Node.js / Bun | | Desktop App | macOS, Linux, Windows | Tauri 2 + React | | Native macOS App | macOS 14+ | SwiftUI |

All UIs consume the same JSON output from the core CLI.

Features

Quota Monitoring

  • 5-hour session window — current utilization %, reset countdown, velocity tracking
  • 7-day weekly window — utilization % with reset time
  • Per-model limits — separate Opus and Sonnet weekly quotas
  • Extra usage tracking — credits used vs monthly limit for Max plans

Cost Intelligence

  • Live cost calculation — per-model pricing from LiteLLM with embedded fallbacks
  • Daily & monthly summaries — token counts + costs aggregated from local JSONL logs
  • Session blocks — 5-hour billing windows with burn rate (tokens/min, $/hr)
  • Limit estimation — reverse-engineers your actual dollar limit from utilization %
  • Projections — estimated end-of-session cost based on current burn rate

Analysis Engine

  • Velocity tracking — utilization change per minute over a rolling window
  • Runway estimation — time remaining until you hit 100% via linear regression
  • Heatmap — hourly peak utilization over 28 days
  • Smart recommendations — suggests when to use Claude Code, switch to Codex, or wait

Security

  • Credential auto-discovery — macOS Keychain > file > environment variable > WSL paths
  • Domain whitelist — HTTP requests locked to api.anthropic.com, console.anthropic.com, platform.claude.com
  • No credential exfil — redirects blocked, tokens never sent to unauthorized domains
  • OAuth auto-refresh — expired tokens refreshed transparently

Cross-Platform

  • macOS — Keychain integration, native SwiftUI menu bar app
  • Linux — file-based credentials, Tauri desktop app
  • Windows — WSL path auto-discovery for Claude Code credentials
  • Desktop — Tauri 2 app with auto-update via GitHub Releases

Install

CLI (core)

# With bun (recommended)
bun install -g quotatracker

# With npm
npm install -g quotatracker

# Or run directly
bunx quotatracker
npx quotatracker

Desktop App (Tauri)

Download the latest release for your platform from GitHub Releases.

Native macOS App (SwiftUI)

Download QuotaTracker-macos-arm64.tar.gz (Apple Silicon) or QuotaTracker-macos-x86_64.tar.gz (Intel) from GitHub Releases.

tar xzf QuotaTracker-macos-arm64.tar.gz
mv QuotaTracker.app /Applications/

Note: On first launch macOS may block the app. Right-click the app → Open to bypass the warning, or run: xattr -cr /Applications/QuotaTracker.app


Usage

CLI

# JSON output (for piping / UIs)
quotatracker

# Human-readable formatted output
quotatracker --pretty

Example Output

{
  "timestamp": "2026-04-01T12:00:00.000Z",
  "version": "0.1.0",
  "oauth": {
    "plan": { "tier": "default_claude_max_5x", "displayName": "Max 5x" },
    "fiveHour": { "utilization": 0.42, "remainingSeconds": 12345 },
    "sevenDay": { "utilization": 0.18, "remainingSeconds": 456789 },
    "sevenDayOpus": { "utilization": 0.31 },
    "sevenDaySonnet": { "utilization": 0.12 }
  },
  "usage": {
    "daily": [{ "date": "2026-04-01", "totalTokens": 847293, "totalCost": 8.47 }],
    "activeBlock": { "burnRate": { "tokensPerMinute": 2841, "costPerHour": 1.23 } }
  },
  "analysis": {
    "recommendation": { "bestTool": "Claude Code", "sessionHeadroomPercent": 58 },
    "estimates": { "session": { "estimatedLimitCost": 42.50 } }
  }
}

Credential Sources (checked in order)

| Priority | Source | Notes | |---|---|---| | 1 | macOS Keychain | Where Claude Code stores credentials | | 2 | ~/.claude/.credentials.json | File-based fallback | | 3 | CLAUDE_CODE_OAUTH_TOKEN env | Manual override | | 4 | WSL paths | Windows cross-platform support |


Architecture

quotatracker (CLI Core)                    Consumers
┌──────────────────────────────┐     ┌──────────────────┐
│  OAuth Client                │     │  Desktop (Tauri)  │
│  ├─ Token auto-refresh       │     │  React + Recharts │
│  └─ Usage windows            │     └────────┬─────────┘
│                              │              │
│  JSONL Parser                │◄─── JSON ────┤
│  ├─ Cost calculation         │     stdout   │
│  ├─ Session blocks           │              │
│  └─ Model breakdowns        │     ┌────────┴─────────┐
│                              │     │  macOS (SwiftUI)  │
│  Analysis Engine             │     │  Menu bar app     │
│  ├─ Velocity & runway        │     └──────────────────┘
│  ├─ Heatmap (28d)            │
│  ├─ Limit estimates          │
│  └─ Recommendations          │
└──────────────────────────────┘

The core CLI outputs a single JSON blob to stdout. Both desktop UIs spawn the binary and parse its output — no network server, no IPC, just Unix pipes.


Development

# Install dependencies
bun install

# Run CLI directly
bun run start

# Run with pretty output
bun run start -- --pretty

# Build distributable
bun run build

# Type check
bun run typecheck

# Run tests
bun run test

Desktop App (Tauri)

cd desktop
pnpm install
pnpm tauri dev

macOS App (SwiftUI)

cd macos/QuotaTracker
swift build
swift run

Supported Plans

| Plan | Tier ID | Tracked | |---|---|---| | Pro | default_claude_ai | Session + Weekly | | Max 5x | default_claude_max_5x | Session + Weekly + Extra Usage | | Max 20x | default_claude_max_20x | Session + Weekly + Extra Usage |


Token Pricing

Costs are calculated using live pricing from LiteLLM with embedded fallbacks:

| Model | Input | Output | Cache Write | Cache Read | |---|---|---|---|---| | Claude Sonnet 4 | $3.00/M | $15.00/M | $3.75/M | $0.30/M | | Claude Opus 4 | $5.00/M | $25.00/M | $6.25/M | $0.50/M | | Claude Haiku 4.5 | $1.00/M | $5.00/M | $1.25/M | $0.10/M |


Data Storage

QuotaTracker stores analysis state in ~/.claude/.state/:

| File | Purpose | Retention | |---|---|---| | history.json | Utilization samples for velocity calculation | 24 hours, 2000 max | | heatmap.json | Hourly peak utilization | 28 days | | estimate-snapshots.json | Limit cost estimate history | 28 days, 2000 max |

All data is derived from your local JSONL logs and the OAuth API. Nothing is sent to external services.


License

MIT