跳到主要内容

Claude Cage · 面向 Claude 的隔离开发环境,支持桌面工作台、多账号、远程部署与移动端连接。上游 Lee-xeo/Claude-Cage 完整源码镜像,非灵栈原创;主许可 MIT,第三方组件遵循各自许可。来源:https://github.com/Lee-xeo/Claude-Cage 。手动同步,不附带 Release 安装包。

提交记录

Merge pull request #16 from benoitvx/feat/mistral-vibe

feat: add native support for Mistral Vibe

作者
Sylvain Zimmer
时间
2026/06/30 01:28
提交
9ed321b
这个版本的全部文件

这是一个合并提交,下面是和第一个上一提交相比的改动。

修改README.md+4 −1看文件
@@ -4,7 +4,7 @@ Run AI coding agents inside sandboxed Linux VMs. The agent gets full autonomy wh
44
55Uses [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.
66
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`.
7新增:Supports [Claude Code](https://claude.ai/code), [OpenCode](https://github.com/anomalyco/opencode), [Codex CLI](https://github.com/openai/codex), and [Mistral Vibe](https://docs.mistral.ai/vibe/code/cli/install-setup) out of the box. Other agents can be run via `agent-vm shell`.
88
99Never install attack vectors such as npm, claude or even Docker on your host machine again!
1010
@@ -56,6 +56,7 @@ cd your-project
5656agent-vm claude # Claude Code
5757agent-vm opencode # OpenCode
5858agent-vm codex # Codex CLI
59新增:agent-vm vibe # Mistral Vibe
5960```
6061
6162Creates a persistent VM for the current directory (or reuses it if one already exists), mounts your working directory, and runs the agent with full permissions. The VM persists after the agent exits so you can reconnect later. Ports opened inside the VM (e.g. by Docker containers or dev servers) are automatically forwarded to your host by Lima.
@@ -64,6 +65,7 @@ Each agent runs with its respective auto-approve flag:
6465- `claude` runs with `--dangerously-skip-permissions`
6566- `opencode` does not yet have an auto-approve flag (waiting on [this PR](https://github.com/anomalyco/opencode/pull/11833))
6667- `codex` runs with `--dangerously-bypass-approvals-and-sandbox`
68新增:- `vibe` runs with `--agent auto-approve`
6769
6870Any extra arguments are forwarded to the agent command:
6971
@@ -72,6 +74,7 @@ agent-vm claude -p "fix all lint errors" # Run with a prompt
7274agent-vm claude --resume # Resume previous session
7375agent-vm opencode -p "refactor auth module" # OpenCode with a prompt
7476agent-vm codex -q "explain this codebase" # Codex with a query
77新增:agent-vm vibe -p "fix all lint errors" # Mistral Vibe with a prompt
7578```
7679
7780### Shell access and running commands
修改agent-vm.setup.sh+26 −0看文件
@@ -85,6 +85,14 @@ echo 'export PATH=$HOME/.local/bin:$HOME/.claude/local/bin:$HOME/.opencode/bin:$
8585echo "Installing Codex CLI..."
8686sudo npm i -g @openai/codex
8787
88新增:# Install Mistral Vibe (installs uv and the `vibe`/`vibe-acp` commands into ~/.local/bin).
89新增:# This setup script runs under bash, but the PATH export lives in ~/.zshrc/~/.zshenv, so
90新增:# ~/.local/bin isn't on PATH here yet. The Vibe installer exits non-zero (aborting setup
91新增:# under `set -e`) if it can't find its install dir on PATH, so export it for this session.
92新增:echo "Installing Mistral Vibe..."
93新增:export PATH="$HOME/.local/bin:$PATH"
94新增:curl -LsSf https://mistral.ai/vibe/install.sh | bash
95新增:
8896# Configure Chrome DevTools MCP server for Claude
8997echo "Configuring Chrome MCP server for Claude..."
9098CONFIG="$HOME/.claude.json"
@@ -132,4 +140,22 @@ else
132140JSON
133141fi
134142
143新增:# Configure Chrome DevTools MCP server for Vibe
144新增:# Vibe uses TOML; append an array-of-tables entry (valid even if the wizard later
145新增:# writes to the same file). Guard against duplicates on repeated setup runs.
146新增:echo "Configuring Chrome MCP server for Vibe..."
147新增:VIBE_CONFIG_DIR="$HOME/.vibe"
148新增:mkdir -p "$VIBE_CONFIG_DIR"
149新增:VIBE_CONFIG="$VIBE_CONFIG_DIR/config.toml"
150新增:if ! grep -q 'name = "chrome-devtools"' "$VIBE_CONFIG" 2>/dev/null; then
151新增: cat >> "$VIBE_CONFIG" << 'TOML'
152新增:
153新增:[[mcp_servers]]
154新增:name = "chrome-devtools"
155新增:transport = "stdio"
156新增:command = "npx"
157新增:args = ["-y", "chrome-devtools-mcp@latest", "--headless=true", "--isolated=true"]
158新增:TOML
159新增:fi
160新增:
135161echo "VM setup complete."
修改agent-vm.sh+42 −2看文件
@@ -11,6 +11,7 @@
1111# agent-vm claude - Run Claude Code in a persistent VM for cwd
1212# agent-vm opencode - Run OpenCode in a persistent VM for cwd
1313# agent-vm codex - Run Codex CLI in a persistent VM for cwd
14新增:# agent-vm vibe - Run Mistral Vibe in a persistent VM for cwd
1415# agent-vm shell - Open a shell in the persistent VM for cwd
1516# agent-vm stop - Stop the VM for cwd
1617# agent-vm rm - Stop and delete the VM for cwd
@@ -305,6 +306,9 @@ agent-vm() {
305306 codex)
306307 _agent_vm_codex "${vm_opts[@]}" "$@"
307308 ;;
309新增: vibe)
310新增: _agent_vm_vibe "${vm_opts[@]}" "$@"
311新增: ;;
308312 shell)
309313 _agent_vm_shell "${vm_opts[@]}" "$@"
310314 ;;
@@ -346,6 +350,7 @@ Commands:
346350 claude [args] Run Claude Code in the VM for the current directory
347351 opencode [args] Run OpenCode in the VM for the current directory
348352 codex [args] Run Codex CLI in the VM for the current directory
353新增: vibe [args] Run Mistral Vibe in the VM for the current directory
349354 shell Open a shell in the VM for the current directory
350355 run <cmd> [args] Run a command in the VM for the current directory
351356 stop Stop the VM for the current directory
@@ -355,7 +360,7 @@ Commands:
355360 status Show status of all VMs (current dir marked with >)
356361 help Show this help
357362
358删除:VM options (for claude, opencode, codex, shell, run):
363新增:VM options (for claude, opencode, codex, vibe, shell, run):
359364 --disk GB VM disk size (default: 10)
360365 --memory GB VM memory (default: 3)
361366 --cpus N Number of CPUs (default: 1)
@@ -370,6 +375,7 @@ Examples:
370375 agent-vm claude # Run Claude in a VM
371376 agent-vm opencode # Run OpenCode in a VM
372377 agent-vm codex # Run Codex in a VM
378新增: agent-vm vibe # Run Mistral Vibe in a VM
373379 agent-vm --disk 50 --memory 16 --cpus 8 claude # Custom resources
374380 agent-vm --reset claude # Fresh VM from base template
375381 agent-vm --rm claude # Destroy VM after Claude exits
@@ -491,7 +497,7 @@ _agent_vm_setup() {
491497 date +%s > "$AGENT_VM_STATE_DIR/.agent-vm-base-version"
492498
493499 echo ""
494删除: echo "Base VM ready. Run 'agent-vm shell', 'agent-vm claude', 'agent-vm opencode', or 'agent-vm codex' in any project directory."
500新增: echo "Base VM ready. Run 'agent-vm shell', 'agent-vm claude', 'agent-vm opencode', 'agent-vm codex', or 'agent-vm vibe' in any project directory."
495501 echo "Note: Existing VMs were not updated. Use --reset to re-clone them from the new base."
496502}
497503
@@ -593,6 +599,40 @@ _agent_vm_codex() {
593599 return $exit_code
594600}
595601
602新增:_agent_vm_vibe() {
603新增: local vm_opts=()
604新增: local args=()
605新增: local rm=""
606新增: while [[ $# -gt 0 ]]; do
607新增: case "$1" in
608新增: --disk) vm_opts+=(--disk "$2"); shift 2 ;;
609新增: --memory|--ram) vm_opts+=(--memory "$2"); shift 2 ;;
610新增: --cpus) vm_opts+=(--cpus "$2"); shift 2 ;;
611新增: --reset) vm_opts+=(--reset); shift ;;
612新增: --offline) vm_opts+=(--offline); shift ;;
613新增: --readonly) vm_opts+=(--readonly); shift ;;
614新增: --git-read-only|--git-ro) vm_opts+=(--git-read-only); shift ;;
615新增: --rm) rm=1; shift ;;
616新增: *) args+=("$1"); shift ;;
617新增: esac
618新增: done
619新增: local host_dir
620新增: host_dir="$(pwd)"
621新增: local vm_name
622新增: vm_name="$(_agent_vm_name "$host_dir")"
623新增:
624新增: _agent_vm_ensure_running "$vm_name" "$host_dir" "${vm_opts[@]}" || return 1
625新增: _agent_vm_print_resources "$vm_name"
626新增:
627新增: # Vibe is a full-screen TUI, so allocate a tty (like opencode).
628新增: # --agent auto-approve gives full autonomy (safe inside the sandbox).
629新增: local exit_code=0
630新增: limactl shell --tty --workdir "$host_dir" "$vm_name" vibe --agent auto-approve "${args[@]}"
631新增: exit_code=$?
632新增: [[ -n "$rm" ]] && { echo "Removing VM..."; _agent_vm_destroy; }
633新增: return $exit_code
634新增:}
635新增:
596636_agent_vm_shell() {
597637 local vm_opts=()
598638 local rm=""