跳到主要内容

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

浏览文件

cage-install.sh

18 行 · 1.1 KB历史下载
1#!/bin/sh
2# Cage download/installation plan. No application or profile is changed.
3# sh install.sh plan [--version TAG] [--platform darwin-arm64|win32-amd64|linux-amd64]
4# sh install.sh download --destination /absolute/path [--version TAG]
5set -eu
6if ! command -v node >/dev/null 2>&1 || ! command -v curl >/dev/null 2>&1; then
7 printf '%s\n' '{"protocol":1,"status":"error","error":{"code":"dependency_missing","message":"Cage bootstrap requires Node.js 20+ and curl. Read https://lee-xeo.github.io/Claude-Cage/agent.md","next_action":"install_dependencies"}}'
8 exit 1
9fi
10cage_bootstrap_tmp=$(mktemp -d)
11trap 'rm -rf "$cage_bootstrap_tmp"' EXIT
12trap 'exit 1' HUP INT TERM
13if ! curl --proto '=https' --proto-redir '=https' --tlsv1.2 -fsSL --connect-timeout 15 --max-time 120 \
14 https://lee-xeo.github.io/Claude-Cage/agent-bootstrap.mjs -o "$cage_bootstrap_tmp/bootstrap.mjs"; then
15 printf '%s\n' '{"protocol":1,"status":"error","error":{"code":"download_failed","message":"Could not download the public Cage bootstrap. No application or profile was changed.","next_action":"check_connectivity"}}'
16 exit 1
17fi
18node "$cage_bootstrap_tmp/bootstrap.mjs" "$@"