worktree-ios-dev 用于每个非交互式 iOS 构建或模拟器任务,调试、UI 自动化与日志流仍交给 xcodebuildmcp-cli。
用途与分工:构建/测试/运行/清理/打包测试/清除派生数据用顶层动词;项目生命周期(init、inspect config、doctor)用 proj 子命令;模拟器生命周期(pick、boot、shutdown、list、recreate、remove、cleanup、du、prune)用 sim 子命令。本地 Swift 包测试不要用 swift test,改用 test-package。
安装:uv tool install --editable /abs/path/to/worktree-ios-dev-tool/worktree_ios_dev_tool,需要 uv 与 ~/.local/bin 在 PATH 中;升级用 uv tool upgrade worktree-ios-dev-tool。可选 brew install mint 以启用更美观的 xcodebuild 输出。
每个 worktree 内:worktree-ios-dev-tool proj init 创建配置并更新 .gitignore;worktree-ios-dev-tool sim pick 选择模拟器。非 TTY 时自动切换为扁平输出,proj init 需显式传入 --project 与 --scheme 并加 --yes。sim pick 在非 TTY 下自动选首个可用设备与最新运行时,也可用 --device、--runtime 指定,--all-devices 放宽默认过滤。sim cleanup 与 sim prune 在非 TTY 外需 --yes。
限制:未运行 proj init 会以退出码 2 报错;未 sim pick 则需模拟器的动词报错;手动编辑 udid 建议改用 sim recreate;git worktree remove 前应运行 sim cleanup;遗留 config.toml 需手动迁移。退出码 0 正常、1 用户错误、2 环境错误、3 子进程失败。其他平台或收费信息暂未提供。