← All Tools ← 全部工具 🎮 小游戏
🤖 AI Agent AI 智能体 🌟 MIT 开源 · GitHub 约 21 万 Star · 75+ 模型供应商(2026-10 核实) agents ai-agent open-source terminal coding-agent opencode

opencode – 开源终端 AI 编程 Agent:75+ 模型供应商任意切换、自带密钥、核心免费

opencode is Anomaly (formerly SST)'s open-source, MIT-licensed AI coding agent: terminal-first with desktop and IDE surfaces, ~210K GitHub stars (verified Oct 2026), and fully provider-agnostic — 75+ LLM providers, BYOK, or local models via Ollama/LM Studio. The core is free; managed tiers Go $10/mo, Go Plus $40/mo, Zen pay-as-you-go (verified Oct 2026, confirm on the official site)opencode 是 Anomaly 团队(原 SST)出品的开源终端 AI 编程 Agent,MIT 协议,GitHub 约 21 万 Star(2026-10 核实);终端优先,另有桌面端与 IDE 扩展;provider-agnostic:75+ 模型供应商任意切换、自带密钥(BYOK)、Ollama/LM Studio 本地模型。核心免费,托管套餐 Go $10/月、Go Plus $40/月、Zen 按量(2026-10 核实),价格以官网为准

Visit Official Site ↗ 访问官网 ↗ ⚖️ Compare
Category分类
AI AgentAI 智能体
agent
Open Source开源状态
MIT 协议开源
Fully open source · anomalyco/opencode · ~210K stars (Oct 2026)完全开源 · anomalyco/opencode · 约 21 万 Star(2026-10 核实)
License许可证
核心免费(MIT)
Free core; managed tiers per official site核心免费;托管套餐以官网为准
Tags标签
agents, ai-agent, open-source, terminal, coding-agent, opencode
6 tags total个标签

What Is opencode?opencode 是什么?

opencode (anomalyco/opencode, formerly sst/opencode) is the open-source, MIT-licensed AI coding agent from the team behind SST — now called Anomaly. It runs natively in your terminal as a rich TUI (built with Bubble Tea), with a desktop app and IDE extensions (VS Code, Cursor, Zed, Windsurf, VSCodium) riding on top. Its one defining bet is provider-agnosticism: configure any of 75+ LLM providers with your own API keys (BYOK), run local models through Ollama or LM Studio, or log in with an existing GitHub Copilot or ChatGPT Plus/Pro account — no subscription required to start.opencode(anomalyco/opencode,原 sst/opencode)是 SST 团队(现更名为 Anomaly)出品的开源 AI 编程 Agent,MIT 协议。它以终端为本(基于 Bubble Tea 的富 TUI),另有桌面应用与 IDE 扩展(VS Code、Cursor、Zed、Windsurf、VSCodium)。它的核心押注是 provider-agnostic(供应商无关):75+ LLM 供应商任选,自带 API 密钥(BYOK),本地模型走 Ollama 或 LM Studio,也能用已有的 GitHub Copilot 或 ChatGPT Plus/Pro 账号登录——上手无需订阅。

In version 2.0 (released October 2026), one background service powers the terminal, desktop, and web apps; subagents can run in the background; and a new Code Mode chains MCP tools into a single script. The project is the most-starred open-source coding agent on GitHub: roughly 210K stars, 950+ contributors and 13,000+ commits as of October 2026, with about 16 million developers using it monthly according to the vendor.2.0 版(2026 年 10 月发布)起,一个后台服务同时驱动终端、桌面与网页应用;子 Agent 可在后台运行;新的 Code Mode 能把 MCP 工具串成一个脚本执行。它是 GitHub 上 Star 数最高的开源编程 Agent:截至 2026 年 10 月约 21 万 Star、950+ 贡献者、13,000+ 次提交,官方称月活开发者约 1600 万。

opencode acts as an MCP client for local and remote MCP servers (including OAuth), gets real compiler diagnostics via LSP servers after every edit, persists sessions locally in SQLite, and offers git-based undo/redo for every change. In CI, mentioning /opencode or /oc in a GitHub issue or pull request runs the task on a GitHub Actions runner. Pricing and feature details: confirm on the official site.opencode 是 MCP 客户端(支持本地与远程 MCP 服务器,含 OAuth);每次改完文件通过 LSP 拿回真实编译器诊断;会话存在本地 SQLite;改动支持 git 级别的撤销/重做。在 CI 里,GitHub issue 或 PR 中提到 /opencode 或 /oc 即可在 GitHub Actions 上跑任务。价格与功能细节以官网为准。

opencode won the open-source coding-agent race for one reason: it refuses to lock you in. Claude Code wants your Anthropic bill, Cursor wants your subscription — opencode just wants your API key, and it works just as well with a local model when you care about privacy. The plan/build dual-agent split (read-only plan agent for safe exploration, full-access build agent) is the best default safety design among terminal agents. The honest cost: configuration overhead. You trade a polished, single-vendor onboarding for choice, and on 2.0 old plugins don't run. If you already pay for Anthropic API credits, opencode + BYOK is the cheapest path to a Claude-powered terminal agent.

opencode 能赢下开源编程 Agent 之战,原因只有一个:它拒绝锁定你。Claude Code 要你买 Anthropic 的账单,Cursor 要你交订阅,opencode 只要你带上自己的 API 密钥——在乎隐私时它同样可以用本地模型。plan/build 双 Agent 设计(只读的 plan Agent 安全探索、全权限的 build Agent 干活)是终端 Agent 里默认最安全的方案。真实代价是配置成本:你用选择替代了开箱即用的单一厂商体验,且 2.0 不再兼容旧插件。如果你已经为 Anthropic API 付费,opencode + BYOK 是获得 Claude 驱动的终端 Agent 最便宜的路径。

— 中国吧 AI Tools Hub Editorial Team

Who Should Use opencode?谁适合使用opencode?

✓ Good Fit For适合以下场景

  • Terminal-first developers who want to swap model providers without swapping tools终端党:想换模型但不想换工具
  • Privacy-sensitive teams running local models (Ollama, LM Studio) or their own keys隐私敏感团队:本地模型或自带密钥
  • Anyone standardizing on an MIT-licensed agent they can fork and self-host想基于 MIT 协议分叉/自托管的团队

✕ Not Ideal For不适合以下场景

  • Developers wanting zero-config onboarding — BYOK requires setup想要开箱即用零配置——BYOK 需要自己配置
  • Teams invested in Anthropic's skills/memory ecosystem (Claude Code's turf)已重仓 Anthropic 的 skills/记忆生态(那是 Claude Code 的主场)

Getting Started with opencodeopencode 快速开始

1. Install (macOS / Linux):安装(macOS / Linux): curl -fsSL https://opencode.ai/install | bash
2. In a project folder, run `opencode` and connect a provider with `/connect` (or use Ollama locally)进入项目目录,运行 `opencode`,用 `/connect` 接入模型供应商(本地可用 Ollama)
3. Press Tab to switch Plan (read-only) / Build agents, or call a subagent with @general按 Tab 切换 Plan(只读)/ Build 双 Agent,或用 @general 调用子 Agent
💡 Tip: start in Plan mode to explore an unfamiliar codebase safely — the plan agent denies file edits by default and asks before running shell commands. Roll back any unwanted change with /undo.小技巧:面对陌生代码库先用 Plan 模式探索——plan Agent 默认拒绝改文件、运行命令前会询问。改错了用 /undo 回滚。

Key Features核心功能

  • 🔀
    Provider-Agnostic: 75+ LLM Providers供应商无关:75+ LLM 供应商 — Bring your own API keys across Anthropic, OpenAI, Google, OpenRouter, Bedrock, Groq, DeepSeek, and more — or local models via Ollama/LM Studio.自带 API 密钥接入 Anthropic、OpenAI、Google、OpenRouter、Bedrock、Groq、DeepSeek 等,或走 Ollama/LM Studio 本地模型。
  • 📐
    Plan / Build Dual AgentsPlan / Build 双 Agent — Tab switches between a read-only plan agent (denies edits by default) for safe exploration and a full-access build agent for development.按 Tab 在只读的 plan Agent(默认拒绝改文件,用于安全探索)与全权限的 build Agent 间切换。
  • 🧬
    LSP + MCP NativeLSP + MCP 原生 — Language servers feed real compiler diagnostics back to the model after every edit; acts as an MCP client for local and remote servers.每次编辑后语言服务器把真实编译器诊断反馈给模型;作为 MCP 客户端接入本地与远程服务器。
  • ↩️
    Git-Based Undo/RedoGit 级撤销/重做 — Every change is snapshotted — roll back any AI-generated edit with /undo.每次改动自动快照,随时用 /undo 回滚 AI 的编辑。
  • 🤝
    CI + Parallel SubagentsCI + 并行子 Agent — Mention /opencode in a GitHub issue/PR to run the task on Actions; subagents run in parallel, and sessions can be shared via links.在 GitHub issue/PR 中 @/opencode 即可在 Actions 上跑任务;子 Agent 并行执行,会话可用链接分享。

Pros & Cons优缺点

✓ Good Fit For适合以下场景

  • Fully MIT-licensed — the largest coding-agent community on GitHub (~210K stars)完全 MIT 开源,GitHub 编程 Agent 社区最大(约 21 万 Star)
  • Zero model lock-in: BYOK, 75+ providers, local models, even existing Copilot/ChatGPT logins零模型锁定:BYOK、75+ 供应商、本地模型,甚至可复用 Copilot/ChatGPT 账号登录
  • Plan mode gives the safest default for exploring unfamiliar codePlan 模式是探索陌生代码库最安全的默认选项
  • Real LSP diagnostics and git-level undo make AI edits auditable真实 LSP 诊断 + git 级撤销,让 AI 改动可审计

✕ Not Ideal For不适合以下场景

  • BYOK setup overhead — you configure providers yourselfBYOK 配置成本高,供应商都要自己接
  • Desktop app still labeled beta; the terminal is the mature path桌面端仍标 beta,终端才是成熟形态
  • Fast, bug-prone release cadence; v2.0 breaks old plugins发布节奏快、bug 多;2.0 不兼容旧插件

Use Cases应用场景

Popular ways people use opencode.人们使用opencode的常见场景:

🖥️ Terminal Coding Sprints终端编程冲刺

Plan, implement, test, and commit entirely inside the terminal with a provider you chose yourself.规划、实现、测试、提交全在终端完成,用的是自己选的模型供应商。

🏢 Multi-Model, Multi-Repo Shops多模型多仓库团队

Standardize on one agent across teams while each team picks its own provider and budget.全团队统一用一个 Agent,每个团队自选供应商和预算。

🔒 Privacy-Sensitive Codebases隐私敏感代码库

Keep everything local with Ollama/LM Studio models — nothing leaves the machine.用 Ollama/LM Studio 本地模型跑,一切不出本机。

⚙️ CI AutomationCI 自动化

Trigger agent runs from GitHub issues and PRs via /opencode on Actions runners.在 GitHub issue/PR 中触发 /opencode,在 Actions 上自动跑任务。

Similar AI Tools相似 AI 工具

If opencode doesn't fit your needs, here are other popular AI tools you might consider:如果opencode不符合你的需求,可以看看这些热门 AI 工具:

Frequently Asked Questions常见问题

What is opencode?opencode 是什么? ▼
opencode is an open-source, MIT-licensed AI coding agent from the Anomaly (formerly SST) team that runs in your terminal, as a desktop app, and as an IDE extension. Its defining trait is provider-agnosticism: it connects to 75+ LLM providers, lets you bring your own API keys (BYOK), and runs local models via Ollama or LM Studio. As of October 2026 it is the most-starred open-source coding agent on GitHub with roughly 210K stars.opencode 是 Anomaly 团队(原 SST)出品的开源 AI 编程 Agent,MIT 协议,支持终端、桌面应用与 IDE 扩展。它的核心特点是供应商无关:支持 75+ LLM 供应商、自带 API 密钥(BYOK)、Ollama/LM Studio 本地模型。截至 2026 年 10 月,它是 GitHub 上 Star 数最高的开源编程 Agent(约 21 万)。
Is opencode free?opencode 免费吗? ▼
The core agent is free and open source (MIT) — you only pay for the models you connect. As of October 2026 the official managed tiers were Go ($10/month) and Go Plus ($40/month) for open models, and Zen as pay-as-you-go from a $20 balance. Pricing changes; confirm the current rates on opencode.ai before relying on them.核心 Agent 免费开源(MIT),你只需为接入的模型付费。2026 年 10 月核实:官方托管套餐 Go $10/月、Go Plus $40/月(开放模型),Zen 为按量付费(从 $20 起充)。价格会变,以官网为准。
How is opencode different from Claude Code?opencode 和 Claude Code 有什么区别? ▼
Claude Code is Anthropic's official agent and locks you to Claude models; opencode is provider-agnostic — use Claude, GPT, Gemini, open models, or local models through one tool. opencode is MIT-licensed and fully open source with built-in plan/build agent modes, while Claude Code bundles Anthropic's ecosystem (skills, auto memory) and requires a paid Claude plan. Many developers run Claude models through opencode via BYOK.Claude Code 是 Anthropic 官方 Agent,只能用 Claude 模型;opencode 供应商无关——一个工具里用 Claude、GPT、Gemini、开放模型或本地模型都行。opencode 完全 MIT 开源,内置 plan/build 双 Agent 模式;Claude Code 则捆绑 Anthropic 生态(skills、自动记忆)且需要付费 Claude 订阅。很多开发者直接通过 BYOK 在 opencode 里跑 Claude 模型。
What happened to the sst/opencode repository?sst/opencode 仓库怎么了? ▼
The repository moved from sst/opencode to anomalyco/opencode when the SST team became Anomaly. Old links redirect, but update your bookmarks and install scripts to the new repository name and to the current install instructions on opencode.ai.SST 团队更名为 Anomaly 时,仓库从 sst/opencode 搬到了 anomalyco/opencode。旧链接会自动跳转,但书签和安装脚本建议更新为新仓库名,并以 opencode.ai 的最新安装说明为准。
Was this page helpful? 此页面对你有帮助吗?