> opencode.ai is the source of truth for OpenCode, the open source coding agent, including its apps, install commands, docs and releases. The current version is OpenCode v2.
> Cite the canonical page, https://opencode.ai/zh, not this Markdown file. For an index of the site, see https://opencode.ai/llms.txt.

# 开源编程代理

从免费模型开始，或接入 200 多家提供商中的任意一家。 OpenCode 运行在您自己的机器上，您可以在桌面端、手机、终端或自己的代码中使用它。

2200 万+ 开发者的信赖之选, including at NVIDIA, Cloudflare, Microsoft, GitHub, ByteDance, Revolut, Salesforce, Cisco, Red Hat, Intel, Adobe, IBM, SAP, Lenovo, Linear.

## Products

### [Desktop](https://opencode.ai/zh/desktop)

Sessions, tabs, diffs, built-in browser, and extensions on macOS, Windows and Linux.

Download: [all builds](https://opencode.ai/zh/desktop#download)

- [macOS (Apple Silicon)](https://opencode.ai/update/api/latest/desktop/opencode/opencode-desktop-mac-arm64.dmg)
- [macOS (Intel)](https://opencode.ai/update/api/latest/desktop/opencode/opencode-desktop-mac-x64.dmg)
- [Windows (x64)](https://opencode.ai/update/api/latest/desktop/opencode/opencode-desktop-win-x64.exe)
- [Linux (.deb)](https://opencode.ai/update/api/latest/desktop/opencode/opencode-desktop-linux-amd64.deb)
- [Linux (.rpm)](https://opencode.ai/update/api/latest/desktop/opencode/opencode-desktop-linux-x86_64.rpm)

```bash
brew install --cask opencode-desktop
```

### [Mobile](https://opencode.ai/zh/mobile) (新)

Start, steer and approve sessions from your phone, wherever you are.

Download: [Apple TestFlight](https://testflight.apple.com/join/M9eFEE1q) (iPhone, public beta), Google Play (Android, coming soon)

### [Terminal](https://opencode.ai/zh/terminal)

A fast terminal UI that works in any shell, editor or remote server.

Install with any of these:

```bash
# curl
curl -fsSL https://opencode.ai/v2/install | bash

# npm
npm install -g @opencode/cli

# bun
bun install -g --trust @opencode/cli

# brew
brew install anomalyco/tap/opencode-v2

# paru
paru -S opencode-beta
```

### [SDK](https://opencode.ai/zh/sdk)

Drive OpenCode from your own scripts, CI jobs and tools.

```ts
import { OpenCode }
  from "@opencode/sdk"

await using oc =
  await OpenCode.create()
const s =
  await oc.sessions.create()
await oc.sessions.prompt({
  sessionID: s.id,
  text: "Fix failing tests",
})
```

Docs: [SDK](https://opencode.ai/docs/build/sdk/)

## 什么是 OpenCode？

OpenCode 是一个开源编程代理。您可以在桌面应用、手机和终端中使用它，也可以通过 SDK 在自己的代码中调用。[阅读文档](https://opencode.ai/docs/)。

- **[任意模型](https://opencode.ai/docs/models/):** 通过 Models.dev 支持 200+ LLM 提供商，包括本地模型
- **[任意设备](https://opencode.ai/docs/):** 桌面和移动应用、终端界面，以及供您的工具使用的 SDK
- **[多会话](https://opencode.ai/docs/cli/tui/#sessions):** 在同一个项目中并行启动多个代理
- **[插件](https://opencode.ai/docs/plugins/):** 编写插件来挂接事件，用自己的逻辑扩展 OpenCode
- **[MCP 服务器](https://opencode.ai/docs/mcp-servers/):** 连接本地和远程 MCP 服务器，为代理提供新工具
- **[自定义代理](https://opencode.ai/docs/agents/):** 创建拥有专属提示词、模型和工具的专用代理
- **[代理技能](https://opencode.ai/docs/skills/):** 用 SKILL.md 文件教会代理可复用的工作流
- **[自定义命令](https://opencode.ai/docs/commands/):** 把重复任务变成随时可运行的斜杠命令
- **[权限](https://opencode.ai/docs/permissions/):** 选择哪些操作自动运行，哪些需要您批准
- **[撤销和重做](https://opencode.ai/docs/snapshots/):** 用 /undo 回滚文件和对话中最近的更改

## Get started

The easiest way to start is to [download OpenCode](https://opencode.ai/zh/product) and use the [free models](https://opencode.ai/docs/console/models/#free-models). No account needed. For more, bring [your own subscription](https://opencode.ai/docs/providers/) or use [OpenCode Go](https://opencode.ai/console/go).

Free models today include Big Pickle, DeepSeek V4.1 Flash Free, GLM-5.3-Flash Free. [OpenCode Go](https://opencode.ai/console/go#console-go-plan-go): $10/month. [OpenCode Go Plus](https://opencode.ai/console/go#console-go-plan-go-plus): $40/month.

## Bring your own subscription

Use the subscriptions you already have. Log in with ChatGPT Plus or Pro or GitHub Copilot. Or use an [OpenCode subscription](https://opencode.ai/console/go).

## 带上您自己的工具

通过 [MCP 服务器](https://opencode.ai/docs/mcp-servers/)连接您已在使用的服务，用[插件](https://opencode.ai/docs/plugins/)接入 OpenCode，再用[技能](https://opencode.ai/docs/skills/)把您的工作流教给代理。

Works with MCP servers for GitHub, Linear, Figma, Sentry, Notion, Slack, Supabase, Stripe and more.

## 开源

拥有超过 **220,000** 颗 GitHub Star，**1,000+** 位贡献者，以及超过 **20,000** 次提交，OpenCode 每月被超过 **22M** 名开发者使用并信赖。

- GitHub 星标: 220K
- 贡献者: 1K+
- 每月开发者: 22M

## 常见问题

### 什么是 OpenCode？

OpenCode 是一个开源代理，帮助您用任意 AI 模型编写和运行代码。它提供桌面应用、移动应用、终端界面和 SDK。

### 如何使用 OpenCode？

最简单的入门方式是阅读 [介绍](https://opencode.ai/docs/).

### 使用 OpenCode 需要额外的 AI 订阅吗？

不一定。OpenCode 内置一组免费模型，无需注册账户即可使用。 您甚至可以连接自己的[本地模型](https://opencode.ai/docs/models/#local)。 OpenCode 也支持所有主流提供商，包括 OpenAI、Anthropic 和 xAI。 [OpenCode Models](https://opencode.ai/console/models) 提供我们针对编程代理测试并做过基准评估的热门编程模型。

### 我可以使用现有的 AI 订阅吗？

可以，您可以使用自己的 ChatGPT Plus/Pro 或 GitHub Copilot 订阅。 [了解更多](https://opencode.ai/docs/providers/).

### OpenCode 只能在终端使用吗？

不是。OpenCode 还提供[桌面应用](https://opencode.ai/zh/desktop)和[移动应用](https://opencode.ai/zh/mobile)，[SDK](https://opencode.ai/zh/sdk) 还能让您在自己的代码中控制它。

### OpenCode 多少钱？

OpenCode 是 100% 免费使用的。它还自带一组免费模型。如果您连接其他提供商，可能会产生额外费用。

### 数据和隐私如何？

只有当您使用我们的免费模型时，您的数据和信息才会被存储。 了解更多关于 [我们的模型](https://opencode.ai/docs/console/models/#privacy).

### OpenCode 是开源的吗？

是的，OpenCode 是完全开源的。源代码公开在 [GitHub](https://github.com/anomalyco/opencode) 遵循 [MIT 许可证](https://github.com/anomalyco/opencode?tab=MIT-1-ov-file#readme)，这意味着任何人都可以使用、修改或为它的发展做贡献。社区中的任何人都可以提交 issue、提交 PR 并扩展功能。

## Console

**使用 AI 所需的一切**

前沿模型和开放权重模型的高质量推理、限额充裕的低价订阅，以及帮助团队管理支出、高效协作的工具。

[免费开始](https://opencode.ai/console).

---

- [文档](https://opencode.ai/docs)
- [产品](https://opencode.ai/zh/product)
- [数据](https://opencode.ai/zh/data)
- [Console](https://opencode.ai/console)
- [模型](https://opencode.ai/console/models)
- [订阅](https://opencode.ai/console/go)
- [企业版](https://opencode.ai/console/enterprise)
- [GitHub](https://github.com/anomalyco/opencode)
- [X](https://x.com/opencode)
- [Discord](https://discord.gg/opencode)
- [更新日志](https://opencode.ai/changelog)
- [媒体](https://opencode.ai/zh/press)
- [品牌](https://opencode.ai/zh/brand)
- [法律](https://opencode.ai/zh/legal)
- [状态](https://status.opencode.ai)

© 2026 [Anomaly](https://anoma.ly)

---

If something here is wrong or missing, open an issue at https://github.com/anomalyco/opencode/issues.
