Welcome to mac-setup! This project provides a robust and easily customizable framework to automate the setup of your macOS machine. Our goal is to make setting up a new Mac, or maintaining an existing one, consistent, efficient, and hassle-free.
- Automated Installation: Installs essential tools, Homebrew packages, and configures your shell.
- Customizable: Easily tailor installations and settings to your preferences.
- Verification: A script to confirm your setup is correctly applied.
Follow these steps to set up your macOS machine using mac-setup.
Before you begin, ensure you have:
- A macOS machine running (at least) OSX Catalina.
- An active internet connection.
- Administrator privileges on your machine.
- Basic familiarity with using the macOS Terminal.
-
Initial Bootstrap: This command downloads and prepares the
mac-setuprepository on your machine.bash <(curl -s https://github.com/javatarz/mac-setup/main/bootstrap.sh) -
Run the Main Installation: This command clones the
mac-setuprepository to a permanent location and runs the main installation script.- Run the Main Installation:
This command clones the
mac-setuprepository to a permanent location and runs the main installation script.
mkdir -p ~/projects/personal && \ cd ~/projects/personal && \ git clone https://github.com/javatarz/mac-setup.git && \ cd mac-setup && \ git checkout main && \ ./install.sh
- Run the Main Installation:
This command clones the
-
Finalize Setup:
- Log out and back in to apply all macOS and shell changes.
- Log in to the App Store in the background (if you haven't already).
mac-setup is designed to be easily customizable. Here's how you can tailor it to your needs:
- Homebrew Packages (
brew/Brewfile): Editbrew/Brewfileto add or remove Homebrew formulae (brew), Casks (cask), or Mac App Store apps (mas). Example:brew "my-new-cli-tool"orcask "my-new-app". - Shell Configurations (
shell/): Modify the.fishfiles in theshell/directory to add custom aliases, functions, or environment variables for your Fish shell. - macOS Settings (
osx/): The scripts inosx/apply various macOS system preferences. You can edit these.shfiles to enable/disable specific settings or add new ones.- Tip: To discover new
defaults writecommands, you can use thebefandaftaliases (defined inshell/git.fishafter setup) to comparedefaults readoutput before and after making a change via the macOS UI.
- Tip: To discover new
- Application Configurations (Alfred, iTerm2, iStat Menus):
For applications like Alfred, iTerm2, and iStat Menus, their configurations are stored directly within their respective directories (
alfred/,iterm2/,istatmenus/). Make changes via the application's UI, and then commit the updated files to this repository.
To keep your machine's setup up-to-date with changes in this repository:
- Pull Latest Changes:
cd ~/projects/personal/mac-setup git pull origin main
- Re-run Installation:
This will apply any new or updated configurations.
./install.sh
After running the installation, you can verify that everything is set up correctly by running the verify.sh script:
./verify.shThis script will check for installed tools, shell configurations, and the presence of your transferred files. It will report any discrepancies.
We welcome contributions! Please see our CONTRIBUTING.md file for guidelines on how to contribute to this project.
command not founderrors: Ensure your shell is restarted after installation.- Homebrew issues: Run
brew doctorfor diagnostics. - Script failures: Check the output for specific error messages. The
verify.shscript can help pinpoint issues.