跳到主要内容

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

浏览文件

install-macos-node.sh

23 行 · 1.1 KB历史下载
1#!/bin/bash
2# The runtime used by ordinary terminal and debugger sessions in the macOS guest.
3set -euo pipefail
4export PATH=/usr/bin:/bin:/usr/sbin:/sbin
5[[ $# == 1 && $EUID == 0 && $(sysctl -n hw.model) =~ ^VirtualMac[0-9]+,[0-9]+$ ]]
6[[ -f /var/db/cage-guest-os && ! -L /var/db/cage-guest-os && $(stat -f %u /var/db/cage-guest-os) == 0 && $(cat /var/db/cage-guest-os) == macos ]]
7base=/usr/local/libexec
8target="$base/cage-node-v24.22.2"
9mkdir -p "$base" /usr/local/bin
10stage=$(mktemp -d "$base/.cage-node.XXXXXXXX")
11trap 'rm -rf "$stage"' EXIT
12if [[ ! -e $target ]]; then
13 cp "$1" "$stage/node.tgz"
14 [[ $(shasum -a 256 "$stage/node.tgz" | cut -d' ' -f1) == aa9549349e47dffaa42dcf95d6e06ade8c4bdafc980979883b88767670df385a ]]
15 tar -xzf "$stage/node.tgz" -C "$stage" --no-same-owner
16 [[ $("$stage/node-v24.22.2-darwin-arm64/bin/node" -p 'process.platform + "/" + process.arch + "/" + process.version') == darwin/arm64/v24.22.2 ]]
17 mv "$stage/node-v24.22.2-darwin-arm64" "$target"
18fi
19for tool in node npm npx; do
20 if [[ ! -e /usr/local/bin/$tool && ! -L /usr/local/bin/$tool ]]; then
21 ln -s "$target/bin/$tool" "/usr/local/bin/$tool"
22 fi
23done