What This Script Does

The install-essential-apps.sh script is a focused, single-purpose tool designed to batch-install macOS applications from your Brew Scripts configuration file. While the full interactive setup script handles everything from Homebrew installation to shell configuration, this script assumes that Homebrew is already installed and working. Its sole job is to read your app preferences and install them efficiently using Homebrew Cask.

This script is particularly valuable in two scenarios. The first is after a clean macOS installation, when you have already set up Homebrew (perhaps using the full setup script or manually) and now need to rebuild your application collection. Instead of visiting dozens of websites, downloading individual installers, and dragging apps into your Applications folder one by one, this script handles the entire process in a single command. The second scenario is when you want to synchronize your app collection across multiple Macs — simply copy your config file to the new machine and run this script.

When executed, the script reads your config/homebrew-scripts.conf file and examines the category toggle flags. Each category — development tools, productivity apps, creative software, communication apps, and utilities — has its own boolean flag. For each enabled category, the script gathers the list of applications associated with that category and adds them to the installation queue. It also reads the CUSTOM_APPS array, which lets you specify additional applications beyond the predefined categories.

Before attempting to install any application, the script performs a duplicate check. It queries Homebrew to determine whether each app is already installed, either as a cask or as a formula. If an app is already present, the script skips it and moves on to the next one. This makes the script idempotent — you can run it as many times as you want without worrying about duplicate installations or wasted time reinstalling apps you already have.

As each application is processed, the script reports its status in real time. You see a clear indication of whether each app was successfully installed, was already present, or encountered an error during installation. Common errors include incorrect cask names, network connectivity issues, or insufficient disk space. When an error occurs, the script logs the details and continues with the remaining applications rather than stopping entirely.

At the end of the run, the script produces a summary report showing the total number of apps processed, how many were newly installed, how many were skipped because they were already present, and how many encountered errors. This summary is also written to the log file for future reference. The combination of real-time feedback and a final summary makes it easy to verify that everything was installed correctly.

Usage

Make sure your configuration file is set up before running this script. See the Getting Started guide for instructions on creating your config file.

# Preview which apps would be installed
./install-essential-apps.sh --dry-run

# Install all configured applications
./install-essential-apps.sh

The script requires an active internet connection to download applications. A wired connection or strong Wi-Fi signal is recommended, as some applications can be several hundred megabytes in size.

Options and Flags

Flag Description
--dry-run List all applications that would be installed without actually installing them. Useful for verifying your configuration before committing.

Configuration

This script is entirely driven by your configuration file. The following settings control its behavior:

Setting Effect
INSTALL_DEVELOPMENT_TOOLS Set to true to include development applications like IDEs, Docker, terminal emulators, and database clients.
INSTALL_PRODUCTIVITY_APPS Set to true to include productivity tools like note-taking apps, task managers, and launcher utilities.
INSTALL_CREATIVE_APPS Set to true to include creative and design applications.
INSTALL_COMMUNICATION_APPS Set to true to include messaging, video conferencing, and collaboration tools.
INSTALL_UTILITIES Set to true to include system utilities like window managers, archive tools, and cleanup apps.
CUSTOM_APPS An array of additional Homebrew cask names. Any app available as a Homebrew cask can be added here.

You can find the complete list of available Homebrew casks by searching the Homebrew Formulae directory. Add the cask name exactly as it appears in the directory to your CUSTOM_APPS array.

What Gets Changed

  • Applications directory — New applications are installed to /Applications via Homebrew Cask. Each app appears in your Applications folder just as if you had installed it manually from the developer's website.
  • Homebrew cask cache — Downloaded application installers are cached by Homebrew in its cache directory. You can reclaim this space later using the Homebrew Cleanup script.
  • Log file — A detailed log recording each installation attempt, its outcome, and any errors encountered.

This script does not modify your shell profile, system preferences, or any existing application configurations. It strictly handles installation of new applications.

Related Scripts

  • Full Interactive Homebrew Setup — If Homebrew is not yet installed, start with the full setup script first, which handles Homebrew installation and can also install apps interactively.
  • Homebrew Cleanup — After installing many apps, run the cleanup script to remove cached installer files and free up disk space.