On macOS it's pretty easy to automate the installation of all your apps, including Mac App Store apps, for those times when you get a new Mac or wipe your current one. As a software developer I find this capability indispensable, as would any professional or power user.
All you need to do is install Homebrew and then use it to install mas (which is an acronym for Mac App Store). Once they are installed, you can install all your software using a convenient Bash script. Homebrew will be used to install non-store apps, and mas will handle installing the Mac App Store apps.
Note: only Mac App Store apps you have already installed previously can be installed with mas. You cannot install new apps you have never installed from the store.
The most obvious reason to script out your software installations is that it greatly reduces the time to set up a new Mac, as well as ensure that you don't forget to install one or more apps. It also provides a way to update all the apps at once via the brew upgrade
command. And it also provides a way to update apps that don't have their own update feature.
Apps installed with mas will be updated normally by the Mac App Store.
In order to use this process you need to know the names of the Homebrew formulae/casks for each application, and you also need to know the IDs of the Mac App Store apps for mas. Fortunately this is super easy.
First, Homebrew has a tool for finding software available in their service at https://formulae.brew.sh/. Simply use this to find your apps and make sure you're installing the right ones. Those listed as “casks” are GUI Mac apps (normal apps you don't run from the Terminal). Ones listed as “formulae” are typically command line tools run from the Terminal or services without an interface.
Second, for Mac App Store apps you simply use mas to list what's currently on your computer from the Mac App Store.
This will give you a list of currently installed apps from the Mac App Store, with their IDs:
You can also search for Mac App Store apps by name using the mas search command:
This will show a similar result for matches. You can even install all search results with a single “lucky” command. See the mas help for these and other options.
Here's an example of a Bash script to get you started. I keep a similar script updated as I use new apps or stop using others. Then I'm ready to go when I have to set up a new or wiped Mac.
You can name the Bash script something like install-software.sh
and execute it in a Terminal like this:
The first time you use the script will absolutely justify the time spent writing it. The second time you run it you will thank your past self for being so smart 😉.
There's usually more to the story so if you have questions or comments about this post let us know!
Do you need a new software development partner for an upcoming project? We would love to work with you! From websites and mobile apps to cloud services and custom software, we can help!