Merge pull request #2 from NicolasRitouet/fix/opencode-install-and-yolo-flag
Fix OpenCode install script and remove yolo flag
- 作者
- Sylvain Zimmer
- 时间
- 2026/02/19 23:56
- 提交
- 1fc129c
这是一个合并提交,下面是和第一个上一提交相比的改动。
Fix OpenCode install script and remove yolo flag
这是一个合并提交,下面是和第一个上一提交相比的改动。
| @@ -4,7 +4,7 @@ Run AI coding agents inside sandboxed Linux VMs. The agent gets full autonomy wh | ||
| 4 | 4 | |
| 5 | 5 | Uses [Lima](https://lima-vm.io/) to create lightweight Debian VMs on macOS and Linux. Ships with dev tools, Docker, and a headless Chrome browser with [Chrome DevTools MCP](https://github.com/ChromeDevTools/chrome-devtools-mcp) pre-configured. |
| 6 | 6 | |
| 7 | 删除:Supports [Claude Code](https://claude.ai/code), [OpenCode](https://github.com/opencode-ai/opencode), and [Codex CLI](https://github.com/openai/codex) out of the box. Other agents can be run via `agent-vm shell`. | |
| 7 | 新增:Supports [Claude Code](https://claude.ai/code), [OpenCode](https://github.com/anomalyco/opencode), and [Codex CLI](https://github.com/openai/codex) out of the box. Other agents can be run via `agent-vm shell`. | |
| 8 | 8 | |
| 9 | 9 | Never install attack vectors such as npm, claude or even Docker on your host machine again! |
| 10 | 10 | |
| @@ -61,7 +61,7 @@ Creates a persistent VM for the current directory (or reuses it if one already e | ||
| 61 | 61 | |
| 62 | 62 | Each agent runs with its respective auto-approve flag: |
| 63 | 63 | - `claude` runs with `--dangerously-skip-permissions` |
| 64 | 删除:- `opencode` runs with `--dangerously-skip-permissions` | |
| 64 | 新增:- `opencode` does not yet have an auto-approve flag (waiting on [this PR](https://github.com/anomalyco/opencode/pull/11833)) | |
| 65 | 65 | - `codex` runs with `--full-auto` |
| 66 | 66 | |
| 67 | 67 | Any extra arguments are forwarded to the agent command: |
| @@ -67,7 +67,7 @@ echo 'export PS1="vm:%1~%% "' >> ~/.zshrc | ||
| 67 | 67 | |
| 68 | 68 | # Install OpenCode |
| 69 | 69 | echo "Installing OpenCode..." |
| 70 | 删除:curl -fsSL https://raw.githubusercontent.com/opencode-ai/opencode/refs/heads/main/install | bash | |
| 70 | 新增:curl -fsSL https://opencode.ai/install | bash | |
| 71 | 71 | echo 'export PATH=$HOME/.opencode/bin:$PATH' >> ~/.zshrc |
| 72 | 72 | |
| 73 | 73 | # Add PATH to .zshenv so non-interactive shells (limactl shell vmname cmd) also find the tools |
| @@ -365,7 +365,9 @@ _agent_vm_opencode() { | ||
| 365 | 365 | |
| 366 | 366 | _agent_vm_ensure_running "$vm_name" "$host_dir" "${vm_opts[@]}" || return 1 |
| 367 | 367 | |
| 368 | 删除: limactl shell --workdir "$host_dir" "$vm_name" opencode --dangerously-skip-permissions "${args[@]}" | |
| 368 | 新增: # TODO: add --dangerously-skip-permissions once released | |
| 369 | 新增: # (waiting on https://github.com/anomalyco/opencode/pull/11833) | |
| 370 | 新增: limactl shell --workdir "$host_dir" "$vm_name" opencode "${args[@]}" | |
| 369 | 371 | } |
| 370 | 372 | |
| 371 | 373 | _agent_vm_codex() { |