Skip to content

Instantly share code, notes, and snippets.

@dumkydewilde
Last active November 30, 2025 10:12
Show Gist options
  • Select an option

  • Save dumkydewilde/256fc3037c33880ac3bcd94811878bd1 to your computer and use it in GitHub Desktop.

Select an option

Save dumkydewilde/256fc3037c33880ac3bcd94811878bd1 to your computer and use it in GitHub Desktop.
Opinionated new Mac installation script — terminal settings, apps, git config and more (VS Code, iTerm2, Atuin, uv)

Mac Installation Script

Opinionated new Mac installation script — terminal settings, apps, git config and more (VS Code, iTerm2, Atuin, uv)

Instructions

  1. Download the files
  2. Adjust the brew.txt and brew_cask.txt to your liking
  3. Open the folder with the files in the terminal
  4. bash install.sh
  5. Get coffee ☕️

FAQ

My $PATH is gone. What do I do?

Reset your path variable.

export PATH="/usr/bin:/bin:/usr/sbin:/sbin"                                       
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"

Then remove your zprofile and zshrc with rm ~/.profile && rm ~/.zshrc and start over.

atuin
uv
yt-dlp
yq
fzf
gh
git-lfs
httpie
htop
jq
ripgrep
tldr
tree
wget
zoxide
hugo
pre-commit
just
make
docker-desktop
iterm2
rectangle
todoist
bitwarden
slack
spotify
dbngin
whatsapp
steam
signal
balenaetcher
ollama-app
tailscale-app
caffeine
tableplus
blackhole-16ch
obsidian
postman
vlc
obs
git-credential-manager
visual-studio-code
claude-code
claude
stats
maccy
brave-browser
mitmproxy
google-cloud-sdk
#!/bin/bash
############ Prerequisites
echo "Please enter your email for sshkey comment / git config: "
read email
echo "Please choose an iTerm theme at https://github.com/mbadolato/iTerm2-Color-Schemes/?tab=readme-ov-file#screenshots"
read iterm_theme
## Install homebrew and Xcode CLI
command -v brew >/dev/null 2>&1 || { echo "Installing Homebrew.."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
} >&2;
echo "Homebrew successfully installed, adding key bindings"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
############ Git
## install git
echo "Installing git.."
brew install git
echo "git successfully installed. Setting global git user name and email."
git config --global user.email "${email}"
git config --global user.name "Full Name"
## create global gitignore (see https://github.com/github/gitignore for inspiration)
echo "Creating a global gitignore.."
git config --global core.excludesfile ~/.gitignore
touch ~/.gitignore
echo '.DS_Store' >> ~/.gitignore
echo '.envrc' >> ~/.gitignore
echo '__pycache__/' >> ~/.gitignore
echo '.cache/' >> ~/.gitignore
echo '.env' >> ~/.gitignore
echo 'env/' >> ~/.gitignore
echo 'venv/' >> ~/.gitignore
echo '.venv/' >> ~/.gitignore
echo "Global gitignore created"
## Generate SSH key
ssh-keygen -t ed25519 -C "${email}"
echo "
Host github.com
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_ed25519
" >> ~/.ssh/config
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
############ Terminal
## Get oh my zsh (plugins, themes for zsh).
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" "" --unattended
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
## Set zsh theme
touch ~/.zshrc
sed -i '' 's/ZSH_THEME=".*"/ZSH_THEME="jonathan"/g' ~/.zshrc
sed -i '' 's/plugins=(git)/plugins=(git gitignore zsh-autosuggestions jump brew docker docker-compose python pip ssh-agent vscode)/g' ~/.zshrc
## Fix zsh permissions for oh-my-zsh
chmod 755 /usr/local/share/zsh
chmod 755 /usr/local/share/zsh/site-functions
source ~/.zshrc
#### Brew casks and formulae (uv, atuin, fzf, etc.)
xargs brew install < brew.txt
xargs brew install --cask < brew_cask.txt
############ Python, dbt & Utilities
## install Python3
echo "Installing Python3..."
brew install python3
echo "Python $(python3 --version) succesfully installed"
# set pip and python to pip3 and python3 aliases (or remove if you prefer)
echo "alias pip=pip3" >> ~/.zshrc
echo "alias python=python3" >> ~/.zshrc
## Environment variables with direnv
brew install direnv
echo 'eval "$(direnv hook zsh)"' >> ~/.zshrc
echo '.envrc' >> ~/.gitignore # Add to global .gitignore
############ Other programs
## install visual studio code
echo "Installing VS Code.."
brew install --cask visual-studio-code
# Add VS Code to PATH (to use 'code' command)
echo 'export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"' >> ~/.zprofile
# be able to use vs code for e.g. git commit messages and wait
echo 'export EDITOR="code --wait"' >> ~/.zshrc
# Finish up .zshrc
echo 'autoload -U +X compinit && compinit' >> ~/.zshrc
echo 'autoload -U +X bashcompinit && bashcompinit' >> ~/.zshrc
brew install zsh-syntax-highlighting
echo "source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
# iTerm Theme
git clone https://github.com/mbadolato/iTerm2-Color-Schemes.git ~/.iterm2-color-schemes && cd ~/.iterm2-color-schemes
tools/import-scheme.sh "${iterm_theme}"
source ~/.zprofile
source ~/.zshrc
# Run certain apps to set permissions:
/Applications/Rectangle.app/Contents/MacOS/Rectangle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment