> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dropcv.work/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenCode

> 开源 AI 编程 TUI，支持 MCP 和多提供商，本地优先。

<Frame>
  <img src="https://mintcdn.com/dropcv-77/IwNk1CkIuaf50zXX/images/integration/opencode-github.png?fit=max&auto=format&n=IwNk1CkIuaf50zXX&q=85&s=ef24b089f2d401f012c6b5b5d96b5c42" alt="OpenCode 界面" width="1280" height="6126" data-path="images/integration/opencode-github.png" />
</Frame>

OpenCode 是一款开源的 AI 编程 TUI（终端 UI），支持多种 LLM 提供商和 MCP 协议，本地优先。

## 安装

<Steps>
  <Step title="安装 OpenCode">
    ```bash theme={null}
    # macOS
    brew install sst/tap/opencode

    # 或者使用 Go 安装
    go install github.com/sst/opencode@latest
    ```
  </Step>

  <Step title="初始化项目">
    ```bash theme={null}
    opencode init
    ```

    这会在当前目录创建配置文件。
  </Step>

  <Step title="配置 MCP Server">
    在项目根目录的 `opencode.json` 中添加 MCP 配置：

    ```json theme={null}
    {
      "mcp": {
        "dropcv": {
          "url": "https://api.dropcv.work/api/external/v1/mcp/mcp",
          "headers": {
            "Authorization": "Bearer <你的 API Key>"
          }
        }
      }
    }
    ```
  </Step>

  <Step title="启动并使用">
    ```bash theme={null}
    opencode
    ```

    在 TUI 界面中直接输入指令操作人才库。
  </Step>
</Steps>
