How To Install Homebrew in Mac Without Xcode

Homebrew is a popular package manager for macOS that allows users to easily install and manage various software packages and libraries. While Homebrew is a great tool, it traditionally requires the installation of Xcode, Apple’s integrated development environment, in order to work.

Installing Xcode in your machine requires 8GB of internet bandwidth and about 40GB in your machine. If you are not developing mac/iPhone apps then its not worth it.

However, there are some ways to install Homebrew on a Mac without having to install Xcode.

Here’s how to do it:

  1. Open the Terminal app on your Mac. You can find this app in the “Utilities” folder within the “Applications” folder.

  2. Run the following command in the Terminal:

    export HOMEBREW_BREW_GIT_REMOTE="..."  # put your Git mirror of Homebrew/brew here
    export HOMEBREW_CORE_GIT_REMOTE="..."  # put your Git mirror of Homebrew/homebrew-core here
    /bin/bash -c "$(curl -fsSL"

    This command will download and run the Homebrew installer script.

  3. When prompted, type in your user account password to allow the installation process to proceed.

  4. Wait for the installation process to complete. This may take a few minutes.

  5. Once Homebrew is installed, you can start using it to install packages and libraries. For example, to install the wget package, simply run the following command:

        $ brew install wget
    This will download and install the `wget` package and any dependencies it requires.

And that’s it! With these steps, you can install Homebrew on your Mac without having to install Xcode. This can be useful for users who don’t want to install the entire Xcode development environment, or who don’t need Xcode for their specific use case.

It’s worth noting that while this method allows you to install Homebrew without Xcode, some packages may still require Xcode or other development tools to be installed in order to work properly. If you run into issues with a specific package, be sure to check its documentation to see if any additional tools or dependencies are required.