xcinfo

Tool to get information about and install available Xcode versions

brewmacoslinux
Try with needOr install directly
Source

About

Tool to get information about and install available Xcode versions

Commands

xcinfo

Examples

List all available Xcode versions$ xcinfo list
Install a specific Xcode version$ xcinfo install 14.2
Show information about installed Xcode versions$ xcinfo installed