Skip to content

Instantly share code, notes, and snippets.

Created March 15, 2021 17:03
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Gentle idempotent Mac dev setup
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/core"
cask "docker"
cask "iterm2"
cask "visual-studio-code"
#!/usr/bin/env zsh
brew_major_version=$(brew --version | head -c 10)
if [ "$brew_major_version" = 'Homebrew 3' ]; then
echo 'Homebrew already installed'
echo 'Updating Homebrew'
brew update
echo 'Installing Homebrew'
/bin/bash -c "$(curl -fsSL"
echo 'Install and update packages in the Brewfile`
brew bundle
#!/usr/bin/env zsh
export OMZ=~/.oh-my-zsh
if [ -d $OMZ ]; then
echo 'Oh My Zsh is already installed.'
echo 'Installing Oh My Zsh:'
sh -c "$(curl -fsSL"
export PLUGINS="alias-finder brew common-aliases git"
if grep -qF "plugins=(git)" ~/.zshrc; then
sed -i '' "s/plugins=(git)/plugins=($PLUGINS)/g" ~/.zshrc
echo 'Oh My Zsh plugins set to baseline.'
source ~/.zshrc
echo 'Oh My Zsh plugins left alone because they are not default. Current set of plugins:'
grep "^plugins=" ~/.zshrc
if [ ! -d $ZSH_CUSTOM/themes/powerlevel10k ]; then
git clone --depth=1 ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
echo 'Set ZSH_THEME="powerlevel10k/powerlevel10k" in ~/.zshrc if you want this awesome theme.'
Copy link

Run brew bundle dump to create a Brewfile based on your currently installed packages. You can overwrite an existing Brewfile, such as a version-controlled one, with brew bundle dump --force.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment