Skip to content

nesbert/macOS-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

macOS-setup

Automation to bootstrap a new Mac for software development with a lightweight, terminal-first setup.

This repository handles machine setup, package installation, and update automation. Terminal, prompt, and app configuration live in the companion repository macOS-dotfiles.

Prereq

  1. Install Command Line Tools (CLT) for Xcode
xcode-select --install
  1. Install Rosetta 2 for binaries that are still Darwin/AMD64 (Docker builds, etc)
softwareupdate --install-rosetta
  1. Agree to the Xcode license
sudo xcodebuild -license accept

Installation

# bootstrap the machine, install packages, dotfiles, and DX defaults
./bin/macOS-setup install

# optional follow-up for fzf keybindings/completions
/opt/homebrew/opt/fzf/install

./bin/macOS-setup install will:

  • install Homebrew if needed
  • install CLI packages and cask apps
  • install Ghostty, Starship, fastfetch, and related shell tooling
  • clone or update https://github.com/nesbert/macOS-dotfiles
  • back up any existing ~/.zshrc and ~/.config
  • symlink ~/.zshrc and ~/.config from the dotfiles repo

If you want to use a fork or alternate remote for dotfiles, set DOTFILES_REPO_URL before running install:

DOTFILES_REPO_URL=https://github.com/<you>/macOS-dotfiles.git ./bin/macOS-setup install

Update Software

# update Homebrew packages/casks and refresh vim config
./bin/macOS-setup update

What does it install?

Below highlights some of the software installed and configured by this script.

  • Homebrew package manager for macOS
  • Xcode Command Line Tools updates when available
  • Ghostty as the primary terminal emulator
  • Starship as the shell prompt
  • Homebrew-managed Zsh plugins including autocomplete, autosuggestions, syntax highlighting, history substring search, you-should-use, and git prompt
  • nvm with the latest Node.js release set as default
  • jenv plus Azul Zulu JDK 21 via Homebrew cask
  • fastfetch for shell startup system info
  • GNU command-line tools such as coreutils, findutils, gnu-sed, and grep
  • Dotfiles bootstrapped from macOS-dotfiles
  • Vim enhanced with The Ultimate vimrc and the Nord theme
  • Other applications and settings for development

Optional macOS defaults are split into two scripts:

  • scripts/macOS-system-settings.sh for broadly useful DX defaults
  • scripts/macOS-personal-settings.sh for personal UI, hot corner, input, and display preferences

The DX-focused settings script is currently run by scripts/macOS-install.sh, while the personal settings script stays opt-in.

./bin/macOS-setup system-settings
./bin/macOS-setup personal-settings

Applications, Tools & Utilities

Inspired By

About

Automating the setup of my new MacBook Pro (M5 Max) for software development.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages