To get up and running with a new macOS device:
- Install Command Line Tools for Xcode and Rosetta 2:
xcode-select --install
softwareupdate --install-rosetta
- Install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install my Brewfile with Homebrew Bundle:
brew bundle install --file=- < \
<(curl --silent https://raw.githubusercontent.com/lsorber/brewfile/main/Brewfile)
- Configure:
cat << EOF >> ~/.zshrc
export PIP_REQUIRE_VIRTUALENV=true # Prevent erroneous pip install commands
export PATH="$HOME/.local/bin:$PATH" # Python installations managed by uv
export PATH="$HOMEBREW_PREFIX/opt/openjdk/bin:$PATH"
source $HOMEBREW_PREFIX/opt/antidote/share/antidote/antidote.zsh
antidote load # Add plugins to ~/.zsh_plugins.txt
eval "$(direnv hook zsh)"
eval "$(starship init zsh)"
bindkey "^[[A" history-beginning-search-backward
bindkey "^[[B" history-beginning-search-forward
EOF
# Set git's default branch name to main
git config --global init.defaultBranch main
# Show hidden files in Finder
defaults write com.apple.Finder AppleShowAllFiles true
# Use list view in Finder
defaults write com.apple.Finder FXPreferredViewStyle Nlsv