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

relayai

v0.2.1

Published

See your Claude Code spend, detect waste, and compare with friends

Downloads

288

Readme

relayai

See your Claude Code spend, detect waste patterns, and compare with friends.

npx relayai init

What it does

relay init

Reads your local Claude Code session logs, calculates your spend for the last 30 days, and detects three waste patterns:

| Pattern | What it means | |---|---| | No prompt caching | Your input tokens are re-sent in full every turn instead of being cached across turns | | Opus on short tasks | You're using Claude Opus for tasks that produced fewer than 500 output tokens — Sonnet costs 5× less | | Context bloat | Sessions with over 50k input tokens that lasted fewer than 10 turns — large context loaded and then abandoned |

After the report, it asks two questions and saves a profile to ~/.relay/profile.json. It also uploads the profile to JSONBin and gives you a relay code you can share with a friend.

relay ask RELAY-<code>

Takes a friend's relay code, fetches their profile, and compares it with yours:

  • Their handle, tools, spend, and use case
  • Dollar difference between your spend and theirs
  • Waste patterns you have that they don't (and vice versa)
  • One actionable line: what to look at first

What it reads

Only ~/.claude/projects/**/*.jsonl — the local session logs written by Claude Code. These contain token usage metadata and model names per turn.

What it calculates

Estimated cost based on Anthropic's public pricing:

| Model | Input | Output | Cache read | |---|---|---|---| | Sonnet | $3/M | $15/M | $0.30/M | | Opus | $15/M | $75/M | $0.30/M | | Haiku | $0.80/M | $4/M | $0.08/M |

What it never touches

  • Your prompt content or conversation text
  • Your code or files
  • Your Anthropic API keys or credentials
  • Anything outside ~/.claude/projects/

The only data that leaves your machine is the profile you explicitly choose to share: your username handle, tool list, use case, spend total, and waste pattern flags.


Requirements

  • Node.js 18+
  • A free JSONBin account — on first run, you'll be prompted to paste your Master Key. It's saved to ~/.relay/config.json and never asked for again. To reset it, delete that file.

Install

npm install -g relayai
relay init

Or run without installing:

npx relayai init

Commands

relay init              Run the cost + waste report
relay ask RELAY-<code>  Compare spend with a friend
relay --version
relay --help

Profile format

Saved to ~/.relay/profile.json after relay init:

{
  "handle": "yourname",
  "updated": "2026-03-30",
  "spend_30d": 371.74,
  "tools": ["claude-code", "cursor"],
  "use_case": "building product",
  "waste_patterns": {
    "no_caching": false,
    "model_mismatch": false,
    "context_bloat": false
  },
  "savings_available": 0
}

MIT License