Skip to content

Commit 2587815

Browse files
author
Faruk Brbovic
committed
Merge remote-tracking branch 'upstream/dev' into dev
2 parents 206cea3 + 947b864 commit 2587815

File tree

188 files changed

+44674
-1291
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

188 files changed

+44674
-1291
lines changed

.github/workflows/duplicate-prs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ jobs:
4444
{
4545
echo "Check for duplicate PRs related to this new PR:"
4646
echo ""
47+
echo "CURRENT_PR_NUMBER: $PR_NUMBER"
48+
echo ""
4749
echo "Title: $(gh pr view "$PR_NUMBER" --json title --jq .title)"
4850
echo ""
4951
echo "Description:"

.opencode/agent/duplicate-pr.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@ You are a duplicate PR detection agent. When a PR is opened, your job is to sear
1212

1313
Use the github-pr-search tool to search for PRs that might be addressing the same issue or feature.
1414

15+
IMPORTANT: The input will contain a line `CURRENT_PR_NUMBER: NNNN`. This is the current PR number, you should not mark that the current PR as a duplicate of itself.
16+
1517
Search using keywords from the PR title and description. Try multiple searches with different relevant terms.
1618

1719
If you find potential duplicates:
1820

1921
- List them with their titles and URLs
2022
- Briefly explain why they might be related
2123

22-
If no duplicates are found, say so clearly.
24+
If no duplicates are found, say so clearly. BUT ONLY SAY "No duplicate PRs found" (don't say anything else if no dups)
2325

2426
Keep your response concise and actionable.

.opencode/tool/github-pr-search.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ export default tool({
4545
}
4646

4747
const prs = result.items as PR[]
48+
49+
if (prs.length === 0) {
50+
return `No other PRs found matching "${args.query}"`
51+
}
52+
4853
const formatted = prs.map((pr) => `${pr.title}\n${pr.html_url}`).join("\n\n")
4954

5055
return `Found ${result.total_count} PRs (showing ${prs.length}):\n\n${formatted}`

CONTRIBUTING.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,30 @@ This starts a local dev server at http://localhost:5173 (or similar port shown i
8383

8484
### Running the Desktop App
8585

86-
The desktop app is a native Tauri application that wraps the web UI. To run it:
86+
The desktop app is a native Tauri application that wraps the web UI.
87+
88+
To run the native desktop app:
89+
90+
```bash
91+
bun run --cwd packages/desktop tauri dev
92+
```
93+
94+
This starts the web dev server on http://localhost:1420 and opens the native window.
95+
96+
If you only want the web dev server (no native shell):
8797

8898
```bash
8999
bun run --cwd packages/desktop dev
90100
```
91101

102+
To create a production `dist/` and build the native app bundle:
103+
104+
```bash
105+
bun run --cwd packages/desktop tauri build
106+
```
107+
108+
This runs `bun run --cwd packages/desktop build` automatically via Tauri’s `beforeBuildCommand`.
109+
92110
> [!NOTE]
93111
> Running the desktop app requires additional Tauri dependencies (Rust toolchain, platform-specific libraries). See the [Tauri prerequisites](https://v2.tauri.app/start/prerequisites/) for setup instructions.
94112

README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ curl -fsSL https://opencode.ai/install | bash
2828
npm i -g opencode-ai@latest # or bun/pnpm/yarn
2929
scoop bucket add extras; scoop install extras/opencode # Windows
3030
choco install opencode # Windows
31-
brew install opencode # macOS and Linux
31+
brew install anomalyco/tap/opencode # macOS and Linux (recommended, always up to date)
32+
brew install opencode # macOS and Linux (official brew formula, updated less frequently)
3233
paru -S opencode-bin # Arch Linux
3334
mise use -g opencode # Any OS
3435
nix run nixpkgs#opencode # or github:anomalyco/opencode for latest dev branch
@@ -70,8 +71,7 @@ XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash
7071

7172
### Agents
7273

73-
OpenCode includes two built-in agents you can switch between,
74-
you can switch between these using the `Tab` key.
74+
OpenCode includes two built-in agents you can switch between with the `Tab` key.
7575

7676
- **build** - Default, full access agent for development work
7777
- **plan** - Read-only agent for analysis and code exploration
@@ -108,10 +108,6 @@ It's very similar to Claude Code in terms of capability. Here are the key differ
108108
- A focus on TUI. OpenCode is built by neovim users and the creators of [terminal.shop](https://terminal.shop); we are going to push the limits of what's possible in the terminal.
109109
- A client/server architecture. This for example can allow OpenCode to run on your computer, while you can drive it remotely from a mobile app. Meaning that the TUI frontend is just one of the possible clients.
110110

111-
#### What's the other repo?
112-
113-
The other confusingly named repo has no relation to this one. You can [read the story behind it here](https://x.com/thdxr/status/1933561254481666466).
114-
115111
---
116112

117113
**Join our community** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode)

README.zh-CN.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
<p align="center">
2+
<a href="https://opencode.ai">
3+
<picture>
4+
<source srcset="packages/console/app/src/asset/logo-ornate-dark.svg" media="(prefers-color-scheme: dark)">
5+
<source srcset="packages/console/app/src/asset/logo-ornate-light.svg" media="(prefers-color-scheme: light)">
6+
<img src="packages/console/app/src/asset/logo-ornate-light.svg" alt="OpenCode logo">
7+
</picture>
8+
</a>
9+
</p>
10+
<p align="center">开源的 AI Coding Agent。</p>
11+
<p align="center">
12+
<a href="https://opencode.ai/discord"><img alt="Discord" src="https://img.shields.io/discord/1391832426048651334?style=flat-square&label=discord" /></a>
13+
<a href="https://www.npmjs.com/package/opencode-ai"><img alt="npm" src="https://img.shields.io/npm/v/opencode-ai?style=flat-square" /></a>
14+
<a href="https://github.com/anomalyco/opencode/actions/workflows/publish.yml"><img alt="Build status" src="https://img.shields.io/github/actions/workflow/status/anomalyco/opencode/publish.yml?style=flat-square&branch=dev" /></a>
15+
</p>
16+
17+
[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai)
18+
19+
---
20+
21+
### 安装
22+
23+
```bash
24+
# 直接安装 (YOLO)
25+
curl -fsSL https://opencode.ai/install | bash
26+
27+
# 软件包管理器
28+
npm i -g opencode-ai@latest # 也可使用 bun/pnpm/yarn
29+
scoop bucket add extras; scoop install extras/opencode # Windows
30+
choco install opencode # Windows
31+
brew install anomalyco/tap/opencode # macOS 和 Linux(推荐,始终保持最新)
32+
brew install opencode # macOS 和 Linux(官方 brew formula,更新频率较低)
33+
paru -S opencode-bin # Arch Linux
34+
mise use -g opencode # 任意系统
35+
nix run nixpkgs#opencode # 或用 github:anomalyco/opencode 获取最新 dev 分支
36+
```
37+
38+
> [!TIP]
39+
> 安装前请先移除 0.1.x 之前的旧版本。
40+
41+
### 桌面应用程序 (BETA)
42+
43+
OpenCode 也提供桌面版应用。可直接从 [发布页 (releases page)](https://github.com/anomalyco/opencode/releases)[opencode.ai/download](https://opencode.ai/download) 下载。
44+
45+
| 平台 | 下载文件 |
46+
| --------------------- | ------------------------------------- |
47+
| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
48+
| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
49+
| Windows | `opencode-desktop-windows-x64.exe` |
50+
| Linux | `.deb``.rpm` 或 AppImage |
51+
52+
```bash
53+
# macOS (Homebrew Cask)
54+
brew install --cask opencode-desktop
55+
```
56+
57+
#### 安装目录
58+
59+
安装脚本按照以下优先级决定安装路径:
60+
61+
1. `$OPENCODE_INSTALL_DIR` - 自定义安装目录
62+
2. `$XDG_BIN_DIR` - 符合 XDG 基础目录规范的路径
63+
3. `$HOME/bin` - 如果存在或可创建的用户二进制目录
64+
4. `$HOME/.opencode/bin` - 默认备用路径
65+
66+
```bash
67+
# 示例
68+
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash
69+
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash
70+
```
71+
72+
### Agents
73+
74+
OpenCode 内置两种 Agent,可用 `Tab` 键快速切换:
75+
76+
- **build** - 默认模式,具备完整权限,适合开发工作
77+
- **plan** - 只读模式,适合代码分析与探索
78+
- 默认拒绝修改文件
79+
- 运行 bash 命令前会询问
80+
- 便于探索未知代码库或规划改动
81+
82+
另外还包含一个 **general** 子 Agent,用于复杂搜索和多步任务,内部使用,也可在消息中输入 `@general` 调用。
83+
84+
了解更多 [Agents](https://opencode.ai/docs/agents) 相关信息。
85+
86+
### 文档
87+
88+
更多配置说明请查看我们的 [**官方文档**](https://opencode.ai/docs)
89+
90+
### 参与贡献
91+
92+
如有兴趣贡献代码,请在提交 PR 前阅读 [贡献指南 (Contributing Docs)](./CONTRIBUTING.md)
93+
94+
### 基于 OpenCode 进行开发
95+
96+
如果你在项目名中使用了 “opencode”(如 “opencode-dashboard” 或 “opencode-mobile”),请在 README 里注明该项目不是 OpenCode 团队官方开发,且不存在隶属关系。
97+
98+
### 常见问题 (FAQ)
99+
100+
#### 这和 Claude Code 有什么不同?
101+
102+
功能上很相似,关键差异:
103+
104+
- 100% 开源。
105+
- 不绑定特定提供商。推荐使用 [OpenCode Zen](https://opencode.ai/zen) 的模型,但也可搭配 Claude、OpenAI、Google 甚至本地模型。模型迭代会缩小差异、降低成本,因此保持 provider-agnostic 很重要。
106+
- 内置 LSP 支持。
107+
- 聚焦终端界面 (TUI)。OpenCode 由 Neovim 爱好者和 [terminal.shop](https://terminal.shop) 的创建者打造,会持续探索终端的极限。
108+
- 客户端/服务器架构。可在本机运行,同时用移动设备远程驱动。TUI 只是众多潜在客户端之一。
109+
110+
#### 另一个同名的仓库是什么?
111+
112+
另一个名字相近的仓库与本项目无关。[点击这里了解背后故事](https://x.com/thdxr/status/1933561254481666466)
113+
114+
---
115+
116+
**加入我们的社区** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode)

README.zh-TW.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ curl -fsSL https://opencode.ai/install | bash
2828
npm i -g opencode-ai@latest # 也可使用 bun/pnpm/yarn
2929
scoop bucket add extras; scoop install extras/opencode # Windows
3030
choco install opencode # Windows
31-
brew install opencode # macOS 與 Linux
31+
brew install anomalyco/tap/opencode # macOS 與 Linux(推薦,始終保持最新)
32+
brew install opencode # macOS 與 Linux(官方 brew formula,更新頻率較低)
3233
paru -S opencode-bin # Arch Linux
3334
mise use -g github:anomalyco/opencode # 任何作業系統
3435
nix run nixpkgs#opencode # 或使用 github:anomalyco/opencode 以取得最新開發分支

0 commit comments

Comments
 (0)