These are the scripts that I use to setup and maintain my Mac forked from Jason's repo.
Thank you Jason!
As you can see, heavily depend on 🍺 Homebrew
- My Mac Setup
On a new machine or fresh macOS install: before you can do much on the command line (like using Git), Xcode Command Line Tools need to be installed and the license agreed to.
- Open Applications > Utilites > Terminal
- Install Xcode Command Line Tools
xcode-select --install - Click install, agree to license
You can clone the repository wherever you want. I like to keep it in ~/Documents/Projects/my-mac-setup.
git clone https://github.com/pablordoricaw/my-mac-setup.git && cd my-mac-setupThe homebrew/install.sh script will:
- Install (or update) Homebrew
- Install a list of Homebrew formulae
- Install a list of applications via Homebrew Cask
Run it: source ./homebrew/install.sh
Pre-requisites: Needs the Github CLI gh installed.
The github/config-ssh-key.sh script will generate a new SSH key and add it to your GitHub account.
Run it: source ./github/config-ssh-key.sh
Pre-requisites: Needs chezmoi installed and SSH key setup in your GitHub account
The dotfiles/config-dotfiles.sh will use chezmoi to clone the dotfiles repo and apply them.
Run it: source ./dotfiles/config-dotfiles.sh
Pre-requisites: Needs the .macos file from the dotfiles.
The ~/.macos file applied with chezmoi will config macOS.
Run it: source ~/.macos
Pre-requisites: (Soft) Needs applications to be installed with 🍺 Homebrew.
The macos/config-dock.sh script will clear and add specific application icons to the dock.
Run it: source ./macos/config-dock.sh
Pre-requisites:
- Sign in manually into the App Store.
- Needs
masinstalled. It is installed with 🍺 Homebrew
The macos/install-apps.sh script will install the App Store applications. It uses the mas CLI to do so.
To add more apps to be installed refer to the Usage section of the README of
mas
Run it: source ./macos/install.sh
Check the individual requirements. For example, Docker requires the Docker Installer to be downloaded from www.docker.com.
Run it: source ./other/install.sh
The following section contains instructions to update all the installed binaries and applications with 🍺 Homebrew and mas.
Follow the instructions outlined in the How do I update my local packages? section in the FAQ page of Homebrew 🍺.
- Close all applications installed with Homebrew.
- Open the Terminal app
- Run the following command to update all applications installed with Homebrew:
brew upgrade --cask - Once, applications are updated, run the
macos/config-doc.shscript.
Note: For more details on the brew upgrade --cask command refer to the answer by scribblemaniac to the Upgrade all the casks installed via Homebrew Cask in StackOverflow.
- Run the
macos/install-apps.shscript to update all applications installed withmas.
It is possible to uninstall the packages and aplications as well as reset the configs.
Inside the folders there are scripts that start with uninstall- or reset-. Use these files to uninstall apps and/or packages and reset configs.
To execute the scripts use the source command followed by the path to the script.
Important: Be sure to check the pre-requisites section of the section in the installation instructions, as the same pre-requisites will apply to execute these scripts.
Note: If you're looking to uninstall all packages and applications and reset all configs consider looking into Apple's docs to Erase your Mac and reset it to factory settings
brew doctor- to check in case anything went wrong while using Hombrew.brew list– list installed Homebrew formulae, including casks
This list contains things that I want this repo to setup in my Mac that I haven't done so far
- Install the ToothFairy application
- Install the Unsplash Wallpapers application
- Install the Things 3
This list contains ideas to improve this repo
- Install Command Line Tools during installation
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install- End-to-end setup of Mac with one command
- Include dependencies between the setup steps.
- A step always runs after the step(s) it depends on.
- A step doesn't run and alerts if a parent step didn't complete successfully
The following list contains the inspirations for Jason repository from when I forked his repository.