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

commandcode-token-metrics

v0.1.0

Published

Live tokens-per-second meter for Command Code, rendered in the footer status line.

Readme

commandcode-token-metrics

A live tokens-per-second meter for Command Code, drawn in the footer under the input panel.

The tokens-per-second meter in the Command Code footer, under the input panel

Install

cmd mods add /path/to/commandcode-token-metrics -g

Then start a new session, or run /reload. There is no build step; Command Code compiles the mod at load time.

What you get

While the model streams, one line in the footer shows a VU-style graph of generation speed, one column per second, coloured red, yellow or green against slowTps and fastTps:

tok/s ▃▆▇▇█▆▄█▆ 43.0 ▲2% · avg 41.0 · pk 45.0 · ttft 0.8s

/tps prints the last run's numbers, and a one-line summary lands in the feed when a run finishes.

Options

Flags are set at launch with --mod-option name=value, repeatable. An unparseable value falls back to its default rather than throwing.

cmd --mod-option vuColumns=20 --mod-option slowTps=15

| Option | Default | What it does | | --- | --- | --- | | enabled | true | Render the meter at all | | rollingWindowMs | 5000 | Averaging window for the live rate | | idleTimeoutMs | 1500 | Silence after which the rate reads as inactive | | minSpanMs | 300 | Floor on the elapsed span so early samples don't spike | | vuColumns | 12 | Most seconds of history shown in the graph | | vuScale | auto | auto scales to the run peak, fixed uses vuFullTps | | vuFullTps | 50 | Full-scale tokens/sec when vuScale is fixed | | slowTps | 10 | Below this is red | | fastTps | 30 | At or above this is green | | showVu | true | Show the graph | | showTrend | true | Show the trend arrow | | showAvg | true | Show the run average | | showPeak | true | Show the peak | | showTtft | true | Show time to first token | | showTokenCount | false | Show the token counter, footer only | | showElapsed | false | Show elapsed time, footer only | | alwaysShow | false | Keep the meter visible when idle | | idleText | idle | What alwaysShow reads when there is no data | | label | tok/s | Leading label | | feedSummary | true | Print a one-line summary when a run ends | | statusLog | (unset) | Debug: append every painted status line to this file |

Also for OpenCode

The same meter exists for the OpenCode TUI: opencode-token-metrics.

Development

npm test        # unit tests
npm run typecheck
npm run smoke   # packs the tarball and drives the mod against a fake host
npm run ci      # all of the above, plus npm pack --dry-run

Notes for coding agents are in AGENTS.md.

Built with Command Code

One Command Code CLI session, 82 turns, $0.18 in tokens.

License

MIT