xcodes
$ xcodes 社区开源 中风险xcodes(XcodesOrg/xcodes)用于在 macOS 上安装和管理多版本 Xcode 及模拟器运行时(xcodes list、xcodes installed、xcodes install、xcodes select)。支持 --experimental-unxip 加速解压,并提供 --no-switch 与本地 .xip --path 安装以适配 CI 环境。
brew install xcodes xcodes 直接在 macOS 宿主机上处理数 GB 的 .xip 解压、/Applications 安装与 xcode-select 路径切换,属于典型的本地 CLI 任务。
Agent 友好度体检单
当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。
FCRS-1.0 六维评分拆解
支持 --architecture、--no-switch、--path 与 --experimental-unxip 脚本化参数,但仅输出纯文本且无 --json,登录可能触发 Apple 双重认证。
- Supports
XCODES_USERNAME/XCODES_PASSWORDand--pathoffline.xipinstalls - No
--jsonoutput mode; Apple ID login may require interactive 2FA
--no-switch 可避免破坏当前构建环境且凭据存入钥匙串,但 xcodes select 通常需要 sudo 权限。
--no-switchprevents unintendedxcode-selectchanges- Multi-GB disk writes and
sudoprompts onselect
通过 brew install xcodes 安装原生 Swift 二进制,严格限定于 macOS。
- macOS-only tool distributed via Homebrew
借助 --experimental-unxip 与 xcodes runtimes,比手动从开发者门户下载快得多。
- Handles Xcode
.xipdownloads, unxip, runtime installs, andxcode-select
XcodesOrg 社区知名项目(XcodesOrg/xcodes),采用 MIT 协议。
- MIT-licensed community standard for macOS CI Xcode provisioning
README 文档清晰,基于 Swift ArgumentParser 的 --help 输出规范。
- Structured
--helpacrossinstall,list,select, andruntimes
安全边界、鉴权与放权指南
读取 XCODES_USERNAME 和 XCODES_PASSWORD 环境变量,并将 Apple Developer 会话令牌保存在 macOS 钥匙串中。
MIT 开源 CLI 免费;仅限 macOS 使用,从 Apple 官网下载需具备 Apple Developer 账号。
# xcodes Agent Rules - Check `xcodes installed` before downloading multi-gigabyte `.xip` archives. - Pass `--no-switch` during `xcodes install` unless the user wants to change the global `xcode-select` target. - Be aware that Apple ID downloads may trigger 2FA prompts unless using `--path` with a pre-cached `.xip`.
Agent 高频安全命令配方
只读查询(安全推荐)
xcodes installed
输出 /Applications 下已安装的 Xcode 版本与路径。
xcodes list --architecture arm64
无需登录即可列出兼容 Apple Silicon 的可下载 Xcode 版本。
受控写入与预演
xcodes install 16.2 --no-switch --experimental-unxip
下载并解压 Xcode 16.2,同时保留当前 xcode-select 指向的默认版本。
核心优势
- +
--experimental-unxip与--no-switch让多版本 Xcode 部署快速且不易破坏现有环境。 - +
xcodes list与xcodes installed无需 Apple ID 认证即可执行。
注意事项与踩坑点
- ! 仅支持 macOS,无
--json结构化输出。 - ! 直接从 Apple 下载可能因交互式 2FA 阻塞,无头环境建议配合本地
.xip使用--path。