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

opengauge

v0.2.5

Published

A local-first, token-efficient LLM chat interface

Readme

OpenGauge

Local-first LLM cost tracking and observability. Per-call cost logging, runaway loop detection, circuit breaker, and budget enforcement — all stored in SQLite on your machine.

Quick Start

npx opengauge

What it does

  • Per-call cost tracking — every LLM API call logged with token counts, cost estimates, and latency
  • Runaway loop detection — trigram similarity catches agents stuck repeating the same call
  • Circuit breaker — alerts (or blocks) when loops or budget thresholds are breached
  • Budget enforcement — session, daily, and monthly spend limits
  • Multi-provider — Anthropic, OpenAI, Google Gemini, Ollama (local)

Three ways to use it

1. Proxy mode — track any LLM tool

Point any tool (Claude Code, Cursor, custom apps) at the proxy to track all API calls:

npx opengauge watch

Then configure your tool to use the proxy:

ANTHROPIC_BASE_URL=http://localhost:4000 claude
OPENAI_BASE_URL=http://localhost:4000/v1 your-tool

2. OpenClaw plugin — track OpenClaw agents

openclaw plugins install @opengauge/openclaw-plugin
openclaw gateway restart

Every LLM call your agent makes is automatically tracked. No code changes needed.

3. Chat UI — built-in chat interface

npx opengauge

Opens a local web chat at http://localhost:3000 with token optimization, context retrieval, and cost tracking built in.

View stats

npx opengauge stats                              # all time, all sources
npx opengauge stats --source=proxy               # proxy mode only
npx opengauge stats --source=openclaw            # openclaw plugin only
npx opengauge stats --period=7d                  # last 7 days
npx opengauge stats --model=claude-sonnet-4-6    # specific model
npx opengauge stats --json                       # machine-readable output

Example output:

  Total Spend
┌──────────────┬─────────┐
│ Total Spend  │ $0.0408 │
│ Tokens In    │ 25.4K   │
│ Tokens Out   │ 203     │
│ Sessions     │ 7       │
│ API Calls    │ 7       │
└──────────────┴─────────┘

Configuration

Create ~/.opengauge/config.yml:

providers:
  anthropic:
    api_key: YOUR_API_KEY
    default_model: claude-sonnet-4-6
  openai:
    api_key: YOUR_API_KEY
    default_model: gpt-4o
  ollama:
    base_url: http://localhost:11434
    default_model: llama3

defaults:
  provider: anthropic

# OpenClaw plugin settings (optional)
openclaw:
  circuit_breaker:
    enabled: true
    similarity_threshold: 0.8
    max_similar_calls: 5
    action: warn            # warn | block
  budget:
    session_limit_usd: 5.00
    daily_limit_usd: 20.00
    monthly_limit_usd: 400.00

Supported models

| Provider | Models | Input/1M | Output/1M | |----------|--------|----------|-----------| | Anthropic | claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5 | $0.80–$15 | $4–$75 | | OpenAI | gpt-4o, gpt-4o-mini, o1, o3-mini | $0.15–$15 | $0.60–$60 | | Google | gemini-2.0-flash, gemini-1.5-pro | $0.075–$1.25 | $0.30–$5 | | Ollama | Any local model | Free | Free |

Data storage

Everything local at ~/.opengauge/:

config.yml       — configuration
opengauge.db     — SQLite database (sessions, interactions, alerts)
error.log        — error log for debugging

Packages

| Package | Description | |---------|-------------| | opengauge | Core CLI — chat UI, proxy mode, stats | | @opengauge/openclaw-plugin | OpenClaw agent observability plugin |

Developer setup

git clone https://github.com/applytorque/opengauge.git
cd opengauge
npm install
npm run build
npm start

Docs

See docs/GUIDE.md for the full setup and usage guide.

License

MIT