开发工作流插件

Glootie OpenCode Plugin是一款集成MCP工具的开发工作流插件,支持自动化代码规范检查和环境保护。

  • by AnEntrypoint
  • JavaScript
  • 本地部署
  • 更新于
在 GitHub 查看 AnEntrypoint/glootie-opencode-plugin

使用说明

Glootie开放代码插件

高级OpenCode插件,集成WFGY、MCP工具和自动化开发工作流。

特性

  • MCP服务器集成:内置对glootie、剧作家和烦恼MCP服务器的支持
  • 开发工作流程:编码标准和做法的自动执行
  • Git验证:防止git与远程不同步时的会话
  • 环境保护:阻止访问.env文件
  • 会话挂钩:会话开始/结束时的上下文加载和验证

安装

选项1:直接克隆(建议用于开发)

cd /path/to/your/project
git clone https://github.com/AnEntrypoint/glootie-opencode-plugin.git .opencode/plugin

选项2:NPM包(即将推出)

npm install -g glootie-opencode-plugin

设置

  1. 安装依赖项:
cd .opencode/plugin
npm install
  1. 配置OpenCode -添加到您的 opencode.json:
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "glootie": {
      "type": "local",
      "command": ["npx", "-y", "mcp-glootie"],
      "enabled": true,
      "timeout": 360000
    },
    "playwright": {
      "type": "local",
      "command": ["npx", "-y", "@playwright/mcp"],
      "enabled": true,
      "timeout": 360000
    },
    "vexify": {
      "type": "local",
      "command": ["npx", "-y", "vexify", "mcp"],
      "enabled": true,
      "timeout": 360000
    }
  }
}
  1. 启动OpenCode:
opencode

可用的MCP工具

配置后,这些MCP工具可用:

  • glootie:代码执行和开发工具
  • 剧作家:浏览器自动化和测试
  • 烦恼:矢量数据库和语义搜索

开发工作流规则

该插件强制执行严格的开发实践:

  • 没有临时/模拟/仿真文件
  • 单一主要实现(无回退)
  • 清除错误记录,不隐藏故障
  • 200行文件大小限制
  • 没有硬编码值
  • 持续重构以实现干净的架构
  • 基于假设的实际执行

使用示例

使用MCP工具

Use the glootie tool to execute this JavaScript code
Use playwright to test this web page
Use vexify to search for similar code patterns

Git验证

在以下情况下,插件将阻止会话:

  • 你在origin/HEAD之前有提交(需要推送)
  • 你在origin/HEAD后面有提交(需要拉取)

环境保护

该插件会自动阻止读取.env文件的尝试。

配置

自定义MCP服务器

您可以在中修改MCP服务器命令 opencode.json:

{
  "mcp": {
    "glootie": {
      "type": "local",
      "command": ["node", "/path/to/custom/glootie.js"],
      "enabled": true
    }
  }
}

禁用MCP服务器

{
  "tools": {
    "glootie": false,
    "playwright": false
  }
}

发展

本地开发

git clone https://github.com/AnEntrypoint/glootie-opencode-plugin.git
cd glootie-opencode-plugin
npm install

测试

# Test plugin loading
node .opencode/plugin/index.js

# Test with OpenCode
opencode

贡献

  1. 复刻仓库
  2. 创建要素分支
  3. 遵循中的开发工作流规则 start.md
  4. 提交拉取请求

许可证

MIT许可证-有关详细信息,请参阅许可证文件

支持

  • 在GitHub上创建问题
  • 加入OpenCode Discord
  • 检查 OpenCode文档