rtk-ai/rtk

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

Open

#2030 aperta il 22 mag 2026

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)Rust (2914 fork)batch import
area:clienhancementhelp wantedplatform:macospriority:medium

Metriche repository

Star
 (48.085 star)
Metriche merge PR
 (Merge medio 11g 1h) (45 PR mergiate in 30 g)

Descrizione

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

Guida contributor