CLI 目录 横向对比 FCRS-1.0 标准 /llms.txt
← 返回 CLI 目录

ipatool

$ ipatool 社区开源 中风险
Majd Alfhaily · 办公协作与 SaaS · MIT · macos / linux / windows

ipatool(majd/ipatool)可在 macOS、Linux 与 Windows 上调用 iOS App Store 接口搜索应用、列出历史版本、获取免费应用许可(purchase)并下载 .ipa 包(download)。内置 --format json 与 --non-interactive 标志,便于脚本自动化。

FCRS-1.0 综合评分
78 /100
良好 (Good)
中置信度 (源码/文档)
零摩擦安装命令
brew install ipatool
CLI vs MCP 选型建议 仅 CLI 可用

ipatool 直接将较大体积的 .ipa 二进制流式写入本地磁盘,并通过系统钥匙串或 --keychain-passphrase 管理 Apple 商店会话,适合纯本地 CLI 执行。

Agent 友好度体检单

✓ 原生 JSON 输出
— 字段裁剪
✓ 无头非交互
— 支持 Dry-Run
— 只读模式开关
— 支持 NO_COLOR
✓ 自省/Schema 发现
— 官方 SKILL.md

当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。

FCRS-1.0 六维评分拆解

Agent 友好度 21 / 25

全局支持 --format json 与 --non-interactive 标志,覆盖 search、list-versions、purchase 与 download。

  • Supports global --format json and --non-interactive flags
  • Explicit --bundle-identifier flag avoids positional ambiguity
安全与权限边界 18 / 25

通过钥匙串与 --keychain-passphrase 保护 Apple ID 会话,但 purchase 会变更账号许可记录且缺少 --dry-run。

  • Encrypts session tokens in OS keychain or passphrase-protected store
  • No --dry-run before purchase or download
安装与运行摩擦 13 / 15

跨平台 Go 二进制,可通过 brew install ipatool 或 GitHub Releases 在 macOS、Linux、Windows 安装。

  • Single static Go binary with cross-platform support
能力覆盖与边际价值 11 / 15

专注且不可替代的程序化 iOS .ipa 获取与版本检查工具。

  • Enables headless .ipa archival and security analysis pipelines
维护与来源背书 8 / 10

维护良好的 MIT 项目(majd/ipatool),但底层依赖非公开 Apple App Store 接口。

  • MIT-licensed majd/ipatool repository
文档与可验证性 7 / 10

Cobra 生成的 --help 与 README 示例清晰,但无头 CI 中 --keychain-passphrase 配置需注意细节。

  • Structured --help output and GitHub README examples

安全边界、鉴权与放权指南

鉴权方式
系统钥匙串 本地配置文件
凭证存储位置

将 Apple ID 会话令牌保存在系统钥匙串中,或在无头 Linux 上通过 --keychain-passphrase 加密文件存储。

潜在副作用
只读查询 本地写入
费用与配额提示

MIT 开源 CLI 免费;初次执行 auth login 需使用有效的 Apple ID 并完成双重认证。

可复制到 CLAUDE.md / AGENTS.md 的安全护栏
# 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 高频安全命令配方

只读查询(安全推荐)

以 JSON 搜索 iOS App Store 应用
ipatool search "Slack" --format json --non-interactive

检索 iOS App Store 目录并以 JSON 返回匹配的 Bundle ID 与版本信息。

列出指定 Bundle 的历史版本号
ipatool list-versions --bundle-identifier com.tinyspeck.chatlyio --format json --non-interactive

查询 iOS 应用的外部版本 ID 列表,不下载任何 .ipa 文件。

受控写入与预演

非交互式下载 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 接口,上游变更时需及时升级工具版本。

已验证兼容的 Agent 宿主

Claude Code Codex CLI Gemini CLI