This file provides guidance to WARP (warp.dev) when working with code in this repository.
xcode-cli-tools is a lightweight alternative to XcodeBuildMCP that provides simple bash wrappers around Apple's Xcode development tools. The project consists of an installer script that sets up three core scripts for building iOS/visionOS apps and capturing console logs. This approach prioritizes simplicity, reliability, and token-efficiency over feature complexity - replacing 84+ complex tools with ~100 lines of battle-tested bash scripts.
The installer creates a .claude/scripts/ directory with wrapper scripts that capture xcodebuild output and simulator logs to timestamped files, enabling efficient grep-based searching instead of loading entire outputs into memory.
Install the scripts in any Xcode project directory:
bash install-xcode-scripts.shThis creates the necessary directory structure and installs three executable scripts:
./claude/scripts/xcodebuild- Xcode build wrapper./claude/scripts/capture-logs- App log capture./claude/scripts/stop-logs- Stop log capture
Build iOS/visionOS apps using the wrapper (captures output to timestamped files):
# Build for simulator
./claude/scripts/xcodebuild -workspace MyApp.xcworkspace -scheme MyApp build -destination 'generic/platform=visionOS Simulator'
# Build for device
./claude/scripts/xcodebuild -workspace MyApp.xcworkspace -scheme MyApp build -destination generic/platform=visionOS
# Run tests
./claude/scripts/xcodebuild -workspace MyApp.xcworkspace -scheme MyApp test -destination 'generic/platform=visionOS Simulator'Capture app console output during testing:
# Start log capture (filtering by bundle ID/subsystem)
./claude/scripts/capture-logs com.yourapp.vision
# Launch app in Xcode (Cmd+R) and interact with it
# Stop capture
./claude/scripts/stop-logsUse grep to efficiently search captured output:
# Find build errors
grep -i error ./build/xcodebuild/build-*.txt
# Find warnings
grep -i warning ./build/xcodebuild/build-*.txt
# Search app logs
grep -i crash ./build/logs/logs-*.txt
grep "MyViewController" ./build/logs/logs-*.txt
# Show context around matches
grep -C 3 "error" ./build/logs/logs-*.txt./
├── .claude/
│ ├── scripts/
│ │ ├── capture-logs # Log capture script
│ │ ├── stop-logs # Stop capture script
│ │ └── xcodebuild # Build wrapper script
│ └── building-with-xcode.md # Complete usage guide
└── build/
├── logs/ # Timestamped app logs
└── xcodebuild/ # Timestamped build outputs
- File-based outputs: All build and log outputs are saved to timestamped files rather than kept in memory
- Token-efficient: Use grep/head/tail to search specific information instead of loading entire outputs
- Reliable: Built on Apple's battle-tested tools (xcodebuild, simctl) with minimal abstraction
- Simple: No dependencies beyond standard macOS developer tools
After installation, read the comprehensive guide:
cat ./.claude/building-with-xcode.mdKey documentation files:
README.md- Project overview and quick startINSTALL-XCODE-SCRIPTS.md- Installation details and troubleshootingINSTALLER-USAGE.md- Advanced usage patterns and team distribution
If scripts aren't executable after installation:
chmod +x ./.claude/scripts/*If log capture fails with "Invalid simulator":
xcrun simctl list # Check available simulators
./claude/scripts/capture-logs com.yourapp.vision booted # Use 'booted' for active simulator