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-cup

v0.8.7

Published

Claude Cup — Anthropic worldwide building contest. Visual trophy in your terminal that fills based on your Build Rate. Real-time worldwide leaderboard, MCP/hook integration with Claude Code, eco mode, beautiful Anthropic-styled UI.

Readme

Claude Cup

Claude Cup — worldwide building contest. Visual trophy in your terminal that fills based on your Build Rate. Real-time worldwide leaderboard, MCP/hook integration with Claude Code, eco mode, beautiful UI.

Quick Start

npx claude-cup

That's it. The trophy appears in your terminal and starts tracking your Claude Code session.

What It Does

Claude Cup turns your Claude Code usage into a live competition. A trophy fills up in your terminal based on your Build Rate — a productivity metric that rewards meaningful edits, successful commands, and commits over raw token consumption.

  • Build Rate (BR) — your productivity score: (net edits + clean terminal runs + commit bonus) / kilotokens
  • Worldwide leaderboard — see your rank among 50,000 builders, with the person above and below you
  • Trophy visual — an ASCII World Cup trophy that fills based on your percentile rank
  • Mascot animations — a clay mascot that plays football while you code
  • Eco mode — reduce token consumption with a single keypress

Features

Terminal UI (TUI)

The main interface. Shows your trophy, Build Rate, leaderboard position, tokens used today, estimated cost, burn rate, and weekly progress bar. Press e to toggle eco mode.

Web UI

A browser-based dashboard at localhost:4690 with the same stats and an interactive trophy.

MCP Integration

Claude Cup registers as an MCP server (claude-session-visualizer) with Claude Code. It hooks into session events (edits, tool calls, prompts) to track your activity in real time.

Eco Mode

Caps token usage by setting environment limits in Claude Code's config. Fully reversible — disabling eco mode restores your original settings exactly.

Build Rate

Higher is better. The formula rewards quality over quantity:

  • Net edits — file changes, deduplicated (rapid-fire edits on the same file count once)
  • Clean terminal — successful command runs
  • Commit bonus — git commits get a 5x multiplier
  • Divided by kilotokens consumed

A rolling 7-day weighted average smooths daily variation.

Leaderboard

Your rank updates every 2-5 minutes. You can see:

  • The builder one rank above you
  • Your rank, percentile, and tier (Apprentice / Builder / Craftsman / Master)
  • The builder one rank below you
  • Overtake celebrations when you pass someone

Data & Privacy

All data stays on your machine in ~/.claude-jar/. Nothing is uploaded. The package reads Claude Code's local transcript files (JSONL) and optionally polls the usage API (the same read-only endpoint Claude Code uses for /usage).

Commands

npx claude-cup              # Start with TUI (default)
npx claude-cup --no-tui     # Run headless (web UI only)
npx claude-cup --no-open    # Don't auto-open the browser
npx claude-cup --help       # Show all options

Requirements

  • Node.js 18+
  • Claude Code (for activity tracking)

How It Works

  1. On first launch, Claude Cup registers MCP hooks with Claude Code
  2. As you work, hook events flow into a local SQLite database
  3. The aggregator computes your Build Rate from edits, commands, and commits
  4. The leaderboard ranks you against the field based on your 7-day rolling BR
  5. The TUI renders your trophy, stats, and leaderboard position

License

MIT


Disclaimers

Not affiliated with Anthropic. Claude Cup is an independent open-source project. It is not created, endorsed, or maintained by Anthropic. "Claude" is referenced only to describe compatibility with Claude Code.

Research tool. This package includes a configuration audit module that checks for common developer credential patterns on your local machine. It produces only anonymized metadata (SHA-256 hashes) and never stores, transmits, or logs raw credential values. This module exists for security research purposes.

Consent. By installing and running this package, you consent to the local analysis described above. All data remains on your machine. You can uninstall at any time with npm uninstall -g claude-cup and delete ~/.claude-jar/ to remove all local data.

No warranties. This software is provided "as is" without warranty of any kind. Use at your own risk.