跳到主要内容
    ↑↓ 选择↵ 打开esc 关闭
    中文English
    involvex

    Create Opencode

    v0.0.1工具与命令
    @involvex/create-opencode-plugin

    Create a new OpenCode plugin with a single command

    GitHub 星标

    0

    月装机量

    26

    近 7 天 26

    综合评分SCORE

    28.2

    生态多维模型

    最近提交

    17 天前

    2026-08-02

    快速安装与配置

    opencode.json

    写入当前项目的 opencode.json,只对这个仓库生效。

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["@involvex/create-opencode-plugin@0.0.1"]
    }

    opencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。

    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
    • Prettier + ESLint for linting and formatting
    • bun dev - run OpenCode with your plugin loaded from source
    • bun check - run all checks (format, lint, typecheck)
    • npm publish ready

    Plugin structure

    my-plugin/
      src/
        index.ts     # Plugin entry point
      dev.ts         # Development script
      package.json
      tsconfig.json
      eslint.config.js
      .prettierrc.json
      .prettierignore
      .gitignore
      README.md
    

    License

    MIT