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.