Files
anomalyco_opencode/README.zh.md
T
Jack b7e4f1ef74
nix-eval / nix-eval (push) Has been cancelled
nix-hashes / compute-hash (blacksmith-4vcpu-ubuntu-2404, x86_64-linux) (push) Has been cancelled
nix-hashes / compute-hash (blacksmith-4vcpu-ubuntu-2404-arm, aarch64-linux) (push) Has been cancelled
nix-hashes / compute-hash (macos-15-intel, x86_64-darwin) (push) Has been cancelled
nix-hashes / compute-hash (macos-latest, aarch64-darwin) (push) Has been cancelled
nix-hashes / update-hashes (push) Has been cancelled
publish / version (push) Has been cancelled
publish / build-cli (push) Has been cancelled
publish / sign-cli-windows (push) Has been cancelled
publish / build-electron (map[bun_install_flags:--os=darwin --cpu=arm64 host:macos-26 platform_flag:--mac --arm64 target:aarch64-apple-darwin]) (push) Has been cancelled
publish / build-electron (map[bun_install_flags:--os=darwin --cpu=x64 host:macos-26-intel platform_flag:--mac --x64 target:x86_64-apple-darwin]) (push) Has been cancelled
publish / build-electron (map[host:blacksmith-4vcpu-ubuntu-2404 platform_flag:--linux target:x86_64-unknown-linux-gnu]) (push) Has been cancelled
publish / build-electron (map[host:blacksmith-4vcpu-ubuntu-2404-arm platform_flag:--linux --arm64 target:aarch64-unknown-linux-gnu]) (push) Has been cancelled
publish / build-electron (map[host:blacksmith-4vcpu-windows-2025 platform_flag:--win target:x86_64-pc-windows-msvc]) (push) Has been cancelled
publish / build-electron (map[host:windows-2025 platform_flag:--win --arm64 target:aarch64-pc-windows-msvc]) (push) Has been cancelled
publish / publish (push) Has been cancelled
storybook / storybook build (push) Has been cancelled
generate / generate (push) Has been cancelled
typecheck / typecheck (push) Has been cancelled
deploy / deploy (push) Has been cancelled
fix: update Feishu community link (#35392)
2026-07-05 14:00:14 +08:00

5.2 KiB

OpenCode logo

开源的 AI Coding Agent。

Discord npm Build status

English | 简体中文 | 繁體中文 | 한국어 | Deutsch | Español | Français | Italiano | Dansk | 日本語 | Polski | Русский | Bosanski | العربية | Norsk | Português (Brasil) | ไทย | Türkçe | Українська | বাংলা | Ελληνικά | Tiếng Việt

OpenCode Terminal UI


安装

# 直接安装 (YOLO)
curl -fsSL https://opencode.ai/install | bash

# 软件包管理器
npm i -g opencode-ai@latest        # 也可使用 bun/pnpm/yarn
scoop install opencode             # Windows
choco install opencode             # Windows
brew install anomalyco/tap/opencode # macOS 和 Linux(推荐,始终保持最新)
brew install opencode              # macOS 和 Linux(官方 brew formula,更新频率较低)
sudo pacman -S opencode            # Arch Linux (Stable)
paru -S opencode-bin               # Arch Linux (Latest from AUR)
mise use -g opencode               # 任意系统
nix run nixpkgs#opencode           # 或用 github:anomalyco/opencode 获取最新 dev 分支

Tip

安装前请先移除 0.1.x 之前的旧版本。

桌面应用程序 (BETA)

OpenCode 也提供桌面版应用。可直接从 发布页 (releases page)opencode.ai/download 下载。

平台 下载文件
macOS (Apple Silicon) opencode-desktop-mac-arm64.dmg
macOS (Intel) opencode-desktop-mac-x64.dmg
Windows opencode-desktop-windows-x64.exe
Linux .deb.rpm 或 AppImage
# macOS (Homebrew Cask)
brew install --cask opencode-desktop
# Windows (Scoop)
scoop bucket add extras; scoop install extras/opencode-desktop

安装目录

安装脚本按照以下优先级决定安装路径:

  1. $OPENCODE_INSTALL_DIR - 自定义安装目录
  2. $XDG_BIN_DIR - 符合 XDG 基础目录规范的路径
  3. $HOME/bin - 如果存在或可创建的用户二进制目录
  4. $HOME/.opencode/bin - 默认备用路径
# 示例
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash

Agents

OpenCode 内置两种 Agent,可用 Tab 键快速切换:

  • build - 默认模式,具备完整权限,适合开发工作
  • plan - 只读模式,适合代码分析与探索
    • 默认拒绝修改文件
    • 运行 bash 命令前会询问
    • 便于探索未知代码库或规划改动

另外还包含一个 general 子 Agent,用于复杂搜索和多步任务,内部使用,也可在消息中输入 @general 调用。

了解更多 Agents 相关信息。

文档

更多配置说明请查看我们的 官方文档

参与贡献

如有兴趣贡献代码,请在提交 PR 前阅读 贡献指南 (Contributing Docs)

基于 OpenCode 进行开发

如果你在项目名中使用了 “opencode”(如 “opencode-dashboard” 或 “opencode-mobile”),请在 README 里注明该项目不是 OpenCode 团队官方开发,且不存在隶属关系。


加入我们的社区 飞书 | X.com