Then you can walk away and have a cup of coffee
When buying a new MacOS computer, or reformatting an existing one, the most tedious task you need to do is install all of your software apps from scratch. First you have to remember each one and secondly, visiting each app’s website, downloading the app, and installing it takes forever.
But what if you had a download script that would automatically download and install each one for you? All you would have to do is run the script, then walk off and make yourself a coffee while the script did its business. You can do that using HomeBrew and HomeBrew Cask.
What Is HomeBrew?
HomeBrew is a program which can be installed on your MacOS computer which downloads and installs apps for you, without the need to visit the app’s website first. All you need is the Terminal window, the Homebrew command, and the name of the app you want to download.
Not all software apps are supported by HomeBrew. I will show you in a moment how to find out which ones ARE supported. But in general, all of the big name ones are supported.
Before we can make our bulk MacOS app installer, we need to install HomeBrew and HomeBrew Cask. Cask is a program which allows you to download programs all at once. Both are required for the MacOS app installer to function properly.
To install HomeBrew, open a Terminal window and type :
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then to install HomeBrew Cask, type the following two commands individually.
brew tap caskroom/cask
brew install caskroom/cask/brew-cask
That is it. You now have HomeBrew installed.
To install a program with HomeBrew, it is a simple Terminal command of
brew cask install “app name”
Obviously you would replace “app name” with the name of the app you want.
To uninstall, you would type :
brew cask uninstall “app name”
Seeing What Programs Are Supported By HomeBrew
Before we move on to making the bulk app installer, you need to see which programs HomeBrew supports. Unless you are running some old vague program that no-one had ever heard of, it’s likely HomeBrew will support it.
But you need to see what the program is called exactly by HomeBrew so you get the command right. Otherwise your bulk app installer is not going to work very well.
So in Terminal, now type :
brew search “name of app”
So if you were searching to see if Google Chrome was supported, you could type
brew search chrome
And the Terminal will now give you all of the HomeBrew packages which are to do with Chrome.
As you can see, Chrome is listed on HomeBrew as google-chrome. So this is why you need to get the exact terminology right in your app installer.
Building Your App Installer
Once you have a list of all the apps you want in your installer (with the HomeBrew-formatted names), it’s time to start writing the script.
Open up a MacOS text editor (such as the default TextEdit) and at the top, type :
On the next line, begin typing the HomeBrew Cask commands for each program, separated by <br>. So, like so :
<br>brew cask install google-chrome
<br>brew cask install firefox
<br>brew cask install audacity
<br>brew cask install dropbox
And so on. Keep going till you have all of the programs listed with the HomeBrew cask commands attached.
When you have finished, save the file as :
Take care that txt is not on the end of that file name.
Now, go back to Terminal, point Terminal at the location of the file you have just made, and in Terminal, type :
chmod a+x caskconfig.sh
This makes the file ready to be used. Move the script off your computer to either a USB stick or cloud storage. If your computer crashes, having the script on that computer makes this whole exercise a bit pointless!
Using The Script On a New Computer
On the new or reformatted computer, install HomeBrew and HomeBrew Cask, as we have just shown. Then move caskconfig.sh into your Mac’s Home Directory.
Finally, fire up Terminal and type :
Now sit back and watch all of the programs in the script be downloaded and installed, with zero further effort from you!
The nice thing about this script is that it merely points towards the programs online. So when you run the script, you will always get the most up-to-date versions of those programs. Not some wildly out-of-date version that requires a dozen patches installed afterwards.