Skip to content

Instantly share code, notes, and snippets.

@danyx23
Last active January 15, 2026 10:54
Show Gist options
  • Select an option

  • Save danyx23/5c57e8a97e182b37a20a6b2b588896ed to your computer and use it in GitHub Desktop.

Select an option

Save danyx23/5c57e8a97e182b37a20a6b2b588896ed to your computer and use it in GitHub Desktop.
OWID macOS development tools installer
#!/bin/bash
set -e
echo "=== OWID macOS Development Tools Installer ==="
echo
# Install Homebrew if not installed
if ! command -v brew &> /dev/null; then
echo "Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Add brew to PATH for Apple Silicon Macs
if [[ $(uname -m) == "arm64" ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
else
echo "Homebrew is already installed"
fi
# Define packages: "package_name:command_name" (command defaults to package name)
packages=(
"uv"
"ripgrep-all:rga"
"ripgrep:rg"
"pandoc"
"jq"
"gh"
"duckdb"
"claude-code:claude"
)
# Build list of missing packages
missing=()
for entry in "${packages[@]}"; do
package="${entry%%:*}"
command="${entry#*:}"
[[ "$command" == "$entry" ]] && command="$package"
if command -v "$command" &> /dev/null; then
echo "$package is already installed"
else
echo "$package needs to be installed"
missing+=("$package")
fi
done
# Install all missing packages in one call
if [[ ${#missing[@]} -gt 0 ]]; then
echo
echo "Installing ${#missing[@]} package(s): ${missing[*]}"
brew install "${missing[@]}"
fi
echo
echo "=== Installation complete ==="
echo "You may need to restart your terminal or run 'source ~/.zshrc' for changes to take effect."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment