rtk-ai/rtk

feat: add `rtk xcrun` / `rtk simctl` wrapper for iOS simulator commands

Open

#2,030 创建于 2026年5月22日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)Rust (2,914 fork)batch import
area:clienhancementhelp wantedplatform:macospriority:medium

仓库指标

Star
 (48,085 star)
PR 合并指标
 (平均合并 11天 1小时) (30 天内合并 45 个 PR)

描述

feat: add rtk xcrun / rtk simctl wrapper for iOS simulator commands

Problem

xcrun simctl is the standard CLI for iOS Simulator automation (used by every iOS developer working with Claude Code, Cursor, Codex, etc.). Its output is plist-formatted and large — uncompressed it dominates LLM context windows.

Measured impact (gma-ios project, 30 days via rtk discover)

Command          Count   Example
xcrun simctl      1028   xcrun simctl listapps <UDID>
  • xcrun simctl listapps <UDID>31,835 bytes per call (OpenStep plist)
  • xcrun simctl list devices → 5,194 bytes
  • At ~4 chars/token: ~250K tokens/day wasted on plist output that LLMs only need 3-5 fields from

Proposed solution

Add rtk xcrun (or rtk simctl) subcommand that:

  1. listapps → strip plist envelope, return JSON array of {bundleID, displayName, path, sdk}
  2. list devices → compact table of {udid, name, state, runtime} only — skip unavailable runtimes
  3. list runtimes → version + identifier only
  4. bootstatus / getenv → pass through (already compact)

Example before/after

Before (31 KB):

{
    BundleContainer = "file:///Users/.../Containers/Bundle/Application/.../";
    CFBundleDisplayName = GreenCar;
    CFBundleExecutable = GreenCar;
    CFBundleIdentifier = "com.lotte.green-car";
    ...
}

After (rtk simctl listapps <UDID>, ~500 bytes):

[{"bundleID":"com.lotte.green-car","name":"GreenCar","sdk":"iphonesimulator"}]

Why high priority

iOS development with Claude Code / Cursor is a fast-growing use case. Every iOS LLM agent hits xcrun simctl constantly for app install / launch / UI inspection. Currently it's the #1 unhandled command in rtk discover for our codebase.

Related

  • #1551 (xcodebuild auto-rewrite) — same iOS workflow pain point
  • #1709 (xcodebuild filtering) — companion
  • rtk discover output snippet:
TOP UNHANDLED COMMANDS -- open an issue?
xcrun simctl              1028    xcrun simctl listapps <UDID>

Environment

  • RTK 0.40.0 (Homebrew, macOS arm64)
  • Use case: gma-ios — Swift/RIBs/SwiftUI app with iOS Simulator E2E tests via Claude Code workers

贡献者指南