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: think of it as an app store you use from the terminal. Instead of downloading developer tools one website at a time, you use Homebrew to find, install, and update packages. A package can be a program, library, or other tool. section 2.1

Homebrew helps select a compatible version for your Mac and installs dependencies—the other software a program needs. It also provides a central way to update installed tools. For example, you can use it to set up Python, VS Code, and Ollama. section 2.1 section 2.0

Install Homebrew on a Mac

Open Terminal and check https://brew.sh for the current installation command. The command shown here downloads an installer script with curl and runs it with Bash: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" When prompted, enter your Mac login password. No characters or dots appear as you type; this is normal. The installer uses the password for temporary elevated permission. Lines beginning with ==> report progress and do not require a response. section 2.2 section 2.2.2

On Apple Silicon Macs, Homebrew stores packages in versioned folders under /opt/homebrew/Cellar/. It places symbolic links—shortcuts to those files—in /opt/homebrew/bin/, so the shell can find commands such as wget. On Intel Macs, Homebrew uses /usr/local/ instead; the commands remain the same. section 2.6

Figure 2.3 Homebrew’s directory layout under /opt/homebrew/. Each package is stored in its own versioned folder inside Cellar/. The bin/ directory contains symbolic links (shortcuts) that point back to the actual program files in Cellar/. When you type a command such as wget, the shell finds its shortcut in bin/ and follows the link to the real program.

Follow the link from bin/ to a package in Cellar/ to see how the shell finds an installed command. section 2.6

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

How deep it goes
Explains installation, package management benefits, and file layout, including how symbolic links lead to installed programs.
Examples
Uses wget as a first package and illustrates the Homebrew installer and its progress messages.
What it assumes
Introduces package management from zero after terminal navigation, without requiring prior command-line experience.
What you can do after
Operate/configure Homebrew to install and manage software on macOS.
How it connects
Connects package management with terminal commands, software dependencies, symbolic links, and shell execution.

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.