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-spend-lens

v1.0.0

Published

Per-prompt and session spend visibility for Claude Code. See exactly what each prompt costs the moment it finishes — spot expensive prompts and spend leaks before you hit the 'usage limit' wall. Costs shown in USD or INR (live rate, auto-refreshes every 3

Readme

claude-spend-lens

See exactly what each prompt costs the moment Claude finishes responding — spot expensive prompts and spend leaks before you hit the "you have reached your usage limit" wall.

[claude] ~/project  ctx 12/200k (6%)  | ₹1.24 | total ₹18.50
  • Left number — cost of the current prompt (resets to zero after each response)
  • Right number — cumulative spend since the session started
  • Supports INR and USD

Install

INR (Indian Rupee)

npx claude-spend-lens --inr

Fetches the live USD → INR rate at install time. Auto-refreshes every 30 days — no manual updates needed. If the network is unavailable, it silently falls back to the last cached rate.

USD

npx claude-spend-lens

No configuration needed.

Final step (both)

Restart Claude Code. The status line updates immediately on your next session.


Uninstall

npx claude-spend-lens --uninstall

Removes the installed scripts and undoes the settings.json changes. Your other Claude Code settings and hooks are untouched.


How it works

  • Installs two small Node.js scripts to ~/.claude/tools/claude-spend-lens/ and patches ~/.claude/settings.json
  • No npm dependencies, no background processes
  • Network call happens only once every 30 days to refresh the INR rate
  • Per-prompt delta: accumulates during the full turn (including tool calls), resets only after Claude finishes responding
  • Session total: accumulates from session start, resets when you open a new session
  • State stored at ~/.claude/state/claude-spend-lens/ — one small JSON file per session, safe to delete anytime

Requirements


Disclaimer

This tool modifies your local ~/.claude/settings.json and installs scripts on your machine. You use it at your own risk. Cost figures are estimates — do not rely on them for billing or financial decisions. Exchange rates are fetched from a third-party public API and may be imprecise.

This project is independent and not affiliated with or endorsed by Anthropic PBC.


License

MIT — see LICENSE