Skip to content

Instantly share code, notes, and snippets.

@dumkydewilde
Last active December 15, 2025 08:49
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
jq
yq
fzf
gh
git-lfs
htop
ripgrep
tldr
tree
wget
zoxide
hugo
pre-commit
bat # Better cat with syntax highlighting
eza # Modern ls replacement
fd # Better find
duckdb
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
set -e # Exit on error
############ Prerequisites
echo "Please enter your full name for git config: "
read full_name
echo "Please enter your GitHub noreply email: "
read github_email
echo "Please enter your email for SSH key comment: "
read email
############ Homebrew
if ! command -v brew &> /dev/null; then
echo "Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
# Initialize Homebrew for current session
eval "$(/opt/homebrew/bin/brew shellenv)"
# Add to zprofile for login shells
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
############ Git
echo "Installing git..."
brew install git
git config --global user.email "${github_email}"
git config --global user.name "${full_name}"
# Useful git defaults
git config --global init.defaultBranch main
git config --global pull.rebase true
git config --global fetch.prune true
git config --global diff.colorMoved zebra
# Global gitignore
git config --global core.excludesfile ~/.gitignore_global
cat << 'EOF' > ~/.gitignore_global
.DS_Store
.envrc
*.duckdb
__pycache__/
.cache/
.env
env/
venv/
.venv/
*.pyc
.idea/
.vscode/
*.log
EOF
echo "Global gitignore created at ~/.gitignore_global"
############ SSH Key
if [ ! -f ~/.ssh/id_ed25519 ]; then
ssh-keygen -t ed25519 -C "${email}" -f ~/.ssh/id_ed25519
mkdir -p ~/.ssh
cat << 'EOF' >> ~/.ssh/config
Host github.com
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_ed25519
EOF
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
echo ""
echo "=========================================="
echo "Add this SSH key to GitHub:"
cat ~/.ssh/id_ed25519.pub
echo "=========================================="
echo "Press Enter after adding to GitHub..."
read
fi
############ Oh My Zsh
if [ ! -d ~/.oh-my-zsh ]; then
echo "Installing Oh My Zsh..."
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" "" --unattended
fi
# Install zsh plugins
ZSH_CUSTOM="${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}"
[ ! -d "$ZSH_CUSTOM/plugins/zsh-autosuggestions" ] && \
git clone https://github.com/zsh-users/zsh-autosuggestions "$ZSH_CUSTOM/plugins/zsh-autosuggestions"
[ ! -d "$ZSH_CUSTOM/plugins/zsh-syntax-highlighting" ] && \
git clone https://github.com/zsh-users/zsh-syntax-highlighting "$ZSH_CUSTOM/plugins/zsh-syntax-highlighting"
############ Brew packages
echo "Installing brew formulae..."
xargs brew install < brew.txt
echo "Installing brew casks..."
xargs brew install --cask < brew_cask.txt
############ Configure .zshrc
# Backup existing
cp ~/.zshrc ~/.zshrc.backup.$(date +%Y%m%d%H%M%S)
# Create new .zshrc with proper ordering
cat << 'EOF' > ~/.zshrc
# Homebrew (must be early for PATH)
eval "$(/opt/homebrew/bin/brew shellenv)"
# Oh My Zsh configuration
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="jonathan"
plugins=(
git
gitignore
zsh-autosuggestions
zsh-syntax-highlighting
jump
brew
python
ssh-agent
vscode
fzf
)
source $ZSH/oh-my-zsh.sh
# Tool initializations (after oh-my-zsh)
eval "$(atuin init zsh)"
eval "$(zoxide init zsh)"
source <(fzf --zsh)
# Aliases
alias cat='bat'
alias ls='eza'
alias ll='eza -la'
alias tree='eza --tree'
alias python='python3'
alias pip='pip3'
############ UV Tools
uv tool install ruff
############ Final steps
echo ""
echo "=========================================="
echo "Setup complete!"
echo ""
echo "Next steps:"
echo "1. Restart your terminal or run: source ~/.zshrc"
echo "2. Run 'atuin login' if you want to sync shell history"
echo "3. Run 'gh auth login' to authenticate GitHub CLI"
echo "4. Open Docker Desktop and complete setup"
echo "5. Configure Rectangle, Maccy preferences"
echo "=========================================="
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment