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

@adikuma/chonker

v1.2.1

Published

real-time context window meter for claude code

Readme

chonker

Claude Code says 200K tokens but the real usable limit is somewhere around 70-120K. There's no built-in way to see how full your context is. You just keep working until Claude starts forgetting things.

What it shows

  • Context window usage bar with percentage and token ratio
  • Input and output tokens with model name
  • Real time rate limit utilization (5 hour session, 7 day weekly, model specific, extra usage)
  • Current git branch
  • Burn rate: how fast you are consuming your 5h rate limit (0.0%/min when idle, lights up when you are actively burning)

What it looks like

chonker meter

Install

npm (recommended)

npm install -g @adikuma/chonker
chonker

Restart Claude Code to see the meter.

Dev

claude --plugin-dir /path/to/chonker

How it works

On first session start, it auto-configures ~/.claude/settings.json to run a meter script. Claude Code pipes token usage and model info as JSON to the script every 5 seconds and it outputs a formatted status line. Rate limit data is fetched from the Anthropic API and cached locally so it stays fast.

Architecture

flowchart LR
    CC[Claude Code] -->|pipes JSON every 5s| M[meter.js]
    CR[credentials.json] -->|oauth token| M
    GIT[.git/HEAD] -->|branch name| M
    M -->|HTTP GET every 2.5 min| API[Anthropic Usage API]
    API -->|rate limit data| M
    M -->|4 lines of text| SL[status line footer]

    subgraph cache
        UC["usage.json<br/>(short lived)"]
        UG["usage_good.json<br/>(last known good)"]
    end

    M -->|read/write| UC
    M -->|read/write| UG
    M -->|read/write| SS["session.json<br/>(token accumulator)"]
    CF["config.json<br/>(user settings)"] -->|colors, toggles| M

Line 1 (progress bar, token count) and Line 2 (input/output tokens, model, branch) update every 5 seconds. This data comes straight from Claude Code through the pipe so it is always real time.

Line 3 (rate limits) comes from the Anthropic usage API. This is a network call so it is cached to keep things fast and avoid getting rate limited by the endpoint itself.

Line 4 (burn rate) tracks how fast your 5h rate limit is being consumed. It compares successive API snapshots every 2.5 minutes and computes %/min. Shows 0.0%/min dimmed when usage is flat, and lights up in teal when you are actively burning. Appears after the first two API cycles (~5 min after start).

Caching

The rate limit numbers on line 3 go through a cache before hitting the API. Here is the order of operations every time meter.js runs:

  1. Check ~/.chonker/usage.json (short lived cache). If it was written recently, use it and skip the API call entirely
  2. If the cache is old, try the API with a 2 second timeout. If the API responds with valid data, save it to both cache files and use it
  3. If the API fails or times out but the short cache is not too old yet, use the stale data
  4. If everything above fails, fall back to ~/.chonker/usage_good.json which stores the last successful API response and never expires
  5. If even that does not exist (first run ever with no successful fetch), skip line 3

The API is only called when the short cache expires. All other runs just read from disk. This means out of every 30 runs (5s intervals over 2.5 minutes), only 1 makes a network call.

usage_good.json exists because the usage API is known to return persistent 429 errors. Without a long term fallback the rate limit line would just disappear whenever the API is having a bad day.

Customization

Create ~/.chonker/config.json to override defaults:

{
  "bar_width": 20,
  "show_usage": true,
  "show_resets": true,
  "cache_ttl": 150
}

Colors are ANSI 256 color codes. Run chonker after installing to see all available options.