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

@standardagents/sc-system-stats-plugin

v0.1.3

Published

CPU, memory, and disk statistics for Standard Code machines

Readme

Resource monitor

Public npm package: @standardagents/sc-system-stats-plugin.

standard plugin install @standardagents/sc-system-stats-plugin --accept-capabilities surfaces

The package uses the published Standard Code plugin SDK. Its plugin ID stays resource-monitor so upgrades retain configuration and account state.

This example draws one line inside its machine's frame in the sidebar: CPU, memory, and disk use, with a sparkline of recent CPU load.

The plugin draws that line itself. It publishes a one-row canvas to a machine.after slot and writes ANSI to it: icons, a chart for CPU and for memory on the true 0% to 100% scale, and the disk value. Standard Code puts the row in the machine card's footer and gives the footer its tint and edges; render.mjs decides every cell inside. A cell in the default colour shows the footer's tint.

The canvas also publishes one line of hover metadata. After the host's short hover delay, it shows the current CPU and memory percentages beside their rolling one-minute averages. A ~ marks an average based on a partial or gapped history, and n/a marks a missing current value or history window. The host owns hover placement and dismissal, so the same detail is available when a viewer is looking at another machine's card.

The plugin reads every value itself and needs nothing from Standard Code beyond the SDK. sample.mjs takes a reading every five seconds:

  • CPU use is the busy share of processor time between two os.cpus() readings, summed over every core. The first reading has no interval, so CPU shows unavailable for the first five seconds.
  • Memory comes from vm_stat on macOS, where os.freemem() counts file cache as used. Other platforms use os.totalmem() and os.freemem().
  • Disk is the volume that holds the user's home directory, read with fs.statfs.

A reading outside its valid range shows unavailable instead of a number.

The sparkline keeps two minutes of history. The plugin saves that history with ctx.state once a minute, under a key that carries the machine id. Standard Code stores ctx.state in the user's account and shares it across their machines, so a key per machine keeps one machine from replacing the history of another. After a restart, samples newer than two minutes return to the sparkline.

SDK compatibility

Hover requires the public SDK 1.0.0-alpha.5-usage.0 or a compatible later version, plus a native client that renders canvas hover metadata. The plugin uses Canvas.replace from that package. Its tests use the public /testing export. The workspace pins its SDK development dependency to the same published version used for this feature's native runtime.

The hover uses the owning machine's background tint. CPU and memory labels and current values are bold. Usage values are green below 60%, amber from 60%, and red from 85%; one-minute averages use the same thresholds. The plugin publishes a styled span array in the public hover field.