Ability To Install Xcode Command Line Tools
It would be helpful to support installing just the command line tools instead of the full Xcode distribution.
Maybe the command would look something like this:
[$]> xcodes install 13.4 --tools
https://developer.apple.com/download/all/?q=Command%20Line%20Tools%20for%20Xcode%2013.4
https://download.developer.apple.com/Developer_Tools/Command_Line_Tools_for_Xcode_13.4/Command_Line_Tools_for_Xcode_13.4.dmg
I would just download it using curl but it seems to require authentication.
[$]> curl https://download.developer.apple.com/Developer_Tools/Command_Line_Tools_for_Xcode_13.4/Command_Line_Tools_for_Xcode_13.4.dmg -o ~/command_line_tools_for_xcode_13.4.dmg
Is this in a future roadmap? Is this a feature that the devs would be open to a pull request on?
Finding: Command Line Tools path constraint
I discovered that the Command Line Tools can only be accessed through the fixed path /Library/Developer/CommandLineTools. This applies to both xcode-select and the DEVELOPER_DIR environment variable — neither supports alternative paths for CLT (only different Xcode.app locations).
Using a versioned path like /Library/Developer/CommandLineTools-26.2.0 results in:
c++: error: unable to find Xcode installation from active developer path "/Library/Developer/CommandLineTools-26.2.0", use xcode-select to change
Implication for multi-version CLT support:
To manage multiple CLT versions, a symbolic link at /Library/Developer/CommandLineTools pointing to the desired versioned directory (e.g., CommandLineTools-26.2.0) is required.
Limitation: This means true parallel usage of different CLT versions is not possible — only one version can be active at a time. For parallel builds requiring different toolchains, using multiple Xcode versions with DEVELOPER_DIR is the only workaround.
Further investigation reveals that it works as long as the path ends in CommandLineTools. For example /opt/clt/26.2/CommandLineTools.