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

cc-minimax-status

v0.2.1

Published

A Claude Code statusLine that shows your live MiniMax 5h quota.

Readme

cc-minimax-status

A Claude Code statusLine script that shows your live MiniMax 5h quota on every render. Context-window usage is intentionally not shown — Claude Code already surfaces that.

MiniMax: 100% / 5h (39m)

Why

Claude Code's rate_limits block on stdin doesn't expose the MiniMax 5h limit — only Anthropic's own. This script fetches the real 5h limit directly from MiniMax's public API (/v1/token_plan/remains) using the same API key you already have wired up as ANTHROPIC_AUTH_TOKEN.

Context-window usage is not in this line on purpose: Claude Code already shows it (the statusline row and a transient warning near 80%), so duplicating it would just be visual noise.

Install

npx (recommended for Node users):

npx cc-minimax-status

That's it. The npm package bundles the statusline script, writes it to ~/.claude/statusline.sh, and patches ~/.claude/settings.json — no curl required.

One-liner shell installer (no Node required):

curl -fsSL https://raw.githubusercontent.com/samir-abis/cc-minimax-status/main/install.sh | bash

Both installers:

  • download / bundle statusline.sh to ~/.claude/statusline.sh and chmod +x it
  • patch ~/.claude/settings.json to add the statusLine block (with a timestamped backup of your existing settings)
  • verify the result

Restart Claude Code after the install finishes.

To uninstall later: re-run the same command with --uninstall appended (npx cc-minimax-status --uninstall).

Manual install

If you'd rather not pipe to bash:

1. Copy the script somewhere on disk

curl -fsSL https://raw.githubusercontent.com/samir-abis/cc-minimax-status/main/statusline.sh \
  -o ~/.claude/statusline.sh
chmod +x ~/.claude/statusline.sh

2. Add the statusLine block to ~/.claude/settings.json

{
  "statusLine": {
    "type": "command",
    "command": "~/.claude/statusline.sh",
    "padding": 2,
    "refreshInterval": 30
  }
}

refreshInterval (in seconds, minimum 1) re-runs the script on a timer in addition to the normal event-driven renders, so the time-to-reset countdown (Xh Ym) visibly ticks even when you're idle and Claude Code isn't generating new output. The default of 30s strikes a balance between a live-feeling display and not hammering the MiniMax quota API; drop to 510 for a smoother tick, raise to 60+ if you want to minimize API calls.

3. Restart Claude Code so the statusLine config takes effect.

Requirements

  • bash (any modern version)
  • curl
  • jq (only the installer needs it; the statusline script itself just shells out to it)
  • The same MiniMax API key you already have configured as ANTHROPIC_AUTH_TOKEN for Claude Code — no new credentials.

What it shows

| Segment | Source | Notes | |---|---|---| | MiniMax: X% / 5h (Ym) | Public GET /v1/token_plan/remains with Authorization: Bearer $ANTHROPIC_AUTH_TOKEN | The 5h limit is reported as remaining-percent + time-to-reset. The script picks the most-exhausted model slot (typically general) and shows 100 - remaining_percent for the used number. |

The number turns green below 40%, yellow from 40–59%, and red at 60% or above.

How it works

  1. The script does a curl GET https://www.minimax.io/v1/token_plan/remains with the bearer token. The endpoint is rate-limit-friendly (--max-time 5) and a failed call degrades to n/a without breaking the line.
  2. The result is colorized and printed on a single line.

Tests

Pure-logic unit tests live in test/statusline.bats and run with bats-core:

npm test

(equivalent to bats test/). Install bats-core first if you don't have it:

brew install bats-core          # macOS
sudo apt install bats           # Debian / Ubuntu

The test suite covers the time-formatting, color-thresholds, model-slot selection, the n/a fallbacks for malformed / empty responses, and a sanity check that the script still points at the minimax.io token-plan endpoint.

Known limitations

  • Credit balance is not shown. The public API exposes percent + reset time for the 5h and weekly windows, but the credit-pool number (e.g. "19,944 credits") is in a separate dashboard store that's only accessible with a session cookie. If you want credits in the line, you'd need a cookie-based refresh script (out of scope for this project).
  • Numeric request counts (X/Y reqs) are not shown. The public API returns current_interval_total_count: 0 for bundled credit-based plans, so the only reliable number is percent.
  • The script targets api.minimax.io (international). If you're on api.minimaxi.com (mainland China), edit the URL in the script.

Requirements

  • bash (any modern version)
  • curl
  • jq

License

MIT