Feature Request: Make `--latest` Select the Latest Compatible Xcode
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 4.8k
- Forks
- 182
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 1
Description
Problem
Currently, xcodes install --latest selects the newest available Xcode release regardless of whether it is compatible with the current macOS version.
For example, on macOS Sequoia 15.7.4:
xcodes install --latest
may select Xcode 26.5, then fail because that version requires a newer version of macOS.
From a user perspective, this is surprising. Most users invoking --latest are trying to install the newest version of Xcode they can actually run, not the newest version that exists.
Proposed Solution
Change the behavior of:
xcodes install --latest
to resolve to the newest Xcode version compatible with the current macOS version.
For example:
| Current macOS | Available Xcodes | Result |
|---|---|---|
| Sequoia 15.7.4 | 26.2, 26.3, 26.4, 26.5 | 26.3 |
| Tahoe 26.2 | 26.2, 26.3, 26.4, 26.5 | 26.5 |
This would align with the principle of least surprise and eliminate a common failure mode.
Optional Explicit Flag
For users who intentionally want the newest available version regardless of compatibility, an explicit flag could be provided:
xcodes install --latest-available
or
xcodes install --latest --ignore-compatibility
This would preserve access to the current behavior while making the default behavior more useful.
Why This Helps
- Matches user expectations.
- Reduces installation failures.
- Eliminates the need to manually consult Apple's compatibility matrix.
- Provides a smoother experience when Apple drops support for older macOS versions.
- Still allows power users to explicitly request incompatible versions if desired.
Alternative
If changing the behavior of --latest would be considered a breaking change, consider introducing:
xcodes install --latest-compatible
and deprecating the current behavior over time.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the CLI entry point handling xcodes install --latest and trace how available Xcode versions and macOS compatibility are currently selected. Review existing compatibility tests, if present, and cover the Sequoia and Tahoe examples from the issue. Done means --latest selects the newest compatible version and the treatment of explicitly requested incompatible versions is defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, swift
- Domain
- cli, operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100