--- id: OpenCode title: "OpenCode" type: entity tags: [ai-agent, coding-agent, open-source] aliases: [opencode-ai] --- ## Definition OpenCode 是由 [[BloopAI]] 开发的开源 AI 编码 Agent,提供终端界面、桌面应用和 IDE 扩展三种形态。支持任意 LLM Provider,可通过 API Key 配置。 ## Core Properties - **类型**:产品/项目 - **开发商**:[[BloopAI]] - **开源**:是 - **官网**:https://opencode.ai - **安装命令**:`curl -fsSL https://opencode.ai/install | bash` ## Key Features - 支持任意 LLM Provider(通过 API Key 配置) - 提供 OpenCode Zen 托管服务(预配置模型) - Plan 模式和 Build 模式切换(Tab 键) - 支持 /undo 和 /redo 命令 - 支持拖拽图片到终端 - 支持对话分享 - 主题定制、快捷键定制、代码格式化器定制 - 自定义命令功能 ## Usage Patterns 1. 初始化项目:`opencode` 进入项目后运行 `/init`,生成 `AGENTS.md` 文件 2. 创建计划:使用 Tab 键切换到 Plan 模式 3. 构建代码:使用 Tab 键切换到 Build 模式 4. 代码问答:使用 `@` 键模糊搜索项目文件 ## Related Entities - [[BloopAI]]:开发商 - [[Vibe-Kanban]]:集成了 OpenCode 作为支持的编码 Agent - [[AGENTS-md]]:OpenCode 初始化时生成的项目说明文件 ## Connections - [[OpenCode]] ← 开发 ← [[BloopAI]] - [[Vibe-Kanban]] ← 支持 ← [[OpenCode]] - [[OpenCode]] ← 生成 ← [[AGENTS-md]]