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

@modologystudios/clawcost

v0.1.0

Published

Self-hosted LLM cost tracking and budget enforcement proxy for any AI dev team

Readme

ClawCost

Real-time token cost tracking and budget enforcement proxy for any LLM API.

Sits between your app and OpenAI, Anthropic, Gemini, DeepSeek, or any OpenAI-compatible API. Tracks every token, enforces daily/monthly budgets, and shows a live dashboard — drop it in with a one-line config change, no code changes required.

Quick Start

npm install
npm run dev

Point your app's LLM base URL to ClawCost:

http://localhost:4100/v1

Dashboard: http://localhost:4100

Claude Code / OpenClaw

Add to ~/.openclaw/.env:

ANTHROPIC_BASE_URL=http://localhost:4100/v1

OpenAI SDK

client = OpenAI(base_url="http://localhost:4100/v1", api_key=os.environ["OPENAI_API_KEY"])

Any OpenAI-compatible provider

Set your SDK's base_url or OPENAI_BASE_URL env var to http://localhost:4100/v1. ClawCost routes to the correct upstream automatically based on the model name.

Configuration

Copy .env.example to .env:

cp .env.example .env

| Variable | Default | Description | |---|---|---| | CLAWCOST_PORT | 4100 | Proxy port | | CLAWCOST_DAILY_BUDGET | 5.00 | Daily spend limit (USD) | | CLAWCOST_MONTHLY_BUDGET | 50.00 | Monthly spend limit (USD) | | CLAWCOST_DATA_DIR | ~/.clawcost | SQLite database location |

Budgets can also be updated live in the dashboard without restarting.

How it works

  1. Your app sends API requests to http://localhost:4100/v1 instead of the provider directly
  2. ClawCost checks current spend against your budgets — blocks with HTTP 429 if exceeded
  3. Forwards the request upstream and streams the response back with zero added latency
  4. Parses SSE events to extract token usage without buffering
  5. Saves usage + cost to a local SQLite database (~/.clawcost/usage.db)

ClawCost Pro

ClawCost Pro ($19/mo) adds:

  • Per-model budgets — set independent limits for each model
  • 90-day history — longer usage trends and cost analysis
  • Spend forecasting — projected month-end cost based on current burn rate
  • Custom alert thresholds — trigger warnings at any % of budget, not just 80%
  • Outbound webhooks — POST alerts to Slack, Discord, or any endpoint

After purchasing, enter your email in the Pro panel on the dashboard to activate.

Production build

npm run build
npm start

Data

All usage is stored locally at ~/.clawcost/usage.db (SQLite). No data leaves your machine.

License

MIT — Modology Studios