Ecosystem Manager
Browse and toggle official and awesome-opencode community plugins from one tool, slash command, or local dashboard, with guarded install/uninstall and update checks that include the manager itself.
2
近 30 天 +1
0
26.0
生态多维模型
1 天前
2026-10-20
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-ecosystem-manager@0.3.2"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-ecosystem-manager@0.3.2"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D opencode-ecosystem-managerOpenCode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
A single control plane for the OpenCode plugin ecosystem. Browse the official
ecosystem plus the much larger awesome-opencode community list, check V1/V2
compatibility and npm availability, and toggle installs without editing
opencode.json(c) by hand.
Why
The OpenCode ecosystem page lists dozens of plugins, but trying one means editing global configuration, remembering which packages you added, and cleaning up manually when an experiment does not work out. Ecosystem Manager keeps that bookkeeping in one place:
- Catalog in the loop. 39 official plugins plus 122 community plugins (161 total) with a short description, V1/V2 compatibility, and npm status.
- Community-aware. Every entry is marked
officialorawesome-opencode, and the dashboard can filter on either source. - Per-plugin switches. Turning a switch on installs that package; turning it off uninstalls it.
- Ownership tracking. It only removes packages it installed. Plugins you added yourself are never touched.
- Guarded installs. A package must resolve on npm and be loadable by OpenCode V2 before the switch flips.
- Upgrade checks. Compare installed package plugins with npm, including the manager itself, and upgrade one or all without leaving the tool or dashboard.
- Local dashboard. Search, filter, and toggle from a browser UI bound to
127.0.0.1. - No JSONC damage. Installs and removals go through
opencode plugin add/remove, so comments and unrelated settings survive.
Sources
- Official: https://opencode.ai/docs/ecosystem#plugins
- Community: https://github.com/awesome-opencode/awesome-opencode
The community snapshot is generated by
scripts/build-awesome-catalog.mjs. It reads the upstream registry, resolves
each project's npm package from its package.json, and records whether the
package looks V2-compatible, V1-only, or unverified. Community entries can be
V1-only, unpublished, or missing an npm package; those entries stay visible but
cannot be switched on.
Requirements
- OpenCode 2.x
- The
opencodeCLI onPATH, or anOPENCODE_CLIenvironment variable that points to the binary. The desktop app's bundled CLI is detected automatically.
Install
opencode plugin add opencode-ecosystem-manager
Or add it to ~/.config/opencode/opencode.json(c) manually:
{
"$schema": "https://opencode.ai/config.json",
"plugins": ["opencode-ecosystem-manager"]
}
Reload OpenCode after installing.
Usage
Ask the agent to call the ecosystem_manager tool, or use the slash command:
/ecosystem ui # open the browser dashboard
/ecosystem list # catalog, without refreshing npm
/ecosystem check # refresh npm status, then list
/ecosystem status # master switch and selected plugins
/ecosystem on opencode-tavily # enable and install
/ecosystem off opencode-tavily # disable and uninstall
/ecosystem enable # enable master switch, install selections
/ecosystem disable # disable master switch, uninstall managed
/ecosystem sync # reconcile config with saved state
/ecosystem updates # check installed plugins for updates
/ecosystem upgrade # upgrade every outdated plugin
/ecosystem upgrade opencode-tavily # upgrade one plugin
on, off, and upgrade accept multiple names at once. Names may be catalog
names or npm package names. Packages outside the catalog are also accepted and
installed as-is.
Upgrade checks include the manager itself. When it was installed from npm it is just another configured package and can update itself; when it runs from a local directory it is reported as a local build that cannot self-update. Restart OpenCode after a manager self-update.
Dashboard
/ecosystem ui starts a dashboard on 127.0.0.1 (port 47821 when free,
otherwise an ephemeral port) and opens it in the default browser. It provides:
- Search and filtering across all 161 official and community entries
- Source filters for official vs community plugins
- Descriptions, V1/V2 compatibility, and live npm status
- Per-plugin switches plus a master switch
- Update checks with per-plugin current → latest versions, one-click upgrade, and an upgrade-all action (the manager is included)
- npm refresh and manual sync
- A one-time access token exchanged for an
HttpOnly,SameSite=Strictcookie; API requests also validateOrigin
The server lives with the OpenCode process, so the plugin reload triggered by
an install or uninstall does not tear down the dashboard. Run /ecosystem ui
again after restarting OpenCode.
Safety rules
- Only the global config at
~/.config/opencode/opencode.jsonis changed, and only throughopencode plugin add/remove. - Only packages recorded as managed in
state.jsonare uninstalled. - A switch is refused when npm returns 404, the package is deprecated, or the registry cannot be reached.
- Entries marked
v1ornoneare refused because OpenCode V2 cannot load them. V2 and unverified community packages are allowed; unverified entries carry a warning and may not load. - Community entries without an npm package are listed but cannot be switched on.
- Upgrade checks cover package plugins in the global config; local, git, and file-based plugins are reported but never updated automatically.
- Turning the master switch off keeps the selection and uninstalls every managed package. Turning it back on reinstalls them.
- State is synchronized about two seconds after load and again after a configuration-triggered reload.
Files and state
src/index.ts— tool and/ecosystemcommand registration, auto-syncsrc/manager.ts— reconciliation, update checks, CLI calls, textual outputsrc/ui.ts— local HTTP server, tokens, APIsrc/ui.html— dashboardsrc/catalog.ts— official catalog plus merge/deduplication logicsrc/awesome-catalog.ts— generated awesome-opencode community snapshotscripts/build-awesome-catalog.mjs— regenerates the community snapshotsrc/npm.ts— npm registry checks with a 30-minute cachesrc/paths.ts— config discovery, JSONC parsing, state I/O
State file: ~/.local/share/opencode/ecosystem-manager/state.json
The official catalog is maintained by hand. The community catalog is a snapshot; refresh it when the upstream list or package metadata changes:
npm run refresh:catalog
Development
npm install
npm run typecheck
npm run pack:dry
npm run refresh:catalog # requires network access to GitHub and npm
To load the checkout without publishing, point OpenCode at the directory:
{
"plugins": ["/absolute/path/to/OpencodeDesktopPluginManager"]
}
License
MIT
同类生态推荐
Oc Solomemory
oc-solomemory
Persistent memory plugin for OpenCode — your AI agent remembers across sessions and projects
Oc Solomemory Dev
oc-solomemory-dev
Persistent memory plugin for OpenCode — your AI agent remembers across sessions and projects
Commandcode
@brainervirus/opencode-commandcode
Command Code API provider for opencode — use Claude, GPT, Gemini, DeepSeek, Qwen, Kimi, GLM, MiniMax, and Step models via Command Code