opencode : The open source coding agent.
oh-my-opencode : The Best Agent Harness.
- Meet Sisyphus: The Batteries-Included Agent that codes like you.
环境
- WSL2
- Ubuntu 24.04
安装
- 安装 opencode
1 | curl -fsSL https://opencode.ai/install | bash |
- 启动 opencode
1 | $ cd /path/to/project |
- 在
opencode中安装oh-my-opencode
1 | Install and configure by following the instructions here https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/refs/heads/master/README.md |
使用
Plan mode & Build mode
使用 Tab 键切换。
Plan mode: 该模式会禁用其直接修改代码的能力,转而建议它将如何实现该功能。
Build mode: 该模式会修改代码。
init
1 | /init |
这将让 OpenCode 分析你的项目,并在项目根目录中创建一个 AGENTS.md 文件。这有助于 OpenCode 理解项目结构以及所使用的编码模式。