How to install Homebrew without Command Line Tools if already have Xcode

I already have Xcode installed and want to install Homebrew. It wants to install Xcode Command Line Tools and I don't have space. Is there a way to install Homebrew without it trying to install the Command Line Tools?


I found the answer by searching the Homebrew Github Closed Issues for "Xcode":

https://github.com/Homebrew/brew/issues/10714

Homebrew requires Xcode Command Line Tools instead of Xcode for several reasons:

  • The CLT contains more SDKs than Xcode - Xcode usually only contains one SDK, and it may be newer than your OS, while the CLT always has a compatible SDK. Having a matching SDK is very important for some formulae.
  • The CLT is in a fixed location /Library/Developer/CommandLineTools while Xcode is not. This matters as some formulae (including Python) bake in paths into files at compile-time - if they pointed to Xcode then it will only work for people who have Xcode installed in the same place.

https://github.com/Homebrew/brew/issues/10714


Apple's website for downloading developer tools says that "If you use Xcode, these tools are already embedded in the IDE."

So you shouldn't need to install them again.

But, as mentioned in the commments: it's a 460 Mb download. If you don't have space for that, you're not going to have space for HomeBrew, or any of the things it installs.