Step 1. Install Xcode from Apple Store -> Sign in with your Apple ID - Apple Developer
Step 2. Open Xcode on your Mac and accept agreement.
Step 3. Install better terminal for Mac -> Downloads - iTerm2 - Mac OS Terminal Replacement
Step 4. Open iTerm2 not the stock terminal that comes with Mac.