Skip to content

Instantly share code, notes, and snippets.

@joshmccall221
Last active December 17, 2025 20:18
Show Gist options
  • Select an option

  • Save joshmccall221/f130a51f93aec57c80d708584b6f45ff to your computer and use it in GitHub Desktop.

Select an option

Save joshmccall221/f130a51f93aec57c80d708584b6f45ff to your computer and use it in GitHub Desktop.
dotfiles (w/torran)
# https://vimeo.com/655505025
# curl -fsSL https://gist.githubusercontent.com/joshmccall221/f130a51f93aec57c80d708584b6f45ff/raw > setup-mac.sh && bash setup-mac.
#!/bin/bash
# macOS development environment setup script
# Usage: curl -fsSL https://gist.githubusercontent.com/joshmccall221/YOUR_GIST_ID/raw > setup-mac.sh && bash setup-mac.sh
set -e # Exit on error
echo "Starting macOS development environment setup..."
echo ""
# Ask for the administrator password upfront
echo "This script needs administrator privileges for installing applications."
sudo -v
# Keep-alive: update existing sudo time stamp until the script has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
# Install Xcode Command Line Tools
echo "Installing Xcode Command Line Tools..."
xcode-select --install 2>/dev/null || echo "Xcode Command Line Tools already installed"
# Install 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)"
else
echo "Homebrew already installed"
fi
# Create Brewfile
echo "Creating Brewfile..."
cat > /tmp/Brewfile << 'EOF'
# Tool for generating GNU Standards-compliant Makefiles
brew "automake"
# Microsoft Azure CLI 2.0
brew "azure-cli"
# Get a file from an HTTP, HTTPS or FTP server
brew "curl"
# TUI Git client inspired by Magit
brew "gitu"
# GNU Transport Layer Security (TLS) Library
brew "gnutls"
# Cryptographic library based on the code from GnuPG
brew "libgcrypt"
# Generic library support script
brew "libtool"
# Library for USB device access
brew "libusb"
# GNOME XML library
brew "libxml2"
# Mac App Store command-line interface
brew "mas"
# Ambitious Vim-fork focused on extensibility and agility
brew "neovim"
# Package compiler and linker metadata toolkit
brew "pkgconf"
# JavaScript package manager
brew "yarn"
# zsh shell
brew "zsh"
# vim editor
brew "vim"
# Terminal-based Spotify client
brew "spotify_player"
# Rectangle
cask "retangle"
# Display management tool
cask "betterdisplay"
# Anthropic's official Claude AI desktop app
cask "claude"
# Drivers for DisplayLink docks, adapters and monitors
cask "displaylink"
# Cross-platform Git credential storage for multiple hosting providers
cask "git-credential-manager"
# Desktop client for GitHub repositories
cask "github"
# Web browser
cask "google-chrome"
# Keyboard customiser
cask "karabiner-elements"
# Open-source keystroke visualiser
cask "keycastr"
# Remote desktop software
cask "nomachine"
# Virtualization software for running Windows and other OSes on Mac
cask "parallels"
# Share peripherals between computers
cask "sharemouse"
# Sound and audio controller
cask "soundsource"
# Messaging apps
cask "telegram"
cask "whatsapp"
# Open-source code editor
cask "visual-studio-code"
# Remote desktop application focusing on security
cask "vnc-viewer"
# Application for configuring any YubiKey
cask "yubico-yubikey-manager"
# Mac App Store apps
mas "AdBlock", id: 1402042596
mas "Azure VPN Client", id: 1553936137
mas "GarageBand", id: 682658836
mas "iMovie", id: 408981434
mas "Keynote", id: 409183694
mas "Numbers", id: 409203825
mas "Pages", id: 409201541
mas "Real Strike", id: 6748994711
mas "Smart Card Utility", id: 1444710309
mas "Speed Player", id: 1521133201
mas "Video Speed Controller", id: 1588368612
mas "Vidzik", id: 6467666216
mas "Windows App", id: 1295203466
mas "Xcode", id: 497799835
# VSCode extensions
vscode "alefragnani.project-manager"
vscode "anthropic.claude-code"
vscode "arturock.gitstash"
vscode "codezombiech.gitignore"
vscode "cpxmarketplaceengineering.ev2toolkit"
vscode "donjayamanne.git-extension-pack"
vscode "donjayamanne.githistory"
vscode "eamodio.gitlens"
vscode "github.copilot"
vscode "github.copilot-chat"
vscode "ms-azuretools.vscode-bicep"
vscode "ms-dotnettools.csdevkit"
vscode "ms-dotnettools.csharp"
vscode "ms-dotnettools.vscode-dotnet-runtime"
vscode "ms-edgedevtools.vscode-edge-devtools"
vscode "ms-mssql.sqlops-debug"
vscode "ms-vscode-remote.remote-containers"
vscode "ms-vscode-remote.remote-ssh"
vscode "ms-vscode-remote.remote-ssh-edit"
vscode "ms-vscode-remote.remote-wsl"
vscode "ms-vscode-remote.vscode-remote-extensionpack"
vscode "ms-vscode.azurecli"
vscode "ms-vscode.remote-explorer"
vscode "ms-vscode.remote-server"
vscode "parallelsdesktop.parallels-desktop"
vscode "rohitraj-rraj.squashmaster"
vscode "vscodevim.vim"
vscode "ziyasal.vscode-open-in-github"
EOF
# Install packages from Brewfile
echo "Installing packages from Brewfile..."
brew bundle --file=/tmp/Brewfile
# Change shell to zsh
if [ "$SHELL" != "/bin/zsh" ]; then
echo "Changing default shell to zsh..."
chsh -s /bin/zsh
else
echo "Default shell is already zsh"
fi
# Install Oh My Zsh
if [ ! -d "$HOME/.oh-my-zsh" ]; then
echo "Installing Oh My Zsh..."
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
else
echo "Oh My Zsh already installed"
fi
# Clone dotfiles repo (linkarzu's dotfiles)
if [ ! -d "$HOME/github/dotfiles-latest" ]; then
echo "Cloning dotfiles repository..."
mkdir -p "$HOME/github"
git clone https://github.com/linkarzu/dotfiles-latest.git "$HOME/github/dotfiles-latest"
else
echo "Dotfiles repo already exists"
fi
# Create symlink for .zshrc
echo "Setting up .zshrc symlink..."
ln -snf "$HOME/github/dotfiles-latest/zshrc/zshrc-file.sh" "$HOME/.zshrc" >/dev/null 2>&1
# Install nvm (Node Version Manager)
if [ ! -d "$HOME/.nvm" ]; then
echo "Installing nvm..."
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
# Load nvm
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# Install Node LTS
echo "Installing Node.js LTS..."
nvm install --lts
nvm use --lts
else
echo "nvm already installed"
fi
# Cleanup
rm -f /tmp/Brewfile
echo ""
echo "=========================================="
echo "Setup complete! 🎉"
echo "=========================================="
echo ""
echo "Next steps:"
echo "1. Restart your terminal"
echo "2. Your .zshrc is now linked to ~/github/dotfiles-latest/zshrc/zshrc-file.sh"
echo "3. Oh My Zsh is installed with the 'robbyrussell' theme"
echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment