Mac dev setup
A macOS setup guide specific to front-end development.
Guided Setup
For a guided setup, open up Terminal.app and run the following command:
- Save repo to
~/Downloads
folder:git clone https://github.com/michaelschwobe/mac-dev-setup.git ~/Downloads/mac-dev-setup && \ cd ~/Downloads/mac-dev-setup/scripts
- Run the installer script.
OR Run the installer scripts individually:
sh install.sh
sh defaults.sh sh tools.sh sh casks.sh sh optimizations.sh sh summary.sh
🔥 The scripts auto-skip prompts for items already installed. Recommended: Rerun as many times as needed.
✨ And thats it! For additional CLI and IDE customizations, refer to the related Manual Setup section below.
Manual Setup
For those who prefer à la carte, this section contains everything that the Guided Setup attempts to do including CLI and IDE customizations.
- If you haven’t already, save repo to
~/Downloads
folder:git clone https://github.com/michaelschwobe/mac-dev-setup.git ~/Downloads/mac-dev-setup && \ cd ~/Downloads/mac-dev-setup/scripts
- Continue with setup below.
Defaults
Create Dock spacers:
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}' && \
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}' && \
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}' && \
killall Dock
Autohide Dock:
defaults write com.apple.dock autohide -boolean true && \
killall Dock
Display hidden Finder files/folders:
defaults write com.apple.finder AppleShowAllFiles -boolean true && \
killall Finder
~/Developer
folder:
Create mkdir -p ~/Developer
~/Sandbox
folder:
Create mkdir -p ~/Sandbox
Installing xcode-select (CLI tools):
xcode-select --install
Homebrew):
Installing brew (If: Apple Silicon/ARM Architecture:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" && \
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"'>>$HOME/.zprofile && \
eval "$(/opt/homebrew/bin/brew shellenv)" && \
brew doctor
If Intel Architecture:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" && \
brew doctor
Tools
watchman:
Installbrew install watchman
trash:
Installbrew install trash
git:
Installbrew install git
zsh:
Installbrew install zsh
oh-my-zsh:
Installsh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
powerlevel10k (CLI theming):
Installbrew install powerlevel10k && \
echo '# Theme configuration: PowerLevel10K' >> ~/.zshrc && \
echo 'source $(brew --prefix)/share/powerlevel10k/powerlevel10k.zsh-theme' >> ~/.zshrc && \
echo '# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.' >> ~/.zshrc && \
echo '[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh' >> ~/.zshrc
Restart your CLI for this to take effect, or run:
p10k configure
zsh-autosuggestions:
Installbrew install zsh-autosuggestions && \
echo "# Fish shell-like fast/unobtrusive autosuggestions for Zsh." >> ~/.zshrc && \
echo "source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc
Restart your CLI for this to take effect.
zsh-syntax-highlighting:
Installbrew install zsh-syntax-highlighting && \
echo "# Fish shell-like syntax highlighting for Zsh." >> ~/.zshrc && \
echo "# Warning: Must be last sourced!" >> ~/.zshrc && \
echo "source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc
Restart your CLI for this to take effect.
Note the source
command must be at the end of ~/.zshrc
.
node (Node via Homebrew):
Installbrew install node
n (Node via n):
Installbrew install n
nvm (Node via nvm):
Installcurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
yarn:
Installbrew install yarn
pnpm:
Installbrew install pnpm
npm (globally via npm):
Upgradenpm install -g npm@latest
serve (globally via npm):
Install/Upgradenpm install -g serve@latest
Applications/Casks
Install JetBrains Mono Nerd Font:
brew tap homebrew/cask-fonts # You only need to do this once!
brew install font-jetbrains-mono-nerd-font
Install 1Password:
brew install --cask 1password
Install Brave Browser:
brew install --cask brave-browser
Install DiffMerge:
If Intel Architecture:
brew install --cask diffmerge
Install Discord:
brew install --cask discord
Install Figma:
brew install --cask figma
Install Google Chrome:
brew install --cask google-chrome
Install Insomnia:
brew install --cask insomnia
Install iTerm:
brew install --cask iterm2
- Copy my iTerm settings:
cp ~/Downloads/mac-dev-setup/.zshrc ~/
- Set the theme by going to:
- "Preferences → Profiles → Colors → Color Presets… → Import…"
- Theme location:
~/Downloads/mac-dev-setup/Moonlight.itermcolors
- Set the font by going to:
- "Preferences → Profiles → Text → Font"
- Font name: "JetBrainsMono Nerd Font Mono"
- Restart iTerm and resolve any remaining issues.
Install Rectangle:
brew install --cask rectangle
Install Slack:
brew install --cask slack
Install Sourcetree:
brew install --cask sourcetree
- Set the font by going to:
- "Preferences → Diff → Internal Diff Visualization → Diff View font"
- Font name: "JetBrainsMono Nerd Font Mono"
- Restart Sourcetree and resolve any remaining issues.
Install Spotify:
brew install --cask spotify
Update Terminal:
- Set the theme and font by going to:
- "Preferences → Profiles → Import…"
- Theme location:
~/Downloads/mac-dev-setup/Moonlight.terminal
- Font name: "JetBrainsMono Nerd Font Mono"
- Restart iTerm and resolve any remaining issues.
Install Visual Studio Code:
brew install --cask visual-studio-code
- Install my Extensions:
code --install-extension alefragnani.project-manager code --install-extension atomiks.moonlight code --install-extension bradlc.vscode-tailwindcss code --install-extension christian-kohler.npm-intellisense code --install-extension christian-kohler.path-intellisense code --install-extension CodeForge.remix-forge code --install-extension dbaeumer.vscode-eslint code --install-extension dsznajder.es7-react-js-snippets code --install-extension eamodio.gitlens code --install-extension EditorConfig.EditorConfig code --install-extension esbenp.prettier-vscode code --install-extension formulahendry.auto-rename-tag code --install-extension GitHub.copilot code --install-extension Gruntfuggly.todo-tree code --install-extension L13RARY.l13-diff code --install-extension mattpocock.ts-error-translator code --install-extension mikestead.dotenv code --install-extension ms-vscode.sublime-keybindings code --install-extension Orta.vscode-twoslash-queries code --install-extension Prisma.prisma code --install-extension stylelint.vscode-stylelint code --install-extension Tyriar.sort-lines code --install-extension unifiedjs.vscode-mdx code --install-extension vscode-icons-team.vscode-icons code --install-extension WallabyJs.console-ninja code --install-extension wix.vscode-import-cost code --install-extension yoavbls.pretty-ts-errors code --install-extension zenclabs.previewjs code --install-extension Zignd.html-css-class-completion
- Copy my Visual Studio Code User settings:
cp ~/Downloads/mac-dev-setup/Code/* ~/Library/Application\ Support/Code/User
- Restart Visual Studio Code and resolve any remaining issues.
Install Warp:
brew install --cask warp
- Copy the theme:
mkdir -p ~/.warp/themes/ && \ cp ~/Downloads/mac-dev-setup/Moonlight.yaml ~/.warp/themes/
- Set the theme and font by going to:
- "Settings → Appearance → Themes"
- Theme name: "Moonlight"
- Font name: "JetBrainsMono Nerd Font Mono"
Install Zoom.us:
brew install --cask zoom
Optimizations
Re-sort Launchpad applications:
defaults write com.apple.dock ResetLaunchPad -boolean true; killall Dock
oh-my-zsh:
Updatingomz update
Homebrew:
Optimizingbrew update && brew upgrade && brew doctor && brew cleanup