How I set up a new Mac in minutes with a simple Homebrew script

Ben Lobaugh
1 min readMay 31, 2022

Setting up a new machine used to be a huge chore that I did not look forward to, however in the Apple world there is a great tool called Homebrew that makes setting up a new machine a snap.

Homebrew is a package manager for MacOS. It has a plethora of packages available. In fact, there are very few programs that it does not have packages already available for. It is also extendable with private package repositories, making it simple for companies to share their products through it.

Here is a complete list of steps I went through when I set up a new MacBoom Pro M1 for web development with PHP:

  • copy in ssh keys
  • Login to iCloud and Google in System Preferences > Internet Accounts
  • Run the script

Done! The new laptop is now read to be used.

By tapping into the brew command, setup time for a new machine goes from hours or days down to 20 minutes!

Here is the script I use in full. I hope it is an inspirational jumping off point for your own setup script.

P.S. another beauty of brew is that the commands can be rerun as many times as you want. If the app is installed and up to date it knows and skips it.

--

--

Ben Lobaugh

Director of Engineering at Mindsize. 20+ year technology veteran. Providing leadership insights, mentorship, and coaching to new and existing leaders.