xcodes
The best command-line tool to install and switch between multiple versions of Xcode.
xcodes is a command-line tool for Mac developers that makes it easy to install and switch between multiple versions of Xcode, Apple's development environment for building apps for iPhone, iPad, and Mac. Normally, managing more than one Xcode version involves manually downloading large files from Apple's website and keeping track of which version is active. xcodes automates that process.
The most common use is to run a single command like "xcodes install 15.2" and have it handle everything: authenticating with your Apple ID, downloading the file, unpacking it, moving it to your Applications folder, and verifying that it installed correctly. If you have aria2 installed, xcodes uses it to download files significantly faster by opening multiple connections at once. You can also install simulator runtimes for different iOS versions separately from Xcode itself.
Switching between versions is handled with the "xcodes select" command, which changes which Xcode your system uses when you build or run development tools. You can list installed versions, uninstall versions you no longer need, and check which versions are available to download.
For teams and CI pipelines, xcodes supports a small text file called .xcode-version placed in a project directory. This file declares which Xcode version the project expects, making it easy for everyone on a team to stay consistent without having to communicate the version out of band.
xcodes is available via Homebrew and is written in Swift. It is signed and notarized by Apple, meaning it will run without security warnings on modern macOS. A companion app with a graphical interface is available separately as Xcodes.app.