跳到主要内容Skip to main content
Agent 框架与编排Agent Frameworks & Orchestration生产可用Production

OpenCode

anomalyco / opencode

终端里的开源 coding agent:build / plan 双 agent、LSP 反馈、75+ 模型提供商,另有桌面 beta。An open-source coding agent in the terminal: separate build and plan agents, LSP feedback, 75+ model providers and a desktop beta.

228.0k stars 30948 forks TypeScript 语言Language MIT 许可License 最近推送Last push 2026-11-20

为什么选Why choose it

  • build 与 plan 两个内置 agent 用 Tab 切换:plan 默认只读、改文件要许可,适合先读仓库再动手。Plan and build modes separate reasoning from edits.
  • 75+ provider,不锁模型;TUI 之外还有 macOS / Windows / Linux 桌面 beta。LSP feedback gives the agent compiler-level signals.
  • 2026 年 star 最高的开源 coding agent 之一,MIT,社区迭代快,适合当日常终端 coding harness。Broad provider support avoids a single-model lock-in.

不适合Not for

GUI 优先的人会更喜欢 IDE 插件或桌面 agent;TUI 需要一点终端习惯。You need a mature IDE plugin rather than a terminal-first tool.
不同 provider 的工具调用质量不一致;换模型后要重跑自己的评测,不要假设行为相同。You cannot run commands in a disposable checkout.

最小上手Minimum setup

  1. 用 npm / brew / 安装脚本装好,先 `opencode` 打开一个测试仓库,切到 plan 模式读代码。Open a disposable repository and start in plan mode.
  2. 接一个 provider,跑一个只改一个文件的小任务,检查 diff 与权限提示。Ask for a small change, review the diff, then run the tests.
  3. 再开 build 模式跑测试与修复,观察 LSP 报错、工具调用与回滚。Check how LSP errors feed back before enabling auto-edit.

依赖与成本Dependencies and cost

Node.js / npm 或 brew;模型 provider key;git 仓库;可选桌面端。Check runtime, model weights and external service dependencies in the README.

许可与使用边界License and usage boundaries

代码 MIT;模型 provider 与可选付费网关另有条款。Code is MIT; model weights, training data and generated content may have separate terms — check each before commercial use.

开源不等于可商用:GPL / AGPL 有传染性;代码许可、模型许可、生成内容许可要分开看。上线前读仓库 LICENSE 与模型卡,必要时让法务确认。Open source is not automatically commercial-use friendly: GPL / AGPL are copyleft; code, model and output licenses are separate. Read the LICENSE and model card before launch, and involve legal when needed.

替代与相邻Alternatives and neighbors

  • Codex CLI — 生产可用Production,OpenAI 的本地 coding agent:Rust 实现、OS 级沙箱、MCP 与云任务交接,适合终端里改代码。OpenAI’s local coding agent: Rust binary, OS-level sandbox, MCP and cloud-task handoff, built for editing code in the terminal.
  • OpenHands — 生产可用Production,能读代码、改代码、跑命令的软件工程 agent,提供 CLI、Web 界面与沙箱运行时,可接本地或云端模型。A software-engineering agent that can read code, edit it and run commands, with CLI, web UI and a sandboxed runtime.
  • DeepSeek Harness — 先试这个Start here,DeepSeek 的插件化 agent harness(dsh):一切皆插件,本地 Web UI 一条命令起,面向多模型、多工具的长期任务。DeepSeek’s plugin-based agent harness (dsh): everything is a plugin, a local web UI starts with one command, and it targets long tasks across models and tools.

下一步Next steps

  • 打开 GitHub,先读 README、LICENSE、最近 release 与 issue。Open GitHub and read the README, LICENSE, latest release and issues first.
  • 按“部署依赖 / 显存 / 数据 / 网络 / 权限”列一张上手清单。Make an onboarding checklist for deployment dependencies, VRAM, data, network and permissions.
  • 用一个小样本跑通,再决定是否进生产;不要直接上生产数据。Run a small sample first, then decide on production; never start with production data.

GitHub 仓库 ↗GitHub repository ↗ 文档 ↗Docs ↗ 加入对比Add to compare

快照口径:stars / forks / language / license / pushed_at 来自 GitHub API 2026-11-20 快照;之后的变化没有回写。标签与“适合 / 不适合”是编辑判断,不是 GitHub 元数据。Snapshot: stars / forks / language / license / pushed_at come from the GitHub API snapshot on 2026-11-20; later changes are not written back. Tags and “fit / not fit” are editorial judgments, not GitHub metadata.
不背书:本站只做索引与风险提示,不审计代码、不保证安全、不替你做许可判断。仓库脚本与模型权重请自行审查。No endorsement: this site only indexes and flags risks; it does not audit code, guarantee security or make license decisions for you. Review repository scripts and model weights yourself.