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

@hu9osaez/commandcode-hud

v0.1.0

Published

One-shot npx installer + native Command Code mod showing model, reasoning effort, context usage and Git branch in the mods status line.

Readme

commandcode-hud

Native Command Code mod that shows workspace and session state in the mods status line, right below the native footer.

gpt-5.6-luna 🧠 xhigh · ctx 4% · 46.8k/1M · main

What it shows

  • Model selected and reasoning effort (🧠 effort).
  • Context used / limit (ctx % · used/limit), computed from usage.inputTokens of the model_request_end event and the model's context window (all 52 official models).
  • Current Git branch (or no-branch when not in a repository).
  • State is persisted and restored when reopening a session or switching sessions.

The mod publishes a single line via cmd.ui.setStatus; the native permission/shortcuts/taste rows are never replaced.

Usage

Run it once with npx — no global install needed:

npx @hu9osaez/commandcode-hud

This installs (or overwrites) the mod at ~/.commandcode/mods/commandcode-hud.ts and verifies the install.

Other commands:

npx @hu9osaez/commandcode-hud --verify      # Check the installed mod matches this package
npx @hu9osaez/commandcode-hud --uninstall   # Remove the installed mod
npx @hu9osaez/commandcode-hud --help        # Show usage

Manual install

mkdir -p ~/.commandcode/mods
cp commandcode-hud.mod.ts ~/.commandcode/mods/commandcode-hud.ts

Verification

cmd mods list

You should see:

commandcode-hud · user · ~/.commandcode/mods/commandcode-hud.ts

Then start a new session:

cmd

The HUD appears as the mod status line, below the Command Code input.

Sessions

  • /reload reloads the mod in the current session.
  • /resume restores an existing session.
  • /new starts a new session.

The mod persists its latest model, effort, context usage and branch via cmd.session.appendCustomEntry.

Context segment

  • Used: usage.inputTokens from the model_request_end event (the same source the TUI uses for current context).
  • Limit: per-model contextWindow map (mirror of Command Code's official registry). IDs match cmd --list-models / config.json.
  • If the model is not in the map, the ctx segment is omitted instead of showing a made-up value.

Command Code 1.14.1 limitations

  • There is no public event for the /model command: a model change is reflected right before the next model request, not necessarily the instant /model runs. The mod compensates by watching ~/.commandcode/config.json and updating when it detects the change.
  • cmd.ui.widget exists in the API but does not render in 1.14.1. cmd.ui.setStatus is the supported surface.

Development

# Exercise mod helpers (branch, model, context limits)
node --input-type=module -e "const m = await import('./commandcode-hud.mod.ts'); console.log(m.__test)"

License

MIT.