My installation steps for setting up a new Mac computer.
Essentials
# Homebrew (https://brew.sh)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# bat - better cat
brew install bat
Better Shell
# Oh my zsh
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Powerlevel10k theme
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
# Change theme in .zshrc
ZSH_THEME="powerlevel10k/powerlevel10k"
# Syntax highlighting and auto suggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# Activate the plugin in ~/.zshrc:
plugins=(git zsh-syntax-highlighting zsh-autosuggestions)
Development
brew install git-delta
brew install httpie
brew install rbenv
brew install php
brew install yarn
brew install sass
brew install jq
Install Homebrew packages from list
Making a list of installed software
brew leaves > brews.txt
Next, I include installed casks in the same list:
brew list --cask >> brews.txt
This appends the cask list to brews.txt, giving me a complete list of all the packages I've explicitly installed.
Reviewing package descriptions
It is a good idea to check if you still need all packages on your new computer. I review my packages as follows:
cat brews.txt | xargs brew desc –eval-all
This command provides a short description for each package in your list.
Reinstalling on a new machine
Transfer your brews.txt file to the new computer, install Homebrew, and run:
xargs brew install < brews.txt
This installs all the packages listed in your file.