Weekend hack: a tiny tool to check internet speed right from Terminal

adhocore

Jitendra

Posted on April 3, 2021

Weekend hack: a tiny tool to check internet speed right from Terminal

Introducing a tiny utility built on Go using chromedp to check internet speed right from the terminal.

How to use it?

Make sure you have a Chrome browser installed, then install fast:

go get github.com/adhocore/fast/cmd/fast
Enter fullscreen mode Exit fullscreen mode

Finally, make sure $GOPATH or $HOME/go/bin is in your $PATH or %path%, then run

fast
Enter fullscreen mode Exit fullscreen mode

You will see something like this
fast


GitHub logo adhocore / fast

Check your internet speed right from your terminal. Built on GOlang using chromedp

adhocore/fast

Go Report Lint Donate 15 Donate 25 Donate 50 Tweet

A GO lang command line tool to check internet speed right from the terminal.

Uses fast.com through headless chrome.

Prerequistie

Chrome browser must be installed. chromedp will try to locate the chrome executable automatically from these paths.

If you get error regarding chrome availability, and you have chrome in custom path then check Troubleshooting.

Usage

Install fast:

go get -u github.com/adhocore/fast/cmd/fast
# or in recent go versions:
go install github.com/adhocore/fast/cmd/fast@v1.1.0
Enter fullscreen mode Exit fullscreen mode

Finally, make sure $GOPATH or $HOME/go/bin is in your $PATH or %path%, then run:

fast

# if you just want download speed (pass -noup aka no upload speed)
fast -noup
Enter fullscreen mode Exit fullscreen mode

Wait a while or Ctrl+C if you can't. That's all.

Screen

FAST

Troubleshooting

In MacOS, you can do something like this:

echo '#!/bin/sh\n\n/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome $@' > /usr/local/bin/chrome

chmod +x /usr/local/bin/chrome
Enter fullscreen mode Exit fullscreen mode

In WSL, you can symlink chrome from host WinOS like this:

Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
adhocore
Jitendra

Posted on April 3, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related