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

@dev4s/opencode-command-stats

v0.1.1

Published

OpenCode plugin that tracks usage statistics for user-defined commands

Downloads

9

Readme

OpenCode Command Stats

An OpenCode plugin that tracks usage statistics for user-defined commands.

Features

  • Tracks how many times each command is used
  • Records the last time each command was executed
  • Excludes built-in OpenCode commands by default (configurable)
  • Optional debug logging with date-based rotation
  • View statistics via stats-commands tool

Installation

Add to ~/.config/opencode/opencode.json:

{
  "plugin": ["@dev4s/opencode-command-stats"]
}

Then restart OpenCode.

Usage

Once installed, the plugin automatically tracks command usage. To view statistics, run the stats-commands tool.

Example Output

| Command      | Uses | Last Used  |
|--------------|------|------------|
| deploy       | 42   | 2025-01-09 |
| run-tests    | 15   | 2025-01-08 |
| format-code  | 3    | 2025-01-05 |

Configuration

The plugin creates a configuration file at: ~/.config/opencode/command-stats-config.json

Default Configuration

{
  "excludeCommands": [
    "init", "review",
    "read", "write", "edit", "multiedit",
    "glob", "grep", "bash", "task",
    "todowrite", "todoread",
    "webfetch", "websearch", "codesearch",
    "skill", "question",
    "stats-commands"
  ],
  "debug": true
}

Options

| Option | Type | Default | Description | | ----------------- | ---------- | ------- | ------------------------------------------------ | | excludeCommands | string[] | (above) | Commands to exclude from tracking | | debug | boolean | true | Enable debug logging (set to false to disable) |

Data Storage

| Path | Purpose | | ------------------------------------------------------- | ---------------------- | | ~/.config/opencode/command-stats-config.json | Plugin configuration | | ~/.local/state/opencode/command-stats.json | Usage statistics | | ~/.config/opencode/logs/command-stats-YYYY-MM-DD.log | Debug logs (if enabled)|

Stats Data Format

{
  "command-name": {
    "count": 5,
    "lastUsed": "2025-01-09"
  }
}

License

UNLICENSED