Commandcode
OpenCode plugin for CommandCode
0
0
20.0
生态多维模型
1 小时前
2026-09-12
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@falentio/opencode-commandcode@0.1.0"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@falentio/opencode-commandcode@0.1.0"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D @falentio/opencode-commandcodeOpenCode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
An OpenCode plugin for CommandCode.
Install
Add the plugin to your opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@falentio/opencode-commandcode"]
}
OpenCode installs npm plugins automatically with Bun at startup.
What it does
- Logs plugin initialization and session-idle events via
client.app.log. - Registers a
commandcodetool that OpenCode can call.
commandcode: <command> (<directory>)
Development
Requires Node 24+ and pnpm.
pnpm install
pnpm dev # vp pack --watch
pnpm typecheck # tsc --noEmit
pnpm test # vp test
pnpm build # vp pack
Build output goes to dist/ (ESM + type declarations) via vp pack (tsdown).
Project layout
| Path | Purpose |
|---|---|
src/index.ts |
Plugin entry, exports CommandCodePlugin |
src/index.test.ts |
Vitest tests |
vite.config.ts |
Vite+ config, incl. the pack block |
.github/workflows/ci.yml |
Typecheck, build, test on PR/push |
.github/workflows/publish.yml |
Trusted publishing on v* tags |
Releasing
Publishing uses npm trusted publishing over GitHub Actions OIDC. No npm token is stored in the repo.
One-time npm setup (package → Settings → Trusted publishing → GitHub Actions):
- Organization or user:
falentio - Repository:
opencode-commandcode - Workflow filename:
publish.yml - Allowed actions:
npm publish
Then cut a release:
pnpm release # bumpp: bump version, commit, tag
git push --follow-tags
The v* tag triggers .github/workflows/publish.yml, which builds and runs pnpm publish. Provenance attestations are generated automatically.
repository.urlinpackage.jsonmust exactly match the GitHub repo, or npm will reject the OIDC publish.
License
MIT
同类生态推荐
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
Commandcode
@herouucn/opencode-commandcode
Inject Command Code API provider into opencode — access Claude, GPT, Gemini, DeepSeek, Qwen, Kimi, GLM, MiniMax & Step via unified Command Code API. / 将 Command Code API provider 注入 opencode —— 通过统一的 Command Code API 使用 Claude、GPT、Gemini、DeepSeek、Qwen、Kim
With Claude
opencode-with-claude
OpenCode plugin to use your Claude Max subscription via Meridian proxy