Skip to content

Instantly share code, notes, and snippets.

@leeovery
Last active December 18, 2025 11:04
Show Gist options
  • Select an option

  • Save leeovery/167d8e564abe1d9a7c01e5a57d194952 to your computer and use it in GitHub Desktop.

Select an option

Save leeovery/167d8e564abe1d9a7c01e5a57d194952 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -e
echo "πŸš€ Dotfiles Bootstrap"
echo "====================="
echo ""
# 1. Xcode CLI tools
if ! xcode-select -p &>/dev/null; then
echo "πŸ“¦ Installing Xcode Command Line Tools..."
xcode-select --install
echo ""
echo "⏳ Press any key when Xcode installation is complete..."
read -n 1 -s
echo ""
fi
echo "βœ“ Xcode Command Line Tools"
# 2. 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)"
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
echo "βœ“ Homebrew"
# 3. GitHub CLI
if ! command -v gh &>/dev/null; then
echo "πŸ“¦ Installing GitHub CLI..."
brew install gh
fi
echo "βœ“ GitHub CLI"
# 4. GitHub auth (required for private repo)
if ! gh auth status &>/dev/null 2>&1; then
echo ""
echo "πŸ” GitHub authentication required for private repos..."
echo ""
gh auth login
fi
echo "βœ“ GitHub authenticated"
# 5. Clone dotfiles
if [[ ! -d "$HOME/.dotfiles" ]]; then
echo ""
echo "πŸ“₯ Cloning dotfiles..."
gh repo clone leeovery/dotfiles "$HOME/.dotfiles"
fi
echo "βœ“ Dotfiles cloned"
# 6. Run setup
echo ""
echo "πŸš€ Starting dotfiles setup..."
cd "$HOME/.dotfiles"
./bin/dotsetup install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment