|
| 1 | +# Reloaderoo + XcodeBuildMCP: Curated CLI Primer |
| 2 | + |
| 3 | +Use this primer to drive XcodeBuildMCP entirely through Reloaderoo—treating it like a CLI. It is designed to be included in your agent’s context to show exactly how to invoke the specific tools your project needs. |
| 4 | + |
| 5 | +Why this file: |
| 6 | +- XcodeBuildMCP exposes many tools. Dumping the full tool surface into the context wastes tokens. |
| 7 | +- Instead, copy this file into your project and delete everything you don’t need. Keep only the commands relevant to your workflow (e.g., just Simulator tools). |
| 8 | +- Your trimmed version becomes a small, project‑specific reference that tells your agent precisely which Reloaderoo tool calls to make. |
| 9 | + |
| 10 | +How to use this primer: |
| 11 | +1. Copy this file into your repo (e.g., docs/xcodebuildmcp_primer.md or AGENTS.md). |
| 12 | +2. Remove all sections and commands you don’t use. Keep it minimal. |
| 13 | +3. Replace placeholders with your real values (paths, schemes, simulator UUIDs/Names, bundle IDs, etc.). |
| 14 | +4. Use the quiet (-q) examples to reduce noise; pipe output to jq when you only need the content. |
| 15 | +5. Include your curated file in the agent context whenever you want it to call XcodeBuildMCP via Reloaderoo. |
| 16 | + |
| 17 | +Conventions in the examples: |
| 18 | +- Calls use: npx reloaderoo@latest inspect … -q -- npx xcodebuildmcp@latest |
| 19 | +- Parameters are passed as JSON via --params. |
| 20 | +- Resources are read with read-resource (e.g., xcodebuildmcp://simulators). |
| 21 | +- Use jq -r '.contents[].text' to extract the textual results when needed. |
| 22 | + |
| 23 | +Keep it small. The smaller your curated primer, the less context your agent needs—and the cheaper, faster, and more reliable your interactions will be. |
| 24 | + |
| 25 | +## Installation |
| 26 | + |
| 27 | +Reloaderoo is available via npm and can be used with npx for universal compatibility. |
| 28 | + |
| 29 | +```bash |
| 30 | +# Use npx to run reloaderoo |
| 31 | +npx reloaderoo@latest --help |
| 32 | +``` |
| 33 | + |
| 34 | +## Hint |
| 35 | + |
| 36 | +Use jq to parse the output to get just the content response: |
| 37 | + |
| 38 | +```bash |
| 39 | + npx reloaderoo@latest inspect read-resource "xcodebuildmcp://simulators" -q -- npx xcodebuildmcp@latest | jq -r '.contents[].text' |
| 40 | + ``` |
| 41 | + |
| 42 | +**Example Tool Calls:** |
| 43 | + |
| 44 | +## Dynamic Tool Discovery |
| 45 | + |
| 46 | +- **`discover_tools`**: Analyzes a task description to enable relevant tools. |
| 47 | + ```bash |
| 48 | + npx reloaderoo@latest inspect call-tool discover_tools --params '{"task_description": "I want to build and run my iOS app on a simulator."}' -q -- npx xcodebuildmcp@latest |
| 49 | + ``` |
| 50 | + |
| 51 | +## iOS Device Development |
| 52 | + |
| 53 | +- **`build_device`**: Builds an app for a physical device. |
| 54 | + ```bash |
| 55 | + npx reloaderoo@latest inspect -q call-tool build_device --params '{"projectPath": "/path/to/MyProject.xcodeproj", "scheme": "MyScheme"}' -q -- npx xcodebuildmcp@latest |
| 56 | + ``` |
| 57 | +- **`get_device_app_path`**: Gets the `.app` bundle path for a device build. |
| 58 | + ```bash |
| 59 | + npx reloaderoo@latest inspect call-tool get_device_app_path --params '{"projectPath": "/path/to/MyProject.xcodeproj", "scheme": "MyScheme"}' -q -- npx xcodebuildmcp@latest |
| 60 | + ``` |
| 61 | +- **`install_app_device`**: Installs an app on a physical device. |
| 62 | + ```bash |
| 63 | + npx reloaderoo@latest inspect call-tool install_app_device --params '{"deviceId": "DEVICE_UDID", "appPath": "/path/to/MyApp.app"}' -q -- npx xcodebuildmcp@latest |
| 64 | + ``` |
| 65 | +- **`launch_app_device`**: Launches an app on a physical device. |
| 66 | + ```bash |
| 67 | + npx reloaderoo@latest inspect call-tool launch_app_device --params '{"deviceId": "DEVICE_UDID", "bundleId": "com.example.MyApp"}' -q -- npx xcodebuildmcp@latest |
| 68 | + ``` |
| 69 | +- **`list_devices`**: Lists connected physical devices. |
| 70 | + ```bash |
| 71 | + npx reloaderoo@latest inspect call-tool list_devices --params '{}' -q -- npx xcodebuildmcp@latest |
| 72 | + ``` |
| 73 | +- **`stop_app_device`**: Stops an app on a physical device. |
| 74 | + ```bash |
| 75 | + npx reloaderoo@latest inspect call-tool stop_app_device --params '{"deviceId": "DEVICE_UDID", "processId": 12345}' -q -- npx xcodebuildmcp@latest |
| 76 | + ``` |
| 77 | +- **`test_device`**: Runs tests on a physical device. |
| 78 | + ```bash |
| 79 | + npx reloaderoo@latest inspect call-tool test_device --params '{"projectPath": "/path/to/MyProject.xcodeproj", "scheme": "MyScheme", "deviceId": "DEVICE_UDID"}' -q -- npx xcodebuildmcp@latest |
| 80 | + ``` |
| 81 | + |
| 82 | +## iOS Simulator Development |
| 83 | + |
| 84 | +- **`boot_sim`**: Boots a simulator. |
| 85 | + ```bash |
| 86 | + npx reloaderoo@latest inspect call-tool boot_sim --params '{"simulatorUuid": "SIMULATOR_UUID"}' -q -- npx xcodebuildmcp@latest |
| 87 | + ``` |
| 88 | +- **`build_run_sim`**: Builds and runs an app on a simulator. |
| 89 | + ```bash |
| 90 | + npx reloaderoo@latest inspect call-tool build_run_sim --params '{"projectPath": "/path/to/MyProject.xcodeproj", "scheme": "MyScheme", "simulatorName": "iPhone 16"}' -q -- npx xcodebuildmcp@latest |
| 91 | + ``` |
| 92 | +- **`build_sim`**: Builds an app for a simulator. |
| 93 | + ```bash |
| 94 | + npx reloaderoo@latest inspect call-tool build_sim --params '{"projectPath": "/path/to/MyProject.xcodeproj", "scheme": "MyScheme", "simulatorName": "iPhone 16"}' -q -- npx xcodebuildmcp@latest |
| 95 | + ``` |
| 96 | +- **`get_sim_app_path`**: Gets the `.app` bundle path for a simulator build. |
| 97 | + ```bash |
| 98 | + npx reloaderoo@latest inspect call-tool get_sim_app_path --params '{"projectPath": "/path/to/MyProject.xcodeproj", "scheme": "MyScheme", "platform": "iOS Simulator", "simulatorName": "iPhone 16"}' -q -- npx xcodebuildmcp@latest |
| 99 | + ``` |
| 100 | +- **`install_app_sim`**: Installs an app on a simulator. |
| 101 | + ```bash |
| 102 | + npx reloaderoo@latest inspect call-tool install_app_sim --params '{"simulatorUuid": "SIMULATOR_UUID", "appPath": "/path/to/MyApp.app"}' -q -- npx xcodebuildmcp@latest |
| 103 | + ``` |
| 104 | +- **`launch_app_logs_sim`**: Launches an app on a simulator with log capture. |
| 105 | + ```bash |
| 106 | + npx reloaderoo@latest inspect call-tool launch_app_logs_sim --params '{"simulatorUuid": "SIMULATOR_UUID", "bundleId": "com.example.MyApp"}' -q -- npx xcodebuildmcp@latest |
| 107 | + ``` |
| 108 | +- **`launch_app_sim`**: Launches an app on a simulator. |
| 109 | + ```bash |
| 110 | + npx reloaderoo@latest inspect call-tool launch_app_sim --params '{"simulatorName": "iPhone 16", "bundleId": "com.example.MyApp"}' -q -- npx xcodebuildmcp@latest |
| 111 | + ``` |
| 112 | +- **`list_sims`**: Lists available simulators. |
| 113 | + ```bash |
| 114 | + npx reloaderoo@latest inspect call-tool list_sims --params '{}' -q -- npx xcodebuildmcp@latest |
| 115 | + ``` |
| 116 | +- **`open_sim`**: Opens the Simulator application. |
| 117 | + ```bash |
| 118 | + npx reloaderoo@latest inspect call-tool open_sim --params '{}' -q -- npx xcodebuildmcp@latest |
| 119 | + ``` |
| 120 | +- **`stop_app_sim`**: Stops an app on a simulator. |
| 121 | + ```bash |
| 122 | + npx reloaderoo@latest inspect call-tool stop_app_sim --params '{"simulatorName": "iPhone 16", "bundleId": "com.example.MyApp"}' -q -- npx xcodebuildmcp@latest |
| 123 | + ``` |
| 124 | +- **`test_sim`**: Runs tests on a simulator. |
| 125 | + ```bash |
| 126 | + npx reloaderoo@latest inspect call-tool test_sim --params '{"projectPath": "/path/to/MyProject.xcodeproj", "scheme": "MyScheme", "simulatorName": "iPhone 16"}' -q -- npx xcodebuildmcp@latest |
| 127 | + ``` |
| 128 | + |
| 129 | +## Log Capture & Management |
| 130 | + |
| 131 | +- **`start_device_log_cap`**: Starts log capture for a physical device. |
| 132 | + ```bash |
| 133 | + npx reloaderoo@latest inspect call-tool start_device_log_cap --params '{"deviceId": "DEVICE_UDID", "bundleId": "com.example.MyApp"}' -q -- npx xcodebuildmcp@latest |
| 134 | + ``` |
| 135 | +- **`start_sim_log_cap`**: Starts log capture for a simulator. |
| 136 | + ```bash |
| 137 | + npx reloaderoo@latest inspect call-tool start_sim_log_cap --params '{"simulatorUuid": "SIMULATOR_UUID", "bundleId": "com.example.MyApp"}' -q -- npx xcodebuildmcp@latest |
| 138 | + ``` |
| 139 | +- **`stop_device_log_cap`**: Stops log capture for a physical device. |
| 140 | + ```bash |
| 141 | + npx reloaderoo@latest inspect call-tool stop_device_log_cap --params '{"logSessionId": "SESSION_ID"}' -q -- npx xcodebuildmcp@latest |
| 142 | + ``` |
| 143 | +- **`stop_sim_log_cap`**: Stops log capture for a simulator. |
| 144 | + ```bash |
| 145 | + npx reloaderoo@latest inspect call-tool stop_sim_log_cap --params '{"logSessionId": "SESSION_ID"}' -q -- npx xcodebuildmcp@latest |
| 146 | + ``` |
| 147 | + |
| 148 | +## macOS Development |
| 149 | + |
| 150 | +- **`build_macos`**: Builds a macOS app. |
| 151 | + ```bash |
| 152 | + npx reloaderoo@latest inspect call-tool build_macos --params '{"projectPath": "/path/to/MyProject.xcodeproj", "scheme": "MyScheme"}' -q -- npx xcodebuildmcp@latest |
| 153 | + ``` |
| 154 | +- **`build_run_macos`**: Builds and runs a macOS app. |
| 155 | + ```bash |
| 156 | + npx reloaderoo@latest inspect call-tool build_run_macos --params '{"projectPath": "/path/to/MyProject.xcodeproj", "scheme": "MyScheme"}' -q -- npx xcodebuildmcp@latest |
| 157 | + ``` |
| 158 | +- **`get_mac_app_path`**: Gets the `.app` bundle path for a macOS build. |
| 159 | + ```bash |
| 160 | + npx reloaderoo@latest inspect call-tool get_mac_app_path --params '{"projectPath": "/path/to/MyProject.xcodeproj", "scheme": "MyScheme"}' -q -- npx xcodebuildmcp@latest |
| 161 | + ``` |
| 162 | +- **`launch_mac_app`**: Launches a macOS app. |
| 163 | + ```bash |
| 164 | + npx reloaderoo@latest inspect call-tool launch_mac_app --params '{"appPath": "/Applications/Calculator.app"}' -q -- npx xcodebuildmcp@latest |
| 165 | + ``` |
| 166 | +- **`stop_mac_app`**: Stops a macOS app. |
| 167 | + ```bash |
| 168 | + npx reloaderoo@latest inspect call-tool stop_mac_app --params '{"appName": "Calculator"}' -q -- npx xcodebuildmcp@latest |
| 169 | + ``` |
| 170 | +- **`test_macos`**: Runs tests for a macOS project. |
| 171 | + ```bash |
| 172 | + npx reloaderoo@latest inspect call-tool test_macos --params '{"projectPath": "/path/to/MyProject.xcodeproj", "scheme": "MyScheme"}' -q -- npx xcodebuildmcp@latest |
| 173 | + ``` |
| 174 | + |
| 175 | +## Project Discovery |
| 176 | + |
| 177 | +- **`discover_projs`**: Discovers Xcode projects and workspaces. |
| 178 | + ```bash |
| 179 | + npx reloaderoo@latest inspect call-tool discover_projs --params '{"workspaceRoot": "/path/to/workspace"}' -q -- npx xcodebuildmcp@latest |
| 180 | + ``` |
| 181 | +- **`get_app_bundle_id`**: Gets an app's bundle identifier. |
| 182 | + ```bash |
| 183 | + npx reloaderoo@latest inspect call-tool get_app_bundle_id --params '{"appPath": "/path/to/MyApp.app"}' -q -- npx xcodebuildmcp@latest |
| 184 | + ``` |
| 185 | +- **`get_mac_bundle_id`**: Gets a macOS app's bundle identifier. |
| 186 | + ```bash |
| 187 | + npx reloaderoo@latest inspect call-tool get_mac_bundle_id --params '{"appPath": "/Applications/Calculator.app"}' -q -- npx xcodebuildmcp@latest |
| 188 | + ``` |
| 189 | +- **`list_schemes`**: Lists schemes in a project or workspace. |
| 190 | + ```bash |
| 191 | + npx reloaderoo@latest inspect call-tool list_schemes --params '{"projectPath": "/path/to/MyProject.xcodeproj"}' -q -- npx xcodebuildmcp@latest |
| 192 | + ``` |
| 193 | +- **`show_build_settings`**: Shows build settings for a scheme. |
| 194 | + ```bash |
| 195 | + npx reloaderoo@latest inspect call-tool show_build_settings --params '{"projectPath": "/path/to/MyProject.xcodeproj", "scheme": "MyScheme"}' -q -- npx xcodebuildmcp@latest |
| 196 | + ``` |
| 197 | + |
| 198 | +## Project Scaffolding |
| 199 | + |
| 200 | +- **`scaffold_ios_project`**: Scaffolds a new iOS project. |
| 201 | + ```bash |
| 202 | + npx reloaderoo@latest inspect call-tool scaffold_ios_project --params '{"projectName": "MyNewApp", "outputPath": "/path/to/projects"}' -q -- npx xcodebuildmcp@latest |
| 203 | + ``` |
| 204 | +- **`scaffold_macos_project`**: Scaffolds a new macOS project. |
| 205 | + ```bash |
| 206 | + npx reloaderoo@latest inspect call-tool scaffold_macos_project --params '{"projectName": "MyNewMacApp", "outputPath": "/path/to/projects"}' -q -- npx xcodebuildmcp@latest |
| 207 | + ``` |
| 208 | + |
| 209 | +## Project Utilities |
| 210 | + |
| 211 | +- **`clean`**: Cleans build artifacts. |
| 212 | + ```bash |
| 213 | + # For a project |
| 214 | + npx reloaderoo@latest inspect call-tool clean --params '{"projectPath": "/path/to/MyProject.xcodeproj"}' -q -- npx xcodebuildmcp@latest |
| 215 | + # For a workspace |
| 216 | + npx reloaderoo@latest inspect call-tool clean --params '{"workspacePath": "/path/to/MyWorkspace.xcworkspace", "scheme": "MyScheme"}' -q -- npx xcodebuildmcp@latest |
| 217 | + ``` |
| 218 | + |
| 219 | +## Simulator Management |
| 220 | + |
| 221 | +- **`reset_sim_location`**: Resets a simulator's location. |
| 222 | + ```bash |
| 223 | + npx reloaderoo@latest inspect call-tool reset_sim_location --params '{"simulatorUuid": "SIMULATOR_UUID"}' -q -- npx xcodebuildmcp@latest |
| 224 | + ``` |
| 225 | +- **`set_sim_appearance`**: Sets a simulator's appearance (dark/light mode). |
| 226 | + ```bash |
| 227 | + npx reloaderoo@latest inspect call-tool set_sim_appearance --params '{"simulatorUuid": "SIMULATOR_UUID", "mode": "dark"}' -q -- npx xcodebuildmcp@latest |
| 228 | + ``` |
| 229 | +- **`set_sim_location`**: Sets a simulator's GPS location. |
| 230 | + ```bash |
| 231 | + npx reloaderoo@latest inspect call-tool set_sim_location --params '{"simulatorUuid": "SIMULATOR_UUID", "latitude": 37.7749, "longitude": -122.4194}' -q -- npx xcodebuildmcp@latest |
| 232 | + ``` |
| 233 | +- **`sim_statusbar`**: Overrides a simulator's status bar. |
| 234 | + ```bash |
| 235 | + npx reloaderoo@latest inspect call-tool sim_statusbar --params '{"simulatorUuid": "SIMULATOR_UUID", "dataNetwork": "wifi"}' -q -- npx xcodebuildmcp@latest |
| 236 | + ``` |
| 237 | + |
| 238 | +## Swift Package Manager |
| 239 | + |
| 240 | +- **`swift_package_build`**: Builds a Swift package. |
| 241 | + ```bash |
| 242 | + npx reloaderoo@latest inspect call-tool swift_package_build --params '{"packagePath": "/path/to/package"}' -q -- npx xcodebuildmcp@latest |
| 243 | + ``` |
| 244 | +- **`swift_package_clean`**: Cleans a Swift package. |
| 245 | + ```bash |
| 246 | + npx reloaderoo@latest inspect call-tool swift_package_clean --params '{"packagePath": "/path/to/package"}' -q -- npx xcodebuildmcp@latest |
| 247 | + ``` |
| 248 | +- **`swift_package_list`**: Lists running Swift package processes. |
| 249 | + ```bash |
| 250 | + npx reloaderoo@latest inspect call-tool swift_package_list --params '{}' -q -- npx xcodebuildmcp@latest |
| 251 | + ``` |
| 252 | +- **`swift_package_run`**: Runs a Swift package executable. |
| 253 | + ```bash |
| 254 | + npx reloaderoo@latest inspect call-tool swift_package_run --params '{"packagePath": "/path/to/package"}' -q -- npx xcodebuildmcp@latest |
| 255 | + ``` |
| 256 | +- **`swift_package_stop`**: Stops a running Swift package process. |
| 257 | + ```bash |
| 258 | + npx reloaderoo@latest inspect call-tool swift_package_stop --params '{"pid": 12345}' -q -- npx xcodebuildmcp@latest |
| 259 | + ``` |
| 260 | +- **`swift_package_test`**: Tests a Swift package. |
| 261 | + ```bash |
| 262 | + npx reloaderoo@latest inspect call-tool swift_package_test --params '{"packagePath": "/path/to/package"}' -q -- npx xcodebuildmcp@latest |
| 263 | + ``` |
| 264 | + |
| 265 | +## System Doctor |
| 266 | + |
| 267 | +- **`doctor`**: Runs system diagnostics. |
| 268 | + ```bash |
| 269 | + npx reloaderoo@latest inspect call-tool doctor --params '{}' -q -- npx xcodebuildmcp@latest |
| 270 | + ``` |
| 271 | + |
| 272 | +## UI Testing & Automation |
| 273 | + |
| 274 | +- **`button`**: Simulates a hardware button press. |
| 275 | + ```bash |
| 276 | + npx reloaderoo@latest inspect call-tool button --params '{"simulatorUuid": "SIMULATOR_UUID", "buttonType": "home"}' -q -- npx xcodebuildmcp@latest |
| 277 | + ``` |
| 278 | +- **`describe_ui`**: Gets the UI hierarchy of the current screen. |
| 279 | + ```bash |
| 280 | + npx reloaderoo@latest inspect call-tool describe_ui --params '{"simulatorUuid": "SIMULATOR_UUID"}' -q -- npx xcodebuildmcp@latest |
| 281 | + ``` |
| 282 | +- **`gesture`**: Performs a pre-defined gesture. |
| 283 | + ```bash |
| 284 | + npx reloaderoo@latest inspect call-tool gesture --params '{"simulatorUuid": "SIMULATOR_UUID", "preset": "scroll-up"}' -q -- npx xcodebuildmcp@latest |
| 285 | + ``` |
| 286 | +- **`key_press`**: Simulates a key press. |
| 287 | + ```bash |
| 288 | + npx reloaderoo@latest inspect call-tool key_press --params '{"simulatorUuid": "SIMULATOR_UUID", "keyCode": 40}' -q -- npx xcodebuildmcp@latest |
| 289 | + ``` |
| 290 | +- **`key_sequence`**: Simulates a sequence of key presses. |
| 291 | + ```bash |
| 292 | + npx reloaderoo@latest inspect call-tool key_sequence --params '{"simulatorUuid": "SIMULATOR_UUID", "keyCodes": [40, 42, 44]}' -q -- npx xcodebuildmcp@latest |
| 293 | + ``` |
| 294 | +- **`long_press`**: Performs a long press at coordinates. |
| 295 | + ```bash |
| 296 | + npx reloaderoo@latest inspect call-tool long_press --params '{"simulatorUuid": "SIMULATOR_UUID", "x": 100, "y": 200, "duration": 1500}' -q -- npx xcodebuildmcp@latest |
| 297 | + ``` |
| 298 | +- **`screenshot`**: Takes a screenshot. |
| 299 | + ```bash |
| 300 | + npx reloaderoo@latest inspect call-tool screenshot --params '{"simulatorUuid": "SIMULATOR_UUID"}' -q -- npx xcodebuildmcp@latest |
| 301 | + ``` |
| 302 | +- **`swipe`**: Performs a swipe gesture. |
| 303 | + ```bash |
| 304 | + npx reloaderoo@latest inspect call-tool swipe --params '{"simulatorUuid": "SIMULATOR_UUID", "x1": 100, "y1": 200, "x2": 100, "y2": 400}' -q -- npx xcodebuildmcp@latest |
| 305 | + ``` |
| 306 | +- **`tap`**: Performs a tap at coordinates. |
| 307 | + ```bash |
| 308 | + npx reloaderoo@latest inspect call-tool tap --params '{"simulatorUuid": "SIMULATOR_UUID", "x": 100, "y": 200}' -q -- npx xcodebuildmcp@latest |
| 309 | + ``` |
| 310 | +- **`touch`**: Simulates a touch down or up event. |
| 311 | + ```bash |
| 312 | + npx reloaderoo@latest inspect call-tool touch --params '{"simulatorUuid": "SIMULATOR_UUID", "x": 100, "y": 200, "down": true}' -q -- npx xcodebuildmcp@latest |
| 313 | + ``` |
| 314 | +- **`type_text`**: Types text into the focused element. |
| 315 | + ```bash |
| 316 | + npx reloaderoo@latest inspect call-tool type_text --params '{"simulatorUuid": "SIMULATOR_UUID", "text": "Hello, World!"}' -q -- npx xcodebuildmcp@latest |
| 317 | + ``` |
| 318 | + |
| 319 | +## Resources |
| 320 | + |
| 321 | +- **Read devices resource**: |
| 322 | + ```bash |
| 323 | + npx reloaderoo@latest inspect read-resource "xcodebuildmcp://devices" -q -- npx xcodebuildmcp@latest |
| 324 | + ``` |
| 325 | +- **Read simulators resource**: |
| 326 | + ```bash |
| 327 | + npx reloaderoo@latest inspect read-resource "xcodebuildmcp://simulators" -q -- npx xcodebuildmcp@latest |
| 328 | + ``` |
| 329 | +- **Read doctor resource**: |
| 330 | + ```bash |
| 331 | + npx reloaderoo@latest inspect read-resource "xcodebuildmcp://doctor" -q -- npx xcodebuildmcp@latest |
| 332 | + ``` |
0 commit comments