跳到主要内容

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

浏览文件

main.go

27 行 · 816 B历史下载
1// Command agent-vm runs AI coding agents in a disposable Linux VM per
2// project, with Lima built in.
3package main
4
5import (
6 "os"
7 "strings"
8
9 "github.com/sylvinus/agent-vm/internal/cli"
10 "github.com/sylvinus/agent-vm/internal/limaembed"
11)
12
13// extraPath goes first on PATH, for this process and what it starts (the
14// hostagent, QEMU): set at build time (-ldflags -X) by a build that ships
15// QEMU with agent-vm (flake.nix). Empty otherwise.
16var extraPath string
17
18func main() {
19 if p := os.Getenv("PATH"); extraPath != "" && !strings.HasPrefix(p, extraPath+string(os.PathListSeparator)) {
20 os.Setenv("PATH", extraPath+string(os.PathListSeparator)+p)
21 }
22 // Lima's libraries start this executable again for its hostagent.
23 if limaembed.Run(os.Args[1:]) {
24 return
25 }
26 os.Exit(cli.Main(os.Args[1:], cli.Stdio()))
27}