GitHub 星标
0
月装机量
10
近 7 天 3
综合评分SCORE
15.8
生态多维模型
最近提交
6 个月前
2026-02-04
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["create-opencode-plugin@0.0.1"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["create-opencode-plugin@0.0.1"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D create-opencode-pluginopencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
README.md
查看原始文件→Scaffold a new OpenCode plugin with a single command.
Usage
bun create opencode-plugin my-plugin
cd my-plugin
bun install
bun dev
Or create in the current directory:
bun create opencode-plugin .
What's included
- TypeScript configuration
- Build setup with Bun
- oxlint + oxfmt for linting and formatting
bun dev- run OpenCode with your plugin loaded from sourcebun check- run all checks (format, lint, typecheck)npm publishready
Plugin structure
my-plugin/
src/
index.ts # Plugin entry point
dev.ts # Development script
package.json
tsconfig.json
.oxlintrc.json
.oxfmtrc.json
.gitignore
README.md
License
MIT