This tool's repository has been archived by its maintainer and is no longer actively developed. It may still work, but expect no further updates or bug fixes.
speedtest-cli
Command line interface for testing internet bandwidth using speedtest.net
Description
speedtest-cli is a command-line interface for testing internet bandwidth using speedtest.net. It measures download speed, upload speed, and latency from the terminal with support for multiple output formats including simple text, CSV, and JSON. You can select specific servers, run download-only or upload-only tests, and use it as a Python library. Note: this project is archived as of January 2026 and the author recommends Ookla's official speedtest CLI as a replacement.
Install
pip install speedtest-clibrew install speedtest-cliAI Summary
Test internet download speed, upload speed, and latency from the command line using speedtest.net servers.
Capabilities
- + Measure download and upload speeds
- + Test latency to speedtest.net servers
- + Output results in simple text, CSV, or JSON format
- + Select specific test servers or exclude servers
- + Run download-only or upload-only tests
- + Generate shareable result images via --share flag
- + Use as a Python API for programmatic speed testing
Use When
- → When you need to quickly test internet connection speed from the terminal
- → When automating bandwidth monitoring in scripts
- → When you need speed test results in JSON or CSV for processing
Avoid When
- x When you need continuous network monitoring over time
- x When you need ICMP-style latency measurements (use ping)
- x When you want the latest Ookla speedtest features (use the official Ookla CLI instead)
Usage Patterns
Run a basic speed test
speedtest-cli Runs a full download and upload speed test against the nearest server
Simple output
speedtest-cli --simple Shows just ping, download, and upload numbers
JSON output for scripting
speedtest-cli --json Outputs results as JSON for use in scripts or pipelines
List available servers
speedtest-cli --list Lists all available speedtest.net servers sorted by distance
Typical Pipelines
speedtest-cli --json | jq '.download / 1000000 | floor'