What This Script Does

The install-essential-apps.sh script is a focused, single-purpose tool that batch-installs macOS applications through Homebrew Cask. While the full interactive setup script handles everything from Homebrew installation to shell configuration, this script assumes Homebrew is already installed and working. Its sole job is to install the apps you have listed and nothing else.

It is self-contained: it does not read config/homebrew-scripts.conf. The list of apps lives in a clearly marked block at the top of the script itself, so the file you run is the file you edit. That block ships with every entry commented out, which means a freshly downloaded copy installs nothing at all until you choose what you want.

This script is particularly valuable in two scenarios. The first is after a clean macOS installation, when you have already set up Homebrew 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 is keeping several Macs in step — because the app list lives inside the script, copying that one file to another machine carries your choices with it.

When executed, the script reads its own APPS list. Each entry is written as "Display Name:cask-name" — the display name is used to notice an app you already installed by hand outside Homebrew, and the cask name is what Homebrew installs. Find the cask name for anything with brew search <app>. If the list is empty, the script says so and exits cleanly without installing anything, which is a normal outcome rather than an error.

# ===== EDIT HERE =====
APPS=(
    # "Browser:browser1"          <- placeholder, commented out
    "Firefox:firefox"             # <- your actual choice
)
# ===== DO NOT EDIT BELOW THIS LINE =====

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

Edit the EDIT HERE block at the top of the script first. Each entry is "Display Name:cask-name"; uncomment the lines you want and replace the placeholders with real cask names (find them with brew search <name>).

# 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 configured by editing the script itself, not a separate config file. The INSTALL_* category switches and CUSTOM_APPS belong to brew-setup.sh and have no effect here.

Setting Effect
APPS The apps to install, one per line as "Display Name:cask-name", inside the EDIT HERE block at the top of the script. Ships with every entry commented out, so nothing installs until you choose. An empty list is a normal, successful run.
LOG Where the run is logged. Defaults to ~/Library/Logs/EssentialAppsInstall.log.

Find the cask name for any app with brew search <name>, or browse the Homebrew Formulae directory. Use the name exactly as it appears there — a cask that has been renamed upstream is the most common cause of a failed install.

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.