xcodebuild-list
List Xcode project targets, schemes, and configurations with intelligent caching to avoid repeated discovery. Validates setup, returns structured data for automation.
Instructions
xcodebuild-list
⚡ List project targets, schemes, and configurations with intelligent caching
What it does
Discovers and returns all available build targets, schemes, and configurations for an Xcode project or workspace. Uses 1-hour intelligent caching to remember results and avoid expensive re-runs of project discovery. Validates both Xcode installation and project path before execution to provide clear error messages if something is misconfigured.
Why you'd use it
Discover available schemes before building or testing (essential for automation)
Validate project structure and configuration
Get structured project metadata for CI/CD pipelines
Avoid expensive repeated queries with 1-hour caching
Parameters
Required
projectPath (string): Path to .xcodeproj or .xcworkspace file
Optional
outputFormat (string, default: 'json'): "json" or "text" output format
Returns
Structured JSON containing all targets, schemes, configurations, and project information. Consistent format across .xcodeproj and .xcworkspace project types. Results are cached for 1 hour to speed up subsequent queries.
Examples
List schemes for a project
const info = await xcodebuildListTool({
projectPath: "/path/to/MyApp.xcodeproj"
});List with text output
const textInfo = await xcodebuildListTool({
projectPath: "/path/to/MyApp.xcworkspace",
outputFormat: "text"
});Related Tools
xcodebuild-build: Build discovered schemes
xcodebuild-test: Test discovered schemes
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | Yes | ||
| outputFormat | No | json |