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

claude-usage-widget

v1.0.6

Published

Monitor your Claude Code API rate limits from the terminal

Readme

Claude Usage Widget

Monitor your Claude Code API rate limits from the terminal. Displays a beautiful dashboard showing your 5-hour, weekly, and Sonnet usage limits with color-coded progress bars.

Screenshot placeholder

Quick Start

Run directly without installing:

npx claude-usage-widget

Or install globally:

npm install -g claude-usage-widget
claude-usage

Prerequisites

  • macOS (uses macOS Keychain to read credentials)
  • Claude Code must be installed and you must be logged in
  • OAuth credentials are automatically stored in your macOS Keychain by Claude Code

Features

  • Color-coded progress bars for 5-hour, weekly, and Sonnet rate limits
  • Green/yellow/orange/red coloring based on utilization level
  • Relative reset times (e.g., "resets in 2h 15m")
  • Account info display (name, subscription type, tier)
  • Overall rate limit status indicator
  • Watch mode for continuous monitoring
  • JSON output for scripting and integrations

Options

| Flag | Description | |------|-------------| | --watch, -w | Auto-refresh the display every 5 minutes | | --json | Output raw JSON data instead of the formatted display | | --help, -h | Show help message |

How It Works

  1. Reads credentials from the macOS Keychain (Claude Code-credentials)
  2. Makes a minimal API call to https://api.anthropic.com/v1/messages using your OAuth token. The call sends a single-character message with max_tokens: 1 to minimize usage.
  3. Parses rate limit headers from the API response, including:
    • anthropic-ratelimit-unified-5h-utilization (5-hour rolling window)
    • anthropic-ratelimit-unified-7d-utilization (weekly limit)
    • anthropic-ratelimit-unified-7d_sonnet-utilization (Sonnet weekly limit)
    • Reset times and status for each limit
  4. Displays the data in a formatted terminal dashboard

Python Floating Widget

This package also includes a Python-based floating desktop widget (claude_usage_widget.py) that provides an always-on-top transparent overlay. See the Python script and its associated shell scripts (start_widget.sh, stop_widget.sh, install_autostart.sh) for the desktop widget alternative.

License

MIT