ipatool
$ ipatool 社区开源 中风险ipatool(majd/ipatool)可在 macOS、Linux 与 Windows 上调用 iOS App Store 接口搜索应用、列出历史版本、获取免费应用许可(purchase)并下载 .ipa 包(download)。内置 --format json 与 --non-interactive 标志,便于脚本自动化。
brew install ipatool ipatool 直接将较大体积的 .ipa 二进制流式写入本地磁盘,并通过系统钥匙串或 --keychain-passphrase 管理 Apple 商店会话,适合纯本地 CLI 执行。
Agent 友好度体检单
当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。
FCRS-1.0 六维评分拆解
全局支持 --format json 与 --non-interactive 标志,覆盖 search、list-versions、purchase 与 download。
- Supports global
--format jsonand--non-interactiveflags - Explicit
--bundle-identifierflag avoids positional ambiguity
通过钥匙串与 --keychain-passphrase 保护 Apple ID 会话,但 purchase 会变更账号许可记录且缺少 --dry-run。
- Encrypts session tokens in OS keychain or passphrase-protected store
- No
--dry-runbeforepurchaseordownload
跨平台 Go 二进制,可通过 brew install ipatool 或 GitHub Releases 在 macOS、Linux、Windows 安装。
- Single static Go binary with cross-platform support
专注且不可替代的程序化 iOS .ipa 获取与版本检查工具。
- Enables headless
.ipaarchival and security analysis pipelines
维护良好的 MIT 项目(majd/ipatool),但底层依赖非公开 Apple App Store 接口。
- MIT-licensed
majd/ipatoolrepository
Cobra 生成的 --help 与 README 示例清晰,但无头 CI 中 --keychain-passphrase 配置需注意细节。
- Structured
--helpoutput and GitHub README examples
安全边界、鉴权与放权指南
将 Apple ID 会话令牌保存在系统钥匙串中,或在无头 Linux 上通过 --keychain-passphrase 加密文件存储。
MIT 开源 CLI 免费;初次执行 auth login 需使用有效的 Apple ID 并完成双重认证。
# ipatool Agent Rules - Always pass `--format json --non-interactive` so commands never hang on TTY prompts. - Run `ipatool search` or `list-versions` before calling `purchase` or `download`. - Only call `purchase` for explicitly approved free bundle IDs.
Agent 高频安全命令配方
只读查询(安全推荐)
ipatool search "Slack" --format json --non-interactive
检索 iOS App Store 目录并以 JSON 返回匹配的 Bundle ID 与版本信息。
ipatool list-versions --bundle-identifier com.tinyspeck.chatlyio --format json --non-interactive
查询 iOS 应用的外部版本 ID 列表,不下载任何 .ipa 文件。
受控写入与预演
ipatool download --bundle-identifier com.example.app --output ./out.ipa --format json --non-interactive
将已授权 Bundle ID 的 .ipa 包下载至 ./out.ipa 并输出 JSON 状态。
核心优势
- +
--format json --non-interactive组合让 iOS App Store 检索脚本化非常稳定。 - + 配合
--keychain-passphrase可在 Linux CI 上跨平台运行,不依赖 macOS。
注意事项与踩坑点
- ! 首次执行
ipatool auth login需交互式完成 Apple ID 双重认证。 - ! 依赖非官方 Apple App Store 接口,上游变更时需及时升级工具版本。