{"_id":"@adikuma/chonker","_rev":"12-77b3d05e1f44c4164c641cf8f73369b1","name":"@adikuma/chonker","dist-tags":{"latest":"1.2.1"},"versions":{"1.0.0":{"name":"@adikuma/chonker","version":"1.0.0","keywords":["claude","claude-code","context-window","token-usage","status-line"],"license":"MIT","_id":"@adikuma/chonker@1.0.0","maintainers":[{"name":"adikuma","email":"adityakuma0308@gmail.com"}],"homepage":"https://github.com/adikuma/chonker#readme","bugs":{"url":"https://github.com/adikuma/chonker/issues"},"bin":{"chonker":"bin/cli.js"},"dist":{"shasum":"53304994d20d1252ad3f09c86ad63702a8c1ef32","tarball":"https://registry.npmjs.org/@adikuma/chonker/-/chonker-1.0.0.tgz","fileCount":8,"integrity":"sha512-L3xgFbRgnn0m17hkDtExKsdgqCdXkhod7G5pJpxHJQQz1+pKPBMYIVbuAe+l8mNvfHipWYualB/agbDfZAngIA==","signatures":[{"sig":"MEUCIQD9IO4Yl8u2cVNoU1Y00/EAvdfBUU5BTWcQSzXwwGIxrAIgX91ZoZCTu78nGGIWwyBadxTKzO8OKoqdOE0cRvJk12M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13745},"gitHead":"07ab6676482951bf38abce25845a0766b621dc97","_npmUser":{"name":"adikuma","email":"adityakuma0308@gmail.com"},"repository":{"url":"git+https://github.com/adikuma/chonker.git","type":"git"},"_npmVersion":"11.6.2","description":"real-time context window meter for claude code","directories":{},"_nodeVersion":"24.13.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/chonker_1.0.0_1771699746256_0.77014593481793","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@adikuma/chonker","version":"1.1.0","keywords":["claude","claude-code","context-window","token-usage","status-line"],"license":"MIT","_id":"@adikuma/chonker@1.1.0","maintainers":[{"name":"adikuma","email":"adityakuma0308@gmail.com"}],"homepage":"https://github.com/adikuma/chonker#readme","bugs":{"url":"https://github.com/adikuma/chonker/issues"},"bin":{"chonker":"bin/cli.js"},"dist":{"shasum":"4a623528ca6b695e369fad2e53aae653178712e1","tarball":"https://registry.npmjs.org/@adikuma/chonker/-/chonker-1.1.0.tgz","fileCount":8,"integrity":"sha512-LbLVyW9DsXIUvyvnEhAMhd4JXVhCxP4tWlTDJjx1pUPDlKkfM93qKLgei4dMELCH35g6f/8JLJZOAV5HAKpLDQ==","signatures":[{"sig":"MEYCIQD4rJxuydZpP5k1mnA1jBSUJXN+lzNChDTQkqxU0UuJ5wIhALzoNxHy+0C9FwthEakQjAsRgAXVNBS8DDAeI7FECdGc","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14115},"gitHead":"7f1c4e8da89f7f9914014350bc89b9c5bb4c6553","_npmUser":{"name":"adikuma","email":"adityakuma0308@gmail.com"},"repository":{"url":"git+https://github.com/adikuma/chonker.git","type":"git"},"_npmVersion":"11.6.2","description":"real-time context window meter for claude code","directories":{},"_nodeVersion":"24.13.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/chonker_1.1.0_1772010237704_0.763780020745932","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@adikuma/chonker","version":"1.1.1","keywords":["claude","claude-code","context-window","token-usage","status-line"],"license":"MIT","_id":"@adikuma/chonker@1.1.1","maintainers":[{"name":"adikuma","email":"adityakuma0308@gmail.com"}],"homepage":"https://github.com/adikuma/chonker#readme","bugs":{"url":"https://github.com/adikuma/chonker/issues"},"bin":{"chonker":"bin/cli.js"},"dist":{"shasum":"8eff8731ec3005deacd70372472c238389a138ca","tarball":"https://registry.npmjs.org/@adikuma/chonker/-/chonker-1.1.1.tgz","fileCount":8,"integrity":"sha512-JjbUcDLS6SRdhbnCYuAm775FYek5MiRNd2hvap8zi9Ka9qkei+9gvqf3ds+KeW6BmlAPrr63qjaQmSJYDyzdCQ==","signatures":[{"sig":"MEUCIQCVGEx5U+g50/67yQSH1xQO4Tg3y/iOnUB/BuVonfcUyQIgHmiLAcNODgOlrGbuoTbi3cWe/APHFUAHjoFNaz+HbO0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18184},"gitHead":"cab689ff58cebee9d7385f5141ea9086f043d1a0","_npmUser":{"name":"adikuma","email":"adityakuma0308@gmail.com"},"repository":{"url":"git+https://github.com/adikuma/chonker.git","type":"git"},"_npmVersion":"11.6.2","description":"real-time context window meter for claude code","directories":{},"_nodeVersion":"24.13.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/chonker_1.1.1_1773389328144_0.42321345079302874","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@adikuma/chonker","version":"1.1.2","keywords":["claude","claude-code","context-window","token-usage","status-line"],"license":"MIT","_id":"@adikuma/chonker@1.1.2","maintainers":[{"name":"adikuma","email":"adityakuma0308@gmail.com"}],"homepage":"https://github.com/adikuma/chonker#readme","bugs":{"url":"https://github.com/adikuma/chonker/issues"},"bin":{"chonker":"bin/cli.js"},"dist":{"shasum":"3d688dfe5d862f0bd8458108ae46d7aee2309916","tarball":"https://registry.npmjs.org/@adikuma/chonker/-/chonker-1.1.2.tgz","fileCount":8,"integrity":"sha512-KcmVr70L4sU4MBO0F0WxqQpxjmxFVgcoWnFSkOkAJM9k5JRoDx71zWAnbHwKexWWV6FTgsBgT4ktwrKcaBScOg==","signatures":[{"sig":"MEUCIBKgcAaQeXIkbkMlmyWXF3+CosdYuLS8MQK1kCZCU+CLAiEA4GyfhLkCqlBOGPDN7lycnMO+j6cOTlsqw3Hg8W/a7U0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18348},"gitHead":"28433359bddfa7bc73523a2ff4bb348b0f672fc3","_npmUser":{"name":"adikuma","email":"adityakuma0308@gmail.com"},"repository":{"url":"git+https://github.com/adikuma/chonker.git","type":"git"},"_npmVersion":"11.6.2","description":"real-time context window meter for claude code","directories":{},"_nodeVersion":"24.13.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/chonker_1.1.2_1773389663000_0.016780288328086534","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@adikuma/chonker","version":"1.2.0","keywords":["claude","claude-code","context-window","token-usage","status-line"],"license":"MIT","_id":"@adikuma/chonker@1.2.0","maintainers":[{"name":"adikuma","email":"adityakuma0308@gmail.com"}],"homepage":"https://github.com/adikuma/chonker#readme","bugs":{"url":"https://github.com/adikuma/chonker/issues"},"bin":{"chonker":"bin/cli.js"},"dist":{"shasum":"9fe8b2ca52a4a2eab47f5b77b628b51b5790f6af","tarball":"https://registry.npmjs.org/@adikuma/chonker/-/chonker-1.2.0.tgz","fileCount":8,"integrity":"sha512-Lw2XrCXNsDM1JQFncOOHy/VijZrXMB2Io1TJqrxO8o1Khb6SJCGYZPKsSlFh3c9/UOv/OwvkLf/J2fu/2/fdsw==","signatures":[{"sig":"MEUCIDIlDkW+3+iKsQHQ+z54qVG+qbhW/yZZvQwQHTlhiUNuAiEAnaZHGCC+gZDS+tBhOnnxlfvNRqMbavRABbEsPT17erM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22116},"gitHead":"179f9f1f840b6f19cc37ffeaa6f557bbddd2c960","_npmUser":{"name":"adikuma","email":"adityakuma0308@gmail.com"},"repository":{"url":"git+https://github.com/adikuma/chonker.git","type":"git"},"_npmVersion":"11.6.2","description":"real-time context window meter for claude code","directories":{},"_nodeVersion":"24.13.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/chonker_1.2.0_1774602012781_0.737211645922546","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@adikuma/chonker","version":"1.2.1","description":"real-time context window meter for claude code","bin":{"chonker":"bin/cli.js"},"keywords":["claude","claude-code","context-window","token-usage","status-line"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/adikuma/chonker.git"},"gitHead":"bbe8cd9036a49520f901534a050a9defe1a8ca1a","_id":"@adikuma/chonker@1.2.1","bugs":{"url":"https://github.com/adikuma/chonker/issues"},"homepage":"https://github.com/adikuma/chonker#readme","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-dGaHi3cOaTrZ2XjU7LYVPcmobhKifgNYhOWc0J1yGc/jVf8j582Nos+7k4iK0oU/4iYkN41oOktVaEMSo5hkqQ==","shasum":"9f0f062a3ca3c9fa6d5908a4debaee60a012c0b5","tarball":"https://registry.npmjs.org/@adikuma/chonker/-/chonker-1.2.1.tgz","fileCount":8,"unpackedSize":23166,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCBuY3sTcy2vSQaaDHWakWNm/dmKQX6j62zu89KWAUdJwIgF9sjo5zuYTDelTpzUNKvxKxRuxaao9i4i/MDXLND2J4="}]},"_npmUser":{"name":"adikuma","email":"adityakuma0308@gmail.com"},"directories":{},"maintainers":[{"name":"adikuma","email":"adityakuma0308@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/chonker_1.2.1_1774604839654_0.20486328145156674"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-21T18:49:06.176Z","modified":"2026-03-27T09:47:19.917Z","0.1.0":"2026-02-21T18:29:39.852Z","0.1.1":"2026-02-21T18:33:48.079Z","0.1.2":"2026-02-21T18:35:26.783Z","0.1.3":"2026-02-21T18:44:11.762Z","1.0.0":"2026-02-21T18:49:06.401Z","1.1.0":"2026-02-25T09:03:57.856Z","1.1.1":"2026-03-13T08:08:48.322Z","1.1.2":"2026-03-13T08:14:23.142Z","1.2.0":"2026-03-27T09:00:12.918Z","1.2.1":"2026-03-27T09:47:19.818Z"},"bugs":{"url":"https://github.com/adikuma/chonker/issues"},"license":"MIT","homepage":"https://github.com/adikuma/chonker#readme","keywords":["claude","claude-code","context-window","token-usage","status-line"],"repository":{"type":"git","url":"git+https://github.com/adikuma/chonker.git"},"description":"real-time context window meter for claude code","maintainers":[{"name":"adikuma","email":"adityakuma0308@gmail.com"}],"readme":"# chonker\n\nClaude 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.\n\n## What it shows\n\n- Context window usage bar with percentage and token ratio\n- Input and output tokens with model name\n- Real time rate limit utilization (5 hour session, 7 day weekly, model specific, extra usage)\n- Current git branch\n- Burn rate: how fast you are consuming your 5h rate limit (`0.0%/min` when idle, lights up when you are actively burning)\n\n## What it looks like\n\n![chonker meter](images/chonker.png?v=5)\n\n## Install\n\n### npm (recommended)\n\n```\nnpm install -g @adikuma/chonker\nchonker\n```\n\nRestart Claude Code to see the meter.\n\n### Dev\n\n```\nclaude --plugin-dir /path/to/chonker\n```\n\n## How it works\n\nOn 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.\n\n## Architecture\n\n```mermaid\nflowchart LR\n    CC[Claude Code] -->|pipes JSON every 5s| M[meter.js]\n    CR[credentials.json] -->|oauth token| M\n    GIT[.git/HEAD] -->|branch name| M\n    M -->|HTTP GET every 2.5 min| API[Anthropic Usage API]\n    API -->|rate limit data| M\n    M -->|4 lines of text| SL[status line footer]\n\n    subgraph cache\n        UC[\"usage.json<br/>(short lived)\"]\n        UG[\"usage_good.json<br/>(last known good)\"]\n    end\n\n    M -->|read/write| UC\n    M -->|read/write| UG\n    M -->|read/write| SS[\"session.json<br/>(token accumulator)\"]\n    CF[\"config.json<br/>(user settings)\"] -->|colors, toggles| M\n```\n\n**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.\n\n**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.\n\n**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).\n\n## Caching\n\nThe 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:\n\n1. Check `~/.chonker/usage.json` (short lived cache). If it was written recently, use it and skip the API call entirely\n2. 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\n3. If the API fails or times out but the short cache is not too old yet, use the stale data\n4. If everything above fails, fall back to `~/.chonker/usage_good.json` which stores the last successful API response and never expires\n5. If even that does not exist (first run ever with no successful fetch), skip line 3\n\nThe 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.\n\n`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.\n\n## Customization\n\nCreate `~/.chonker/config.json` to override defaults:\n\n```json\n{\n  \"bar_width\": 20,\n  \"show_usage\": true,\n  \"show_resets\": true,\n  \"cache_ttl\": 150\n}\n```\n\nColors are ANSI 256 color codes. Run `chonker` after installing to see all available options.\n","readmeFilename":"README.md"}