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

opencode-plugin-auto-update

v0.3.1

Published

OpenCode plugin that auto-updates plugins in the background

Readme

Opencode Plugin Auto-Update

npm version License: MIT

Automatically updates OpenCode plugins in the background on startup. No prompts, no blocking IO, and minimal logging by default.

🚀 Overview

  • Runs a background update pass on startup
  • Throttled to once every 24 hours
  • Uses a lock file to prevent concurrent runs
  • Updates to latest by default (optional pin-preserving mode)

✨ Features

  • Zero startup delay (async, detached update)
  • Bun-first installs with npm fallback
  • Shows a brief toast summary after updates
  • Skips local/path/git plugins

📦 Installation

🤖 Let an LLM do it (Recommended)

Paste this into any LLM agent (OpenCode, Claude Code, Cursor, etc.):

Install the opencode-plugin-auto-update plugin by following: https://raw.githubusercontent.com/AnganSamadder/opencode-plugin-auto-update/main/README.md

To install this plugin, please perform the following steps for the user:

  1. Install the NPM package globally:

    bun add -g opencode-plugin-auto-update
    # or
    npm install -g opencode-plugin-auto-update
  2. Configure OpenCode: Add "opencode-plugin-auto-update" to the plugin array in the user's config file (usually ~/.config/opencode/opencode.json).

     {
       "plugin": [
         "opencode-plugin-auto-update"
       ]
     }
  3. Verify & Finalize: Tell the user: "Installation complete! Your OpenCode plugins will now update automatically in the background."

👤 For Humans (Manual)

  1. Install:

    bun add -g opencode-plugin-auto-update
    # or
    npm install -g opencode-plugin-auto-update
  2. Enable the plugin: Add "opencode-plugin-auto-update" to ~/.config/opencode/opencode.json:

     {
       "plugin": [
         "opencode-plugin-auto-update"
       ]
     }
  3. Restart OpenCode: The plugin runs on the next OpenCode startup.

🛠️ How it works

  1. On startup, schedules a background update task.
  2. Applies a 24h throttle and lock to avoid repeated updates.
  3. Installs latest versions into ~/.config/opencode/node_modules.
  4. Rewrites opencode.json plugin versions to the latest (unless pinned).

⚙️ Configuration

Configure via environment variables:

| Variable | Default | Description | |----------|---------|-------------| | OPENCODE_AUTO_UPDATE_DISABLED | false | Disable all updates when true | | OPENCODE_AUTO_UPDATE_INTERVAL_HOURS | 24 | Throttle interval in hours | | OPENCODE_AUTO_UPDATE_PINNED | false | Preserve pinned versions | | OPENCODE_AUTO_UPDATE_BYPASS_THROTTLE | false | Ignore throttle (useful for testing) |

Local Config File

You can bypass throttling without relying on CLI flags by creating:

~/.config/opencode/opencode-plugin-auto-update.json

{
  "ignoreThrottle": true
}

❓ Troubleshooting

  1. Updates not running: ensure OPENCODE_AUTO_UPDATE_DISABLED is not set to true.
  2. No logs: confirm the plugin is enabled and watch for the "Auto-update logs" output after startup.
  3. Plugin not loading: check the plugin array in ~/.config/opencode/opencode.json.
  4. Testing updates: set OPENCODE_AUTO_UPDATE_BYPASS_THROTTLE=true or the local config ignoreThrottle=true.

🚀 Release Process

  1. Land changes on main using conventional commits.
  2. The Release workflow opens a Release Please PR with version + changelog updates.
  3. Merge the Release Please PR to create the tag + GitHub release.
  4. The Publish workflow (environment: release) builds and publishes to npm via OIDC.

📄 License

MIT

🙏 Acknowledgements

Inspired by opencode-agent-tmux and the OpenCode plugin ecosystem.