微元熵减VYAGENT
RADAR #11 · 2026-11-28 · CLI Agent · Coding终端 Agent · 编程工具

OpenCode

MIT-licensed terminal AI coding agent with 75+ LLM providers, built-in Plan/Build modes, and native MCP + ACP support.MIT 开源终端 AI 编程 Agent:支持 75+ 模型厂商、Plan/Build 双模式,并原生兼容 MCP 与 ACP 协议。

VYAGENT RADAR #11 OpenCode CLI Agent · Coding

01 Friction Solved消除的小摩擦

Proprietary terminal coding agents lock developers into a single model vendor, opaque billing tiers, and one editor ecosystem. OpenCode removes that lock-in: it runs natively in your terminal, connects to 75+ cloud and local model providers (including Anthropic, OpenAI, Gemini, OpenRouter, Groq, and Ollama), and exposes an Agent Client Protocol (ACP) bridge so editors like Zed, JetBrains, and Neovim share the exact same agent backend.闭源终端编程 Agent 往往把开发者绑定在单一厂商模型、固定订阅套餐和特定 IDE 里。OpenCode 彻底打破这种锁定:它在终端原生运行,可自由接入 75+ 家云端和本地模型(Anthropic、OpenAI、Gemini、OpenRouter、Groq、Ollama 等),还原生支持 ACP(Agent Client Protocol),让 Zed、JetBrains 和 Neovim 共享同一套开源 Agent 引擎。

02 Best-Fit Scenarios最适合的使用场景

  • Switching cleanly between a read-only Plan mode (architecture & codebase exploration) and a Build mode (file edits & test execution) via Tab without risking accidental writes.
  • Pairing frontier models for planning with free-tier APIs or local `qwen3-coder:30b` via Ollama for routine refactors and test generation.
  • Running `opencode acp` inside ACP-compatible editors or connecting custom MCP servers (GitHub, Playwright, SearXNG) from a single declarative config.
  • 通过 Tab 键在只读的 Plan 模式(架构探索、阅读代码)和 Build 模式(实际改文件、跑测试)间无损切换,避免探索阶段误改代码。
  • 用顶级模型做架构拆解,再切到免费 API 或本地 Ollama(如 `qwen3-coder:30b`)完成常规重构与单元测试生成,大幅压低 Token 成本。
  • 通过 `opencode acp` 接入支持 ACP 的现代编辑器,并在同一份配置里挂载 GitHub、Playwright、SearXNG 等 MCP 工具。

03 Human & Agent Setup人类与 Agent 快速接入

Install OpenCode & Launch in Terminal or ACP Editor Mode安装 OpenCode 并启动终端或 ACP 编辑器模式
# Install via official script or npm / Homebrew
curl -fsSL https://opencode.ai/v2/install | bash
# Or: npm install -g @opencode/cli@latest

# Launch interactive TUI in your repository
opencode

# Or expose OpenCode as an ACP agent backend for Zed / JetBrains / Neovim
opencode acp --cwd /path/to/your-project

04 Reality Check & Trade-offs真实边界与局限

  • Multi-provider freedom means tool-calling reliability depends heavily on the underlying model you pick—weak 7B local models may loop on complex multi-file edits.
  • Loading 10+ heavy MCP servers simultaneously inflates every turn’s system prompt; keep only task-relevant MCP servers enabled per project.
  • Fast-moving releases can occasionally change config schemas between minor versions—pin versions in team setups and check release notes before upgrading.
  • 多模型自由度意味着工具调用稳定性强依赖你选的底层模型;参数过小的本地模型在复杂多文件改动时容易陷入死循环。
  • 同时挂载十几个重型 MCP 服务会显著拉高每轮对话的 System Prompt Token 消耗,建议按项目按需开启 MCP。
  • 社区迭代极快,小版本间偶有配置项调整,团队协作建议锁定 CLI 版本并关注更新日志。

05 Why VYAGENT Picked ItVYAGENT 选品评语

OpenCode is the closest thing to a true open-source Swiss Army knife for terminal coding agents—especially valuable if you already care about MCP, ACP, and multi-provider cost routing.OpenCode 是目前最接近“开源瑞士军刀”的终端编程 Agent,尤其适合看重 MCP、ACP 标准化协议和跨平台省钱路由的工程师。

Compare verified free tiers and 2026 Apache 2.0 local coding models (Qwen3-Coder 30B, Devstral 24B) before wiring up your provider config.配置模型前,先对比各家已核查免费 API 额度及 2026 本地开源编程模型(Qwen3-Coder 30B、Devstral 24B)。

Pair OpenCode with verified free APIs & local models on FreeTokenBox →在 FreeTokenBox 为 OpenCode 搭配免费 API 与本地 Ollama 模型 →

06 Frequently Asked Questions常见问题 (FAQ)

How does OpenCode differ from Claude Code and Aider?OpenCode 和 Claude Code、Aider 的核心区别是什么?

Unlike Claude Code (tied primarily to Anthropic’s stack), OpenCode is MIT-licensed and provider-agnostic across 75+ LLMs. Compared to Aider’s git-diff chat loop, OpenCode adds a richer TUI, native MCP tool routing, Plan/Build modes, and ACP editor integration.相比绑定 Anthropic 生态的 Claude Code,OpenCode 采用 MIT 开源协议且支持 75+ 厂商;相比专注 Git Diff 对话流的 Aider,OpenCode 额外提供了完整 TUI、原生 MCP 工具路由、Plan/Build 双模式与 ACP 编辑器协议。

Can I use OpenCode completely offline with Ollama?可以完全断网配合本地 Ollama 使用 OpenCode 吗?

Yes. Point OpenCode at your local Ollama endpoint (`http://localhost:11434/v1`) with a strong tool-calling coding model such as `qwen3-coder:30b` or `devstral:24b` for zero-cost private coding.可以。把 OpenCode 的模型端点指向本地 Ollama(`http://localhost:11434/v1`),搭配支持工具调用的 `qwen3-coder:30b` 或 `devstral:24b` 即可零成本离线编程。