What This Script Does

The brew_setup_tahoe.sh script is the flagship entry point for the entire Brew Scripts toolkit. It provides a complete, end-to-end Homebrew installation and configuration experience that is designed to be both thorough and approachable, even for users who have never opened Terminal before. Rather than making assumptions about what you need, it walks you through every step interactively and lets you decide what to install, what to skip, and how to configure your system.

When you launch the script, the first thing it does is detect your Mac's processor architecture. This matters because Apple Silicon Macs (M1, M2, M3, M4, and later) use a different Homebrew installation path than older Intel-based Macs. On Apple Silicon, Homebrew installs to /opt/homebrew, while Intel Macs use /usr/local. The script handles this distinction automatically, ensuring that all subsequent PATH configurations and package installations point to the correct location for your hardware.

Next, the script checks whether Homebrew is already installed. If it is, the script validates the installation and moves on. If Homebrew is not present, the script downloads and runs the official Homebrew installer. It also checks for and installs the Xcode Command Line Tools if they are not already available, since many Homebrew packages depend on these tools for compilation.

Once Homebrew is ready, the script configures your shell environment by adding the appropriate Homebrew PATH entries to your shell profile. It detects whether you are using zsh (the default on modern macOS) or bash, and edits the corresponding configuration file — ~/.zshrc or ~/.bash_profile. This ensures that the brew command is available every time you open a new terminal window.

The interactive app installation phase is where the script truly shines. It reads your configuration file to determine which categories of applications you want to install — development tools, productivity apps, creative software, communication tools, and utilities. For each category, the script presents you with the list of apps and asks for confirmation before proceeding. You can accept the entire category, skip it entirely, or install apps one at a time. This level of control means you never install anything you did not explicitly approve.

Throughout the entire process, the script writes detailed logs to a file at ~/Library/Logs/HomebrewSetup.log. Every action, every success, and every error is recorded with timestamps and severity levels. If something goes wrong, the log file is your first resource for diagnosing the issue. The script also supports a --debug flag that produces even more verbose output for advanced troubleshooting scenarios.

Perhaps the most important safety feature is --dry-run mode. When you pass this flag, the script simulates the entire setup process without actually making any changes to your system. It shows you exactly what would happen — which packages would be installed, which files would be modified, and which system checks would pass or fail — without touching anything. This is strongly recommended for your first run so you can verify that everything looks correct before committing.

Usage

Run the script from the root of the Brew Scripts project directory. Make sure you have already made the script executable with chmod +x brew_setup_tahoe.sh before your first run.

# Preview all changes without modifying your system
./brew_setup_tahoe.sh --dry-run

# Run the full interactive setup
./brew_setup_tahoe.sh

# Run with verbose debug output for troubleshooting
./brew_setup_tahoe.sh --debug

The script will prompt you at each major step, so you always have the opportunity to review what is about to happen and decide whether to proceed. If you need to stop the script at any point, press Ctrl+C to cancel safely.

Options and Flags

Flag Description
--dry-run Simulate the entire setup process without making any changes. Shows what would be installed, configured, and modified.
--debug Enable verbose output that prints detailed information about each step, including system calls and their results. Useful for diagnosing issues.

Configuration

This script reads from your config/homebrew-scripts.conf file to determine which applications to install. The key settings that affect this script are:

Setting Effect
INSTALL_DEVELOPMENT_TOOLS When set to true, includes development tools like Visual Studio Code, Docker, and iTerm2 in the installation options.
INSTALL_PRODUCTIVITY_APPS When set to true, includes productivity applications like Notion, Obsidian, and Raycast.
INSTALL_CREATIVE_APPS When set to true, includes creative tools like Figma and Affinity Designer.
INSTALL_COMMUNICATION_APPS When set to true, includes communication apps like Slack, Discord, and Zoom.
INSTALL_UTILITIES When set to true, includes utility apps like AppCleaner, The Unarchiver, and Rectangle.
CUSTOM_APPS An array of additional Homebrew cask names to install beyond the category defaults.

If no configuration file is found, the script will still run but will skip the app installation phase and focus on installing and configuring Homebrew itself.

What Gets Changed

Understanding exactly what this script modifies on your system is important. Here is a complete list of changes the script may make:

  • Homebrew installation — Installed to /opt/homebrew on Apple Silicon Macs or /usr/local on Intel Macs. This includes the Homebrew core, tap repositories, and the package cache directory.
  • Shell profile — Your ~/.zshrc (or ~/.bash_profile for bash users) is updated with the Homebrew PATH entry so the brew command is available in all future terminal sessions.
  • Xcode Command Line Tools — If not already present, these are installed via Apple's software update mechanism. They provide essential compilers, libraries, and headers needed by many Homebrew packages.
  • Applications — Any apps you approve during the interactive selection are installed via brew install --cask and placed in your /Applications directory.
  • Log file — A detailed log is created at ~/Library/Logs/HomebrewSetup.log recording every action taken during the setup process.

No changes are made to system preferences, system-level configurations, or files outside of the directories listed above. All modifications are confined to your user account.

Related Scripts

  • Quick Bootstrap — A faster, opinionated alternative that requires no configuration file and installs a curated set of development tools.
  • Essential Apps Installer — If Homebrew is already installed and you just need to batch-install your apps from the config file, this focused script is a lighter option.