/plugin 并进入发现标签页浏览可用插件。/plugin install <插件名>@<官方市场名>
/plugin install github@codebuddy-plugins-official
/plugin marketplace add 命令从不同来源添加市场。/plugin market 代替 /plugin marketplace,rm 代替 remove.codebuddy-plugin/marketplace.json 文件的 GitHub 仓库,使用 owner/repo 格式:/plugin marketplace add your-org/codebuddy-plugins
/plugin marketplace add https://gitlab.com/company/plugins.git
/plugin marketplace add git@gitlab.com:company/plugins.git
/plugin marketplace add https://gitlab.com/company/plugins.git#v1.0.0
marketplace.json 文件(用于开发和测试):# 添加包含 .codebuddy-plugin/marketplace.json 的本地目录/plugin marketplace add ./my-marketplace# 直接添加 marketplace.json 文件路径/plugin marketplace add ./path/to/marketplace.json
marketplace.json 文件:/plugin marketplace add https://example.com/marketplace.json
/plugin install <插件名>@<市场名>
/plugin 打开插件管理器.codebuddy/settings.json)。/plugin 进入已安装标签页,查看按作用域分组的插件/plugin 并进入已安装标签页来查看、启用、禁用或卸载插件。输入文本筛选插件列表。/plugin disable <插件名>@<市场名>
/plugin enable <插件名>@<市场名>
/plugin uninstall <插件名>@<市场名>
/plugin install <插件名>@<市场名> --scope project/plugin uninstall <插件名>@<市场名> --scope project
/reload-plugins 无需重启即可加载所有更改:/reload-plugins
/plugin 界面或命令行管理市场。/plugin 并进入市场标签页来:/plugin marketplace list
/plugin marketplace update <市场名>
/plugin marketplace remove <市场名>
/reload-plugins 的通知。/plugin 打开插件管理器FORCE_AUTOUPDATE_PLUGINS=1 和 DISABLE_AUTOUPDATER=1:export DISABLE_AUTOUPDATER=1export FORCE_AUTOUPDATE_PLUGINS=1
语言 | 插件 | 所需二进制文件 |
C/C++ | clangd-lsp | clangd |
C# | csharp-lsp | csharp-ls |
Go | gopls-lsp | gopls |
Java | jdtls-lsp | jdtls |
Kotlin | kotlin-lsp | kotlin-language-server |
Lua | lua-lsp | lua-language-server |
PHP | php-lsp | intelephense |
Python | pyright-lsp | pyright-langserver |
Rust | rust-analyzer-lsp | rust-analyzer |
Swift | swift-lsp | sourcekit-lsp |
TypeScript | typescript-lsp | typescript-language-server |
/plugin 错误标签页中看到 Executable not found in $PATH,请从上表中安装所需的二进制文件。github、gitlabatlassian(Jira/Confluence)、asana、linear、notionfigmavercel、firebase、supabaseslacksentryplugin marketplace add 命令添加市场:/plugin marketplace add your-org/codebuddy-plugins
/plugin 打开插件管理器。这打开一个选项卡界面,您可以使用 Tab 切换标签页(或使用 Shift+Tab 向后切换):/plugin install commit-commands@your-org-codebuddy-plugins
/reload-plugins 激活插件。插件命令按插件名称进行命名空间化,所以 commit-commands 提供命令如 /commit-commands:commit。/commit-commands:commit
.codebuddy/settings.json 来为项目自动安装市场。当团队成员信任仓库文件夹时,CodeBuddy Code 会提示他们安装这些市场和插件。.codebuddy/settings.json 中添加 extraKnownMarketplaces:{"extraKnownMarketplaces": {"my-team-tools": {"source": {"source": "github","repo": "your-org/codebuddy-plugins"}}}}
/plugin 命令不出现:codebuddy --version 查看已安装的版本npm update -g @tencent-ai/codebuddy-codecodebuddy.codebuddy-plugin/marketplace.jsonrm -rf ~/.codebuddy/plugins/cache,重启 CodeBuddy Code 并重新安装插件$PATH 中。检查 /plugin 错误标签页了解详情rust-analyzer 和 pyright 等语言服务器在大型项目上可能消耗大量内存。如果遇到内存问题,使用 /plugin disable <插件名> 禁用插件并依赖 CodeBuddy Code 的内置搜索工具.codebuddy-plugin/marketplace.json:{"name": "company-tools","owner": {"name": "DevTools Team","email": "[email protected]"},"plugins": [{"name": "code-formatter","source": "./plugins/formatter","description": "Automatic code formatting on save","version": "2.1.0"},{"name": "deployment-tools","source": {"source": "github","repo": "company/deploy-plugin"},"description": "Deployment automation tools"}]}
字段 | 类型 | 描述 |
name | string | 市场标识符(kebab-case,无空格) |
owner | object | 市场维护者信息 |
plugins | array | 可用插件列表 |
字段 | 类型 | 描述 |
description | string | 市场简要描述 |
version | string | 市场版本 |
字段 | 类型 | 描述 |
name | string | 插件标识符(kebab-case,无空格) |
source | string/object | 插件获取来源 |
description | string | 插件简要描述 |
字段 | 类型 | 描述 |
version | string | 插件版本 |
author | object | 插件作者信息 |
homepage | string | 插件主页或文档 URL |
repository | string | 源代码仓库 URL |
license | string | SPDX 许可证标识符(如 MIT、Apache-2.0) |
keywords | array | 用于插件发现和分类的标签 |
category | string | 插件分类 |
strict | boolean | 要求插件文件夹中有 plugin.json(默认:true) |
字段 | 类型 | 描述 |
commands | string/array | 命令文件或目录的自定义路径 |
agents | string/array | Agent 文件的自定义路径 |
skills | string/array | Skill 文件的自定义路径 |
hooks | string/object | 自定义 hooks 配置或 hooks 文件路径 |
mcpServers | string/object | MCP 服务器配置或 MCP 配置路径 |
strict: true(默认):插件必须包含 plugin.json 清单文件,marketplace 字段补充这些值strict: false:plugin.json 是可选的。如果缺失,marketplace 条目作为完整的插件清单{"name": "my-plugin","source": "./plugins/my-plugin","description": "My local plugin"}
{"name": "github-plugin","source": {"source": "github","repo": "owner/plugin-repo"},"description": "Plugin from GitHub"}
{"name": "git-plugin","source": {"source": "url","url": "https://gitlab.com/team/plugin.git"},"description": "Plugin from Git URL"}
{"name": "enterprise-tools","source": {"source": "github","repo": "company/enterprise-plugin"},"description": "Enterprise workflow automation tools","version": "2.1.0","author": {"name": "Enterprise Team","email": "[email protected]"},"homepage": "https://docs.company.com/plugins/enterprise-tools","repository": "https://github.com/company/enterprise-plugin","license": "MIT","keywords": ["enterprise", "workflow", "automation"],"category": "productivity","commands": ["./commands/core/","./commands/enterprise/","./commands/experimental/preview.md"],"agents": ["./agents/security-reviewer.md","./agents/compliance-checker.md"],"skills": ["./skills/deployment.md","./skills/monitoring.md"],"hooks": {"PostToolUse": [{"matcher": "Write|Edit","hooks": [{"type": "command","command": "${CODEBUDDY_PLUGIN_ROOT}/scripts/validate.sh"}]}]},"mcpServers": {"enterprise-db": {"command": "${CODEBUDDY_PLUGIN_ROOT}/servers/db-server","args": ["--config", "${CODEBUDDY_PLUGIN_ROOT}/config.json"]}},"strict": false}
${CODEBUDDY_PLUGIN_ROOT} 是一个环境变量,解析为插件的安装目录。.codebuddy-plugin/marketplace.json 并定义插件/plugin marketplace add owner/repo 添加/plugin marketplace add https://gitlab.com/company/plugins.git
/plugin marketplace add https://example.com/path/to/marketplace.json
# 添加本地 marketplace 进行测试/plugin marketplace add ./my-local-marketplace# 测试插件安装/plugin install test-plugin@my-local-marketplace
/plugin marketplace list
/plugin marketplace update marketplace-name
/plugin marketplace remove marketplace-name
export CODEBUDDY_AUTO_UPDATE_THIRD_PARTY_MARKETPLACES=truecodebuddy
autoUpdateThirdPartyMarketplaces: true,为所有第三方市场启用自动更新。/plugin 命令进入插件管理界面MarketplaceFactory 根据配置创建不同类型的市场实例:// 根据源类型创建对应的市场实例switch (sourceType) {case MarketplaceType.Directory:marketplace = new DirectoryMarketplace();break;case MarketplaceType.Github:case MarketplaceType.Git:marketplace = new GithubMarketplace();break;case MarketplaceType.URL:marketplace = new HttpMarketplace();break;default:marketplace = new BaseMarketplace();break;}
.codebuddy-plugin/marketplace.json 文件support(source):判断是否支持该插件源isInstalled(plugin, targetDir):检查插件是否已安装install(plugin, targetDir):安装插件update(plugin, installedPath):更新插件.codebuddy-plugin/marketplace.json--debug 标志查看详细日志codebuddy --debug
# 检查 marketplace.json 格式cat .codebuddy-plugin/marketplace.json | jq
# 手动测试 Git 克隆是否成功git clone https://github.com/owner/repo.git /tmp/test-clone
文档反馈