Warning
Create a Time Machine backup before major updates, disk operations, or security changes on macOS.
What you will achieve
The standard way to install CLI tools and dev dependencies on Mac — done safely.
1) Install prerequisites
Install Xcode Command Line Tools first.
2) Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
3) Verify setup and install first package
brew doctor
brew install wget