Xcode is a soft dependency of Homebrew, but if you don't intend on using Xcode then it seems a waste to install the 4 GB program.

Instead, you can just install the command line tools for Xcode, which comes up to about 8K. Much better!

To install the command line tools, simply enter the following in your terminal.

xcode-select --install

Then you can install Homebrew as normal.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"