wirespeed
Fast, zero-dependency internet speed test for the terminal. Measures download, upload, and latency using Cloudflare's global edge network.
$ npx wirespeed
wirespeed v1.0.0
Server Cloudflare — Mumbai (BOM)
IP 203.0.113.42
Latency 12.34 ms (jitter: 1.23 ms)
Download 245.67 Mbps
Upload 98.12 Mbps
Install
npm install -g @mayurpise/wirespeed
Or run directly:
npx @mayurpise/wirespeed
Usage
wirespeed
wirespeed --json
wirespeed --no-upload
wirespeed --no-download
Options
--json | Output results as JSON |
--no-download | Skip download test |
--no-upload | Skip upload test |
-h, --help | Show help |
-v, --version | Show version |
JSON output
wirespeed --json | jq .
{
"server": { "colo": "BOM", "city": "Mumbai", "ip": "203.0.113.42" },
"latency": { "median": 12.34, "jitter": 1.23, "unit": "ms" },
"download": { "speed": 245.67, "unit": "Mbps" },
"upload": { "speed": 98.12, "unit": "Mbps" }
}
How it works
wirespeed uses Cloudflare's speed test infrastructure (speed.cloudflare.com):
- Server detection — Identifies the nearest Cloudflare edge via
/cdn-cgi/trace
- Latency — 20 zero-byte round trips, reports median and jitter
- Download — Multi-phase parallel requests with increasing payload sizes (100KB to 100MB)
- Upload — Multi-phase parallel uploads (100KB to 10MB)
Bandwidth is calculated at the 90th percentile across all measurements for accuracy. Real-time speed is smoothed with an exponential moving average.
Requirements
License
MIT