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-statusline-1m

v2.2.2

Published

Claude Code statusline with dynamic 1M context support and premium pricing alerts

Downloads

22

Readme

Claude Code Statusline with 1M Context Support

Dynamic context window detection for Claude Code statusline that automatically adjusts to your model's context window size.

Features

  • 🎯 Dynamic Context Detection: Automatically detects [1m], [200k], etc. suffixes
  • 📊 Accurate Percentages: Shows correct context usage for 1M and 200K models
  • 💰 Session Metrics: Cost tracking and duration monitoring
  • 💸 Premium Pricing Alert: Shows "💸2x" indicator when exceeding 200K tokens (2x pricing tier)
  • 🎨 Color-coded Alerts: Visual warnings at 50%, 75%, 90%, 95% usage

Installation

🚀 Automatic Installation (Recommended)

Run the installer - it will set everything up for you:

npx claude-statusline-1m --install

The installer will:

  1. Ask where you want to install (global, project, or local)
  2. Copy the Python script to the right location
  3. Update your settings.json automatically
  4. Show you what was installed

Quick install with defaults (installs locally without prompts):

npx claude-statusline-1m --install --yes

Then restart Claude Code and you're done! 🎉

🛠️ Manual Installation (Advanced)

If you prefer to configure manually, add this to your .claude/settings.json or .claude/settings.local.json:

For npm version:

{
  "statusLine": {
    "type": "command",
    "command": "npx -y claude-statusline-1m"
  }
}

For GitHub version:

{
  "statusLine": {
    "type": "command",
    "command": "npx -y github:vedmichv/claude-statusline-1m"
  }
}

Then restart Claude Code.

How It Works

  • 🚀 NPX downloads and caches the package automatically
  • ⚡ Claude Code runs it on every session
  • 📦 No installation script needed - runs directly from cache
  • 🌍 Works at project OR global level
  • 🔄 Always uses the cached version for fast startup

Quick Test

Test the statusline before configuring:

# Test with npm package
echo '{"model":{"id":"test[1m]","display_name":"Claude"},"workspace":{"current_dir":"/tmp"},"transcript_path":""}' | npx -y claude-statusline-1m

# Test with GitHub version
echo '{"model":{"id":"test[1m]","display_name":"Claude"},"workspace":{"current_dir":"/tmp"},"transcript_path":""}' | npx -y github:vedmichv/claude-statusline-1m

Expected output: [Claude] 📁 tmp 🧠 🔵 ???

Context Window Detection

The script automatically detects your model's context window from the model ID:

  • model[1m] → 1,000,000 tokens
  • model[200k] → 200,000 tokens
  • No suffix → 200,000 tokens (default)

Supported Models

  • ✅ Claude Sonnet 4.5 with 1M context ([1m])
  • ✅ Claude Sonnet 4 with 1M context ([1m])
  • ✅ Any future models with [XM] or [Xk] suffixes

Pricing Information

Both Anthropic API & AWS Bedrock

Claude Sonnet 4/4.5 with 1M context has tiered pricing:

| Token Range | Input | Output | Notes | |-------------|-------|--------|-------| | ≤ 200K tokens | $3/M | $15/M | Standard rate | | > 200K tokens | $6/M | $22.50/M | Premium rate (2x input, 1.5x output) |

⚠️ Critical: When you exceed 200K tokens, ALL tokens in that request are charged at the premium rate, not just the excess.

The statusline displays a 💸2x indicator when you cross into premium pricing territory (>200K tokens).

Requirements

  • Python 3.x
  • Claude Code CLI

License

MIT