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-helper-cli

v0.0.6

Published

CLI tool for managing opencode plugins

Readme

opencode-helper-cli

opencode 辅助 CLI 工具,用于管理 opencode 插件。

安装

npm install -g opencode-helper-cli
# 或
pnpm add -g opencode-helper-cli

使用

och plugin list            # 列出项目级插件及版本
och plugin list -g         # 列出全局插件及版本
och plugin upgrade         # 升级所有项目级插件
och plugin upgrade -g      # 升级所有全局插件
och plugin upgrade -i      # 交互式选择要升级的插件
och plugin upgrade <name>  # 升级指定插件

命令

och plugin list

列出 opencode 插件及其当前版本和最新版本。

| 标志 | 缩写 | 说明 | |------|------|------| | --global | -g | 列出全局安装的插件 |

och plugin list
och plugin list -g

输出示例:

┌───────────────────────┬────────────┬────────────┐
│ 插件                  │ 当前版本    │ 最新版本    │
├───────────────────────┼────────────┼────────────┤
│ @scope/plugin-a       │ 1.0.0      │ 1.2.0      │
│ plugin-b              │ 未安装      │ 2.0.0      │
└───────────────────────┴────────────┴────────────┘

och plugin upgrade

升级 opencode 插件到最新版本。支持 npm 包和 git 仓库两种插件类型。

| 标志 | 缩写 | 说明 | |------|------|------| | --global | -g | 升级全局插件 | | --interactive | -i | 交互式选择要升级的插件 |

och plugin upgrade                          # 升级全部项目级插件
och plugin upgrade -g                       # 升级全部全局插件
och plugin upgrade -i                       # 交互式选择升级
och plugin upgrade @scope/plugin-a          # 升级指定插件
och plugin upgrade foo bar -g               # 升级多个全局插件

输出示例:

┌───────────────────┬────────────┬────────────┬──────────┐
│ 插件              │ 升级前版本  │ 升级后版本  │ 状态     │
├───────────────────┼────────────┼────────────┼──────────┤
│ @scope/plugin-a   │ 1.0.0      │ 1.2.0      │ ✅ 已升级 │
│ plugin-b          │ —          │ —          │ ⏭️ 跳过   │
└───────────────────┴────────────┴────────────┴──────────┘

配置文件

工具会读取 opencode 的配置文件,支持两种来源:

项目级配置

在当前目录向上查找,按优先级依次查找:

  • opencode.json
  • .opencode.json

全局配置

| 平台 | 路径 | |------|------| | Linux | $XDG_CONFIG_HOME/opencode/opencode.json~/.config/opencode/opencode.json | | macOS | ~/Library/Application Support/opencode/opencode.json | | Windows | %APPDATA%/opencode/opencode.json |

配置文件示例(支持 JSONC 注释):

{
  "plugin": [
    "@scope/[email protected]",         // npm 固定版本
    "@scope/plugin-b@latest",        // npm 最新版本
    "plugin-c@git+https://github.com/user/plugin-c.git"  // git 仓库
  ]
}

开发

pnpm install         # 安装依赖
pnpm run build       # 编译 TypeScript
pnpm run test        # 运行测试
pnpm run lint        # ESLint 检查
./bin/dev.js plugin list  # 开发模式运行命令

License

MIT