liveBook · Manning

Homebrew

As explained in Build Applications with Local AI Models on a Mac

Homebrew is a package manager for installing and managing software on macOS and other Unix-like systems.

Homebrew is a package manager for macOS: an app store for developer tools that you use from the terminal. Instead of finding each download yourself, you ask Homebrew to install a package. It handles the appropriate version for your Mac, any other software the package needs, and later updates. section 2.1

Figure 2.1 The Homebrew installation flow for a single package. Homebrew automatically handles version detection, dependency resolution, downloading, and installation. Updating installed packages is covered in section 2.5.

Follow one package through version detection, dependency resolution, downloading, and installation. section 2.1

To install Homebrew, open Terminal and use the installer command shown below. Read it from right to left: curl downloads the installer script, $( ) passes its output to the shell, and /bin/bash -c runs it. If the installer changes, get the current command from brew.sh and compare it with these parts before running it. section 2.2

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

The complete terminal command for installing Homebrew. section 2.2

Press Enter after typing the command. The installer may request your Mac login password; nothing appears on screen while you type it. Press Enter and let the installation finish. Lines beginning with ==> report progress—you do not need to respond to them. section 2.2.2

Where does a package go?

Consider wget, a first package to install. On an Apple Silicon Mac, Homebrew keeps packages in separate folders under /opt/homebrew/Cellar/ and puts symbolic links—shortcuts—in /opt/homebrew/bin/. When you type wget, the shell can follow its shortcut to the program. On an Intel Mac, the corresponding Homebrew location is /usr/local/; the commands stay the same. section 2.0 section 2.6

How Build Applications with Local AI Models on a Mac covers it

How deep it goes
Explains installation steps, installer execution, and package locations; describes daily commands as a goal without detailing their syntax here.
Examples
Uses an App Store comparison, the installer command, a password prompt, and wget’s path through Cellar and bin.
What it assumes
Assumes basic terminal navigation while introducing package managers without requiring prior command-line or programming experience.
What you can do after
Operate/configure it to install and manage software on macOS and recognize where installed commands are linked.
How it connects
Connects package management to dependencies, terminal commands, symbolic links, and installing Python, Ollama, and VS Code.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build Applications with Local AI Models on a Mac. The section links point to the parts of the book it draws on.