This script automates the setup of a new macOS development environment. It installs and configures various tools,
applications, and system preferences to create a consistent and productive workspace. Run
like macos_developer_setup.sh
.
Before running the script, ensure you have:
- macOS 10.15 (Catalina) or later
- Administrative access to your Mac
- Internet connection
- Installs Homebrew, the package manager for macOS
- Sets various macOS system preferences for improved usability
- Installs Xcode Command Line Tools
- Installs and configures various development tools and applications
The script requires the following environment variables to be set in your local environment.
GIT_USER_NAME
: Your full name for Git commitsGIT_USER_EMAIL
: Your email address for Git commitsSSH_PRIVATE_KEY_PATH
: The path to your SSH private key file
To set them, open a command line terminal and run the following commands, replacing the placeholders with your actual values:
export GIT_USER_NAME='Your Name'
export GIT_USER_EMAIL='[email protected]'
export SSH_PRIVATE_KEY_PATH='/path/to/your/private/key'
This assumes you already have a private key file in the ~/.ssh
directory. If you don't, you can generate one using
the following command:
ssh-keygen -t ed25519 -C "[email protected]"
This will create a new SSH key, using the provided email as a label. When prompted to "Enter a file in which to save the key," press Enter. This accepts the default file location. When prompted, type a secure passphrase.
This script is intended to be run on a new macOS installation. The best way to run it is to download the script to your local machine and execute it from the command line, since your machine may not have Git installed yet. The script will need to be flagged as executable before it can be run, which you can do with the following command:
chmod +x macos_developer_setup.sh
Once the script is executable, you can run it by executing the following command. Make sure that the environment variables are set before running the script (they will not be set if you close the terminal window after setting them).
./macos_developer_setup.sh
Once the script completes, there will be additional steps to complete the setup. Follow the instructions in the terminal.
The script installs the following applications via Homebrew Cask:
- Docker
- JetBrains Mono Nerd Font
- ImageOptim
- JetBrains Toolbox
- Slack
- Skype
- Vagrant
- Vivid
- Zoom
- Alacritty
The script installs these command-line tools via Homebrew:
- Ansible
- Bash (latest version)
- Bash Completion
- Coreutils
- curl
- Git
- Git Delta
- GNU sed
- Packer
- Python
- Terraform
- Starship
- Vim
- wget
- Zellij
- Sets up dotfiles from a GitHub repository
- Configures Git with the provided user name and email
- Installs Vagrant plugins:
vagrant-hostmanager
andvagrant-vsphere
- Updates the default shell to the latest version of Bash