Skip to content

Add Xcode management APIs (maui apple xcode list, select) #151

@rmarinho

Description

@rmarinho

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions