跳到主要内容

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

提交记录
修改README.md+12 −3看文件
@@ -108,16 +108,25 @@ agent-vm --reset claude # Destroy and re-clone VM, then run Cl
108108
109109## Customization
110110
111删除:### Per-user: `~/.agent-vm.setup.sh`
111新增:### Per-user setup: `~/.agent-vm/setup.sh`
112112
113删除:Create this file in your home directory to install extra tools into the base VM template. It runs once during `agent-vm setup`, as the default VM user (with sudo available):
113新增:Create this file to install extra tools into the base VM template. It runs once during `agent-vm setup`, as the default VM user (with sudo available):
114114
115115```bash
116删除:# ~/.agent-vm.setup.sh
116新增:# ~/.agent-vm/setup.sh
117117sudo apt-get install -y postgresql-client
118118pip install pandas numpy
119119```
120120
121新增:### Per-user runtime: `~/.agent-vm/runtime.sh`
122新增:
123新增:Create this file to run commands inside every VM on each start. Runs before the per-project runtime script:
124新增:
125新增:```bash
126新增:# ~/.agent-vm/runtime.sh
127新增:export MY_API_KEY="..."
128新增:```
129新增:
121130### Per-project: `.agent-vm.runtime.sh`
122131
123132Create this file at the root of any project. It runs inside the VM each time a new VM is created for the project, just before you get access. Use it for project-specific setup like installing dependencies or starting services:
修改agent-vm.sh+10 −3看文件
@@ -122,6 +122,12 @@ _agent_vm_ensure_running() {
122122 limactl start "$vm_name" &>/dev/null
123123 fi
124124
125新增: # Run per-user runtime script if it exists
126新增: if [ -f "$AGENT_VM_STATE_DIR/runtime.sh" ]; then
127新增: echo "Running user runtime setup..."
128新增: limactl shell --workdir "$host_dir" "$vm_name" zsh -l < "$AGENT_VM_STATE_DIR/runtime.sh"
129新增: fi
130新增:
125131 # Run project-specific runtime script if it exists
126132 if [ -f "${host_dir}/.agent-vm.runtime.sh" ]; then
127133 echo "Running project runtime setup..."
@@ -226,8 +232,9 @@ VMs are persistent and unique per directory. Running "agent-vm shell" or
226232"agent-vm claude" in the same directory will reuse the same VM.
227233
228234Customization:
229删除: ~/.agent-vm.setup.sh Per-user setup (runs during "agent-vm setup")
230删除: <project>/.agent-vm.runtime.sh Per-project setup (runs on each VM start)
235新增: ~/.agent-vm/setup.sh Per-user setup (runs during "agent-vm setup")
236新增: ~/.agent-vm/runtime.sh Per-user runtime (runs on each VM start)
237新增: <project>/.agent-vm.runtime.sh Per-project runtime (runs on each VM start)
231238
232239More info: https://github.com/sylvinus/agent-vm
233240EOF
@@ -300,7 +307,7 @@ _agent_vm_setup() {
300307 limactl shell "$AGENT_VM_TEMPLATE" bash -l < "${AGENT_VM_SCRIPT_DIR}/agent-vm.setup.sh" || { echo "Error: Setup script failed." >&2; return 1; }
301308
302309 # Run user's custom setup script if it exists
303删除: local user_setup="$HOME/.agent-vm.setup.sh"
310新增: local user_setup="$AGENT_VM_STATE_DIR/setup.sh"
304311 if [ -f "$user_setup" ]; then
305312 echo "Running custom setup from $user_setup..."
306313 limactl shell "$AGENT_VM_TEMPLATE" zsh -l < "$user_setup" || { echo "Error: Custom setup script failed." >&2; return 1; }