netblip
v0.1.1
Published
Measure your internet speed — download, upload, and latency from the terminal.
Maintainers
Readme
netblip 🧩
Measure your internet speed — download, upload, and latency — from Node.js or the terminal.
Install
npm install netblipCLI
npx netblipOutput:
netblip — internet speed test
📥 Download : 94.2 Mbps
📤 Upload : 23.1 Mbps
🏓 Latency : 12ms (min 9ms / max 18ms / jitter 2ms)Programmatic API
import { speedtest } from 'netblip';
const result = await speedtest();
console.log(result);
// {
// download: 94.2,
// upload: 23.1,
// latency: { avg: 12, min: 9, max: 18, jitter: 2 },
// unit: 'Mbps'
// }Options
const result = await speedtest({
latencyUrl: 'https://speed.cloudflare.com/__down?bytes=0',
downloadUrl: 'https://speed.cloudflare.com/__down?bytes=25000000',
uploadUrl: 'https://speed.cloudflare.com/__up',
latencySamples: 5, // number of ping probes
uploadSizeMB: 10, // payload size for upload test
onProgress: ({ stage }) => console.log('Testing:', stage),
});Endpoints
Uses Cloudflare Speed Test endpoints by default — no API key needed, no account required.
History & Trends
By default results are not saved. Opt in with --save or saveHistory: true:
# Run and save
npx netblip --save
# View trends across all saved runs
npx netblip --history
# Clear all history
npx netblip --clearProgrammatic:
import { speedtest, loadHistory, computeTrends } from 'netblip';
// Save this run
await speedtest({ saveHistory: true });
// Analyse stored history
const history = loadHistory();
const trends = computeTrends(history);
// {
// count: 12,
// download: { avg: 94.1, min: 80, max: 110, trend: 'stable' },
// upload: { avg: 22.3, min: 18, max: 28, trend: 'improving' },
// latency: { avg: 13, min: 9, max: 22, trend: 'stable' },
// }History is stored at ~/.netblip/history.json by default.
Override with NETBLIP_HISTORY_FILE env var or historyFile config key.
License
MIT
