Shell scripts for automated macOS machine setup.
This project is a framework for automating the setup of a macOS machine. In order to illustrate the potential of what this project can do, please see the companion macOS Config project for details. The macOS Config project is an opinionated configuration which meets the needs of my development environment but is also meant to serve as an example and guide for building your own personalized setup. Here is how the two projects are meant to be used:
- macOS (this project) - Foundation and framework for building customizated macOS machine setups.
- macOS Config - The layer on top of this macOS project which defines a custom machine setup and base implementation. The project is meant to be forked for as many custom machine setups as needed.
- Features
- Screencast
- Requirements
- Setup
- Usage
- Versioning
- Code of Conduct
- Contributions
- License
- History
- Credits
- Provides a command line interface, written in Bash with no additional dependencies, for installation and management of a macOS machine.
- Supports macOS boot disk creation for setting up a machine with a fresh install of the operation system.
- Downloads and installs development tools (required by Homebrew):
- Downloads, installs, and configures Homebrew command line software.
- Downloads, installs, and configures App Store software.
- Downloads, installs, and configures non-App Store software applications.
- Downloads, installs, and configures software application extensions.
- Applies basic and default software settings.
- Sets up and configures installed software for use.
- Supports restoration of machine backups.
- macOS Sierra (with latest software updates applied)
- Xcode (with accepted license agreement)
Open a terminal window and execute one of the following setup sequences depending on your version preference:
Current Version (stable):
git clone https://github.com/bkuhlmann/mac_os.git
cd mac_os
git checkout v1.3.1
Master Version (unstable):
git clone https://github.com/bkuhlmann/mac_os.git
cd mac_os
Run the following script:
bin/run
You will be presented with the following options:
Boot:
B: Create boot disk.
Install:
b: Apply basic settings.
t: Install development tools.
h: Install Homebrew software.
m: Install Mac App Store software.
a: Install application software.
x: Install application software extensions.
d: Apply default settings.
s: Setup installed software.
i: Install everything (i.e. executes all install options).
Restore:
R: Restore settings from backup.
Manage:
c: Check status of managed software.
C: Caffeinate machine.
ua: Uninstall application software.
ux: Uninstall application software extension.
ra: Reinstall application software.
rx: Reinstall application software extension.
w: Clean work (temp) directory.
q: Quit/Exit.
Choose option i
to run all install options or select a specific option to run a single option.
Each option is designed to be re-run if necessary. This can also be handy for performing upgrades,
re-running a missing/failed install, etc.
The option prompt can be skipped by passing the desired option directly to the bin/run
script. For
example, executing bin/run i
will execute the complete software install process.
The machine should be rebooted after all install tasks have completed to ensure all settings have been loaded.
It is recommended that the mac_os
project directory not be deleted and kept on the local machine
in order to manage installed software and benefit from future upgrades.
All executable scripts can be found in the bin
folder:
bin/apply_basic_settings
: Applies basic, initial, settings for setting up a machine. This is meant to be customized.bin/apply_default_settings
: Applies useful system and application defaults. This is meant to be customized.bin/create_boot_disk
: Creates macOS boot disk.bin/install_app_store
: Installs macOS, GUI-based, App Store applications. This is meant to be customized.bin/install_applications
: Installs macOS, GUI-based, non-App Store applications. This is meant to be customized.bin/install_dev_tools
: Installs macOS development tools required by Homebrew.bin/install_extensions
: Installs macOS application extensions and add-ons. This is meant to be customized.bin/install_homebrew
: Installs Homebrew managed software. This is meant to be customized.bin/restore_backup
: Restores system/application settings from backup image. This is meant to be customized.bin/run
: The main script and interface for macOS setup.bin/setup_software
: Configures and launches (if necessary) installed software. This is meant to be customized.
The lib
folder provides the base framework for installing, re-installing, and uninstalling
software. Everything provided via the macOS Config
project is built upon the functions found in the lib
folder. See the
macOS Config project for further details.
lib/settings.sh
: Defines global settings for software applications, extensions, etc.
Read Semantic Versioning for details. Briefly, it means:
- Major (X.y.z) - Incremented for any backwards incompatible public API changes.
- Minor (x.Y.z) - Incremented for new, backwards compatible, public API enhancements/fixes.
- Patch (x.y.Z) - Incremented for small, backwards compatible, bug fixes.
Please note that this project is released with a CODE OF CONDUCT. By participating in this project you agree to abide by its terms.
Read CONTRIBUTING for details.
Copyright (c) 2016 Alchemists. Read LICENSE for details.
Read CHANGES for details. Built with Bashsmith.
Developed by Brooke Kuhlmann at Alchemists.