Summary
Add library APIs for Xcode management, supporting the maui apple xcode commands from the CLI spec.
Commands to Support
| Command |
Description |
maui apple xcode list |
List installed Xcode versions with path, version, build number, and default platform SDKs |
maui apple xcode select |
Select the active Xcode (wraps xcode-select -s, may require elevation) |
Requirements
xcode list
- Enumerate all Xcode installations (e.g. via
mdfind, /Applications/Xcode*.app, Spotlight)
- For each installation, report: path, version, build number, bundled SDK versions
- Indicate which is currently selected (
xcode-select -p)
xcode select
- Switch the active Xcode via
xcode-select -s <path>
- Handle elevation requirements (may need
sudo)
- Support
--dry-run (report what would change without executing)
Design Notes
- Builds on the existing
XcodeLocator class
- Results should be structured and JSON-serializable
- Selection may require interactive elevation — API should support non-interactive detection
Reference
Summary
Add library APIs for Xcode management, supporting the
maui apple xcodecommands from the CLI spec.Commands to Support
maui apple xcode listmaui apple xcode selectxcode-select -s, may require elevation)Requirements
xcode listmdfind,/Applications/Xcode*.app, Spotlight)xcode-select -p)xcode selectxcode-select -s <path>sudo)--dry-run(report what would change without executing)Design Notes
XcodeLocatorclassReference