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

tokencanary

v0.1.7

Published

CLI and daemon that reduces Claude Code token usage via hooks and local analysis

Readme

Token Canary

Token Canary is a CLI and daemon that reduces Claude Code token usage using hooks and lightweight local analysis. You get prompt compression and lower usage while still running claude as usual—no alias required.

  • 30-day free trial — full optimization from first install
  • Prompt compression — dedupe lines, keep first stack trace
  • License-aware — optimization runs only when the license is valid

Install

Requirements: Node.js 18+, Claude Code installed (claude on PATH), macOS or Linux.

npm install -g tokencanary

Quick start

Install

npm install -g tokencanary

Set up Token Canary

tokencanary doctor
tokencanary setup

Start using Claude Code normally

claude

tokencanary setup checks your environment, starts your trial (via our servers), writes config to ~/.tokencanary/, and configures Claude Code hooks automatically when possible. If auto-config isn’t available, it prints clear instructions. An internet connection is required for setup and for refreshing license status.

How it works

The CLI installs a small daemon and writes a hook config file. Claude Code sends prompts through the configured URLs; Token Canary compresses them locally and forwards the result. All prompt processing stays on your machine. Trial and license are validated by our servers; the CLI and daemon cache license status and can use it offline for a short grace period.

Commands

| Command | Description | |--------|-------------| | tokencanary doctor | Check environment (Claude Code, OS, config) | | tokencanary setup | Set up hooks, start trial, start daemon | | tokencanary install | Alias for setup | | tokencanary stop | Stop the daemon | | tokencanary uninstall | Stop daemon and remove ~/.tokencanary | | tokencanary status | Daemon and license status | | tokencanary stats | Session savings (requests optimized, chars reduced) | | tokencanary logs | Recent logs (~/.tokencanary/logs/) | | tokencanary upgrade | Open browser to subscribe ($19/mo or $99/yr) | | tokencanary license | License and trial info |

Trial and pricing

  • Trial: 30 days from first tokencanary setup, full optimization. Trial is created and validated by our servers; one trial per machine.
  • After trial: Optimization is disabled; Claude Code works normally. You are prompted to upgrade.
  • Pricing: $19/month or $99/year. Run tokencanary upgrade to open the checkout in your browser.

Privacy and security

  • Prompt processing runs locally. Only compressed payloads are sent to Claude as part of normal Claude Code usage.
  • Setup and license checks communicate with Token Canary servers (install ID, machine ID, plan, expiry). No prompt content is sent.
  • Config and logs are stored under ~/.tokencanary/ on your machine. Session stats (for tokencanary stats) are in ~/.tokencanary/stats.json and represent the current daemon session; they reset when the daemon restarts.

Troubleshooting

  • tokencanary doctor fails: Ensure Node.js 18+, Claude Code on PATH, and that ~/.tokencanary (or the reported config directory) is writable.
  • "Could not start trial" on setup: An internet connection is required; check your network and try again.
  • Hooks not applied: Run tokencanary setup again to try auto-config, or add the hook URLs from ~/.tokencanary/hooks.json to Claude Code (e.g. via /hooks or ~/.claude/settings.json).
  • Daemon not running: Run tokencanary status; if needed run tokencanary setup again.
  • No stats yet: Run tokencanary stats after using Claude Code with optimization enabled; stats reset when the daemon restarts. Use tokencanary stop then tokencanary setup to restart. Check tokencanary logs for errors.
  • Hooks and Cursor/Claude Code: Token Canary hooks are designed to fail open. If the daemon is down, the hook config is missing, or the request times out, prompts are passed through unchanged and the host is never blocked. You only get optimization when the daemon is running and responds successfully.

Support

  • Homepage: npm package
  • Issues and billing: Use the support channel provided with your subscription or trial.

License

Proprietary. See LICENSE file.