speedtest-cli
Multi-stream internet speed test with bufferbloat + watch mode
v1.1.1
Linux
Quick Start
Install
curl -fsSL https://cli.johlem.net/install.sh | bash -s -- speedtest-cli
Uninstall
curl -fsSL https://cli.johlem.net/uninstall.sh | bash -s -- speedtest-cli
NixOS / Nix
nix profile install "tarball+https://cli.johlem.net/releases/cli-johlem-net-latest.tar.gz#speedtest-cli"
Features
- Multi-stream bandwidth: spawns N parallel HTTP transfers (default 4); single-stream measurements under-report on long-fat-pipe links
- Bufferbloat metric: samples latency *during* the load test and reports `loaded - idle` with a DSLReports-style A..F grade — the metric that correlates with video-call quality
- Idle ping: min / max / avg / jitter / p95 over a configurable sample count
- `--watch <secs>`: repeat-on-interval mode, appends one CSV row per run to `~/.local/share/speedtest-cli/history.csv`
- Per-stream throughput breakdowns in JSON output
- `--download-only` / `--upload-only` to limit which leg runs
- `--ping-only` for a quick health check (no bandwidth load)
- ISP, location, external IP detection via ip-api.com (best-effort)
- Transfer-time ETA table for seven common file sizes
- `--json` machine-readable output with bps + Mbps + per-stream + p95
- `--no-color` for clean log capture; ANSI colours by default
- Hardened defaults: minimum `--watch` interval of 30 s; max 16 streams
- Zero runtime dependencies — single static binary
Requirements
Runtime
Linux x86_64 (zero runtime deps)
Dependencies
Zero third-party dependencies — Python standard library only.
Network
Outbound HTTPS access to speed.cloudflare.com (primary) and download.thinkbroadband.com (fallback). ISP/geo lookups use ip-api.com and api.ipify.org but are non-fatal if blocked.
Usage
speedtest-cli [OPTIONS]
Run speedtest-cli --help to see every flag.
Flags
| Flag | Purpose |
|---|---|
--download-only | Only run the download leg of the test |
--upload-only | Only run the upload leg of the test |
--quick | Fast single-sample test (less accurate, no warm-up) |
--size SIZE | Custom size for ETA estimation (e.g. 1GB, 500MB, 2.5GB) |
--no-color | Disable ANSI colour output |
--json | Output final results as JSON (suppresses live progress) |
--server URL | Custom download test URL (must accept ?bytes=N) |
--version | Print the version banner |
Examples
Full speed test
$ speedtest-cli
╔══════════════════════════════════════════════════════╗
║ speedtest-cli v1.0.0 — CLI Internet Speed Test ║
╚══════════════════════════════════════════════════════╝
── Network Info ────────────────────────────────────────
External IP: 203.0.113.42 Local: 192.168.1.50
ISP: Example Telecom — Luxembourg, LU
── Ping / Latency ──────────────────────────────────────
Ping: 14.2 ms avg jitter 1.8 ms
── Download ────────────────────────────────────────────
Result: 487.31 Mbps ✓ Very Good
── Upload ──────────────────────────────────────────────
Result: 92.18 Mbps ◎ GoodFast single-sample test
$ speedtest-cli --quickEstimate transfer time for a custom size
$ speedtest-cli --size 2.5GB
...
─── Custom Size: 2.5 GB ─────────────────────────────
Download: 42s
Upload: 3m 38sJSON output for scripting
$ speedtest-cli --json
{
"timestamp": "2026-05-26T15:42:11",
"external_ip": "203.0.113.42",
"isp": "Example Telecom",
"ping_ms": { "avg": 14.2, "jitter": 1.8 },
"download_mbps": 487.31,
"upload_mbps": 92.18
}Download only, no colour, log-friendly
$ speedtest-cli --download-only --no-color >> speedtest.logInstall Layout
# Standard layout for all cli.johlem.net tools
~/.local/lib/speedtest-cli/ # Tool source files
~/.local/bin/speedtest-cli # Executable wrapper
~/.local/log/cli.johlem.net/speedtest-cli_*.log # Install/uninstall logs
After install, run speedtest-cli --help (requires ~/.local/bin in your PATH).
Changelog
# Changelog All notable changes to `speedtest-cli` (Rust). Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [1.1.0] — 2026-06-06 Release notes pending — fill in before announcing. ## [1.0.0] — 2026-06-05 Initial Rust release.
Integrity
Verify your download against these SHA256 checksums:
| File | SHA256 |
|---|
This tool is provided as-is with no warranty. Use at your own risk. Always review scripts before running them. Not responsible for any damage or data loss. Intended for authorized network diagnostics, research, and educational purposes only.