Next generation CLI for testing internet bandwidth using speedtest.net
Rebuilt for modern Python 3.12+
You can install speedtest-cli-ng from PyPI using either standard Python packaging tools or uv.
If you have pip only. You can also use pipx to run the tool without installing.
pip install speedtest-cli-ngYou can run the tool instantly without explicitly managing environments:
uvx speedtest-cli-ngor install it globally:
uv tool install speedtest-cli-ngTo view the available options, run the help command:
speedtest-cli --helpusage: speedtest-cli [-h] [-l] [-s SERVER] [--no-download] [--no-upload]
[-t THREADS | --single] [--share] [--bytes] [--json]
[--debug] [--version]
Next generation CLI for testing internet bandwidth using speedtest.net.
options:
-h, --help show this help message and exit
Core Options:
-l, --list Show available speedtest.net servers sorted by distance. (default: False)
-s SERVER, --server SERVER
Specify a server id to test against. (default: None)
Transfer Modifiers:
--no-download Do not perform the download test. (default: False)
--no-upload Do not perform the upload test. (default: False)
-t THREADS, --threads THREADS
Set the number of concurrent connections instead of using downloaded config. (default: None)
--single Use one concurrent connection. Simulates a typical file transfer. (default: False)
Output Options:
--share Generate and provide a URL to the speedtest.net share results image. (default: False)
--bytes Display values in bytes instead of bits. Does not affect image generation or JSON output. (default: ('bit', 1))
--json Suppress verbose output, only show basic information in JSON format. Speeds listed in bit/s. (default: False)
Miscellaneous Options:
--debug Show verbose debugging output. (default: False)
--version show program's version number and exit
- Python 3.12+
- uv 0.11+
This will install project's dependencies. Keep in mind that there are no runtime dependencies in production.
uv sync# Run format
uv run ruff format --check .
# Run lint
uv run ruff check .
# Run typecheck
uv run pyright
# Run tests
uv run pytestBuild both sdist and wheel package:
uv run buildThe output will be in the dist/ directory.
This project is a heavily refactored and modernized fork of the original speedtest-cli created by Matt Martz. While the codebase has been completely rewritten to support modern Python standards, concurrent thread pools, and memory-safe streaming, it was built upon the foundational concepts of the original tool.
This project is licensed undeer the Apache License 2.0.
Made with 🩵 by Michał Korczak