brew install speedtest-cli
brew tap teamookla/speedtest
brew update
# Example how to remove conflicting or old versions using brew
# brew uninstall speedtest --force
brew install speedtest --force
# Run your speedtest
speedtest
$ speedtest-cli
Retrieving speedtest.net configuration...
Testing from ACME Cable (xxx.xxx.xxx.xxx)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by ServerPronto (Miami, FL) [22.39 km]: 25.419 ms
Testing download speed............................................................
Download: 70.16 Mbit/s
Testing upload speed............................................................
.Upload: 5.92 Mbit/s