xcenv

Manage and switch between multiple Xcode versions easily

brewmacoslinux
Try with needOr install directly
Source

About

Xcode version manager

Commands

xcenv

Examples

List all installed Xcode versions$ xcenv versions
Set the global Xcode version to use$ xcenv global 14.2
Set Xcode version for current directory/project$ xcenv local 13.4