install xcode command line tools code example
Example 1: install xcode tools using brew
xcode-select --install
Example 2: install xcode terminal
sudo xcode-select -switch /Applications/Xcodex.x.x.app
for more info
https://www.freecodecamp.org/news/how-to-download-and-install-xcode/
Example 3: reinstall xcode cli tools
sudo rm -rf $(xcode-select -print-path)
xcode-select --install
Example 4: Installing Command line tools for Xcode via CLI
Code Block sudo xcode-select --switch /Applications/Xcode-beta.appsudo xcode-select --install