2026
Speedtest CLI
A colorful terminal wrapper around Ookla's official speedtest CLI with live progress bars and stable JSON output for scripts.
Speedtest CLI is a small wrapper that makes Ookla's official speed test nicer to run and easier to script. Ookla's own command works, but it was not built for a person watching a terminal or a script reading the result. This fills that gap in about 300 lines of Python with no dependencies.
What it does
Run it and you get live progress bars for ping, download, and upload, then a clean summary with your server, your ISP, and a link to the result. For scripts, three flags skip the animation:
speedtest-cli --simple # one line
speedtest-cli --json # compact JSON with a stable shape
speedtest-cli --raw-json # everything Ookla reports
Decisions worth knowing
- It runs Ookla's real binary instead of reimplementing the test, so the numbers match what speedtest.net itself would show.
- It checks it has the right
speedtest. A popular Python package installs its ownspeedtestcommand that produces different, less accurate numbers. This one confirms the binary on your PATH is actually Ookla's before trusting it. - Old scripts keep working. When Ookla's fuller result format was wired in,
--jsonkept its original shape and the new data went behind--raw-json, so nothing that already depended on the output broke. - It streams instead of buffering. Output is read line by line as it arrives. That is what makes the live progress bars possible, and it avoids a hang an earlier version could hit.