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

ccperf

v0.1.3

Published

Analytics TUI + cross-platform reset scheduler for Claude Code. Hourly usage breakdown, cache efficiency, cost by project/model/session, and an OS-level ping scheduler to trigger session resets at your chosen time.

Downloads

498

Readme

ccperf (ccperf / ccp)

Analytics TUI and OS-level reset scheduler for Claude Code. Runs in your terminal, reads your local ~/.claude/ logs, and shows token use, cost, cache efficiency, hourly breakdowns, per-project and per-model breakdowns, plus an optional cron/schtasks/launchd job that fires a claude ping on your chosen schedule so your session resets when you want.

Nothing leaves your machine. No network calls except a once-a-day price fetch (cached).

ccperf overview ccperf hours ccperf models ccperf scheduler

Install

pnpm install -g ccperf
# or
npm install -g ccperf

Then run ccperf (or ccp for short).

Node 20+. Works on Windows (schtasks), macOS (launchd), and Linux (cron). Falls back to a managed daemon file if none of those are available.

Quick start

ccperf                     # launch the interactive TUI
ccperf report              # one-shot text summary
ccperf report --section models
ccperf scheduler install   # install the daily ping at fire-time
ccperf scheduler test      # fire the scheduled command once, now
ccperf doctor              # check config, paths, backend availability
ccperf export --format json > usage.json
ccperf init                # re-run the setup wizard

What it shows

Fourteen tabs, covering what's actually derivable from Claude Code's local journal:

| Tab | Hotkey | What it covers | | --- | --- | --- | | Overview | 1 | today's API cost + tokens, burn rate, active session, live sessions | | Hours | 2 | per-hour usage with range toggle (today / 7d / 30d / all), 30-day heatmap | | Sessions | 3 | recent sessions with live-green indicator | | Projects | 4 | cost and calls by project | | Models | 5 | cost and calls by model, service tier | | Cache | 6 | cache hit ratio (hits / hits+fresh+writes), 5m vs 1h create | | Tools | 7 | core tools, MCP servers, top bash commands | | Subagents | 8 | Task() spawns and their agent types | | Trends | 9 | daily sparkline (30d), weekday, hour-of-day | | Errors | e | tool errors, cap hits, telemetry failures | | Latency | l | turn duration p50/p95/p99 | | Env | v | git branches, entrypoints, versions | | Scheduler | s | install status, next fire, history log | | Export | x | snapshot everything to JSON/CSV |

In the Hours tab: t cycles the time range, m toggles cost ↔ calls.

Hide tabs you don't want via config.jsonlayout.hidden: ["trends", "env"].

Cost & cache

Cost is computed at Anthropic's pay-per-use API rates (fetched once a day, cached). On a Max subscription this is the theoretical pay-per-use value, not your actual bill.

Cache hit ratio is cache_read / (cache_read + fresh_input + cache_writes) — high values on long sessions mean the prompt cache is carrying most of the token cost.

Scheduler

Fires a cheap claude -p hello command at a fixed time each day so your session window aligns with when you actually want to work.

ccperf scheduler install

Configure in ~/.ccperf/config.json:

{
  "scheduler": {
    "resetAt": "10:00",
    "offsetMinutes": 300,
    "bufferMinutes": 0,
    "backend": "auto",
    "command": "claude -p hello",
    "workingDir": null,
    "taskName": "ccperf-scheduler"
  }
}

Backend auto-detects in this order: schtasks (Windows), launchd (macOS), cron (Linux), daemon (fallback, writes to ~/.ccperf/daemon.json).

Test it:

ccperf scheduler test            # run the command now
ccperf scheduler test --dry-run  # log it without executing
ccperf scheduler status          # see what's installed
ccperf scheduler uninstall       # remove it

Every fire is logged in ~/.ccperf/scheduler.log.

Configuration

All state lives under ~/.ccperf/ (override with CCPERF_HOME):

  • config.json — scheduler, tab layout, refresh interval
  • scheduler.log — fire history
  • cap-hits.jsonl — detected cap hits
  • daemon.json — scheduler state when using the fallback backend

On first run, ccperf init asks for:

  • Your desired reset time
  • The command to fire (default claude -p hello)
  • Whether to install the scheduler now

Non-interactive output

ccperf report prints the same data as the TUI but as plain text, for piping or cron:

ccperf report                         # everything
ccperf report --section overview      # just one section
ccperf report --json                  # machine-readable
ccperf report --since 7d              # last 7 days only

ccperf export writes a full snapshot:

ccperf export --format json --out usage.json
ccperf export --format csv  --out usage.csv

What it's not

  • Not a cloud service. Nothing is uploaded.
  • Not an official Anthropic tool. Cost numbers are best-effort using published API rates.
  • Not a live status line — Claude Code ships one; ccperf is the retrospective + scheduler tool you run alongside it.

Built on

cc-logs-helper — the typed parser library. If you want to build your own tool, start there.