If you prefer to start on a «clean slate», rather than migrate potential old garbage, on your new & smoothly running Mac, you’re like me. And I have something for you: a scripted macOS User setup and App installations!

The downside of not using the macOS «Migration Assistant» is, that I need to remember – and re-do – all my favourite settings with a new User on a new Mac. It’s probably fun the first time, a good training the second time, but after that it gets cumbersome and annoying.

Faced with this once again on my new MacBook Air M2, I decided to write down all my preferred settings and Apps I install (or remove). With some shell script *magic*, and mostly thanks to macOS’ built-in «defaults» plus other Unix command line programs, I was able to put together a few scripts to do all the work for me.

So I had time to work FOR YOU – and created the open-sourced «macOS Scripted Setup» tool!

How does the «macOS Scripted Setup» work?

Download the project from GitHub

Quick Download using the Terminal.app

curl -SL "https://github.com/Swiss-Mac-User/macOS-scripted-setup/archive/refs/heads/installer.zip" | tar xz -C "$HOME/Downloads" && open "$HOME/Downloads/macOS-scripted-setup-installer"

…or manual Download from GitHub

On the GitHub page, click on «Releases» & then download the most recent «Source code (zip)»

Create a config file with all options to your liking

I’m sure that my preferences for my macOS are not matching 100% to yours 😉 So make sure to create your individual configuration file!

  1. Make sure the «macOS Scripted Setup»-project is unzipped in your ~/Downloads folder
  2. Duplicate its «config.default.sh»-file as a new file named → «config.sh»
  3. Open this new config file in your preferred editor
  4. Change any setting from «false» (disabled) to «true» (enabled) – or vice-versa
  5. Save & you’re ready!
An edited Example Config file for the macOS Scripted Setup

P.s. the config file is meant to be «portable» to another Mac or User account where you want (or need) to have YOUR settings applied!

Start your automated macOS Setup and installation of Apps

You’re set to get going, using your customised config file – which will be taken up automatically, by the way.

To kick off the setup script, open the Terminal.app from Applications » Utilities, and use the following command:

cd ~/Downloads/macOS-scripted-setup-installer/ && chmod +x ./run.sh && ./run.sh

(This command assumes you have NOT moved the unzipped «macOS-scripted-setup»-folder out of your ~/Downloads directory! If so, you have to adjust the first part to match its new location…)

The configurations are applied now, and applications downloaded and installed – whenever your attention is needed, you will hear a *beep* & the Terminal.app will come to the foreground. Just watch and enjoy (and support me in the meantime 🥹)

If you want to interrupt the setup, you can do so by pressing the ^control+C keys.

macOS Scripted Setup running and showing output in the Terminal CLI

Feedbacks, questions, issues,…?

As the «macOS Scripted Setup» project is brand new & I had only limited testing capabilities, any feedback is very welcome!

Probably the only time where I will ask you to refrain from using the comments below, and rather use directly the project’s GitHub page. 🙏

Share:
  • 0
  • 0

Questions? Suggestions? Let us know with a comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.