A script to bootstrap a minimal macOS development system. This does not assume you're doing Ruby/Rails/web development but installs the minimal set of software every macOS developer will want.
Replacing Boxen in GitHub with a better tool. This post outlines the problems with Boxen and requirements for Strap and other tools used by GitHub: https://mikemcquaid.com/2016/06/15/replacing-boxen/
- Enables
sudousing TouchID - Enables the macOS screensaver password immediately (for better security)
- Enables the macOS application firewall (for better security)
- Adds a
Found this computer?message to the login screen (for machine recovery) - Enables full-disk encryption and saves the FileVault Recovery Key to the Desktop (for better security)
- Installs the Xcode Command Line Tools (for compilers and Unix tools)
- Agree to the Xcode license (for using compilers without prompts)
- Installs Homebrew (for installing command-line software)
- Installs the latest macOS software updates (for better security)
- Installs dotfiles from a user's
https://github.com/username/dotfilesrepository. If they exist and are executable: runsscript/setupto configure the dotfiles andscript/strap-after-setupafter setting up everything else. - Installs software from a user's
Brewfilein theirhttps://github.com/username/homebrew-brewfilerepository or.Brewfilein their home directory. - Configures Git's name, email and GitHub access using optional local GitHub CLI login or environment variables
- Idempotent
- Enabling any network services by default (instead enable them when needed)
- Installing Homebrew formulae by default for everyone in an organisation (install them with
Brewfiles in project repositories instead of mandating formulae for the whole organisation) - Opting-out of any macOS updates (Apple's security updates and macOS updates are there for a reason)
- Disabling security features (these are a minimal set of best practises)
- Add phone number to security screen message (want to avoid prompting users for information on installation)
Open https://strap.mikemcquaid.com/ in your web browser.
Instead, to run Strap locally run:
git clone https://github.com/MikeMcQuaid/strap
cd strap
bash bin/strap.sh # or bash bin/strap.sh --debug for more debugging outputInstead, to run the web application locally run:
git clone https://github.com/MikeMcQuaid/strap
cd strap
./script/bootstrap
./script/serverStrap is also available as a Docker image on Docker Hub (mikemcquaid/strap) and GitHub Packages (ghcr.io/mikemcquaid/strap).
STRAP_GIT_NAME: override Git's name and the name in the login-screen recovery message (defaults to the existing Git name, then the authenticated GitHub profile name; empty values are ignored).STRAP_GIT_EMAIL: override Git's email and the email in the login-screen recovery message (defaults to the existing Git email, then the authenticated GitHub account's primary verified email; empty values are ignored).STRAP_GITHUB_USER: override Git's GitHub username and the owner of dotfiles and Brewfile repositories (defaults to the authenticated GitHub username; empty values are ignored).GH_TOKENorGITHUB_TOKEN: GitHub CLI credentials (GH_TOKENtakes precedence; defaults to an existing local login).STRAP_DEBUG=1or--debug: enable debugging output.STRAP_NONINTERACTIVE=1,CI=1or--non-interactive: run without interactive prompts; automatic without a TTY. Never starts a GitHub login and requires sudo access without a password prompt.--help: print usage without changing your Mac.
Stable and in active development.
Licensed under the MIT License. The full license text is available in LICENSE.txt.
Fork me on GitHub Retina Ribbons
are vendored in images
and also licensed under the MIT License