netblip
v0.2.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.
Why netblip?
Most speed test packages are either too heavy, lock you into an account, or only give you one number. netblip is different:
| | netblip | speedtest-net | fast-cli | |---|---|---|---| | No API key / account | ✅ | ❌ requires registration | ✅ | | Download + Upload + Latency | ✅ | ✅ | ❌ download only | | Programmatic API | ✅ | ✅ | ❌ | | History & trends | ✅ | ❌ | ❌ | | Watch mode + alerts | ✅ | ❌ | ❌ | | Multiple providers | ✅ Cloudflare + Netflix | ❌ Ookla only | ❌ Netflix only | | Zero runtime dependencies | ✅ | ❌ | ❌ | | ESM-native | ✅ | ❌ | ❌ |
Zero dependencies — nothing to audit, nothing to break. Pure Node.js with no node_modules bloat at runtime.
No account, no tracking — hits Cloudflare and Netflix CDN endpoints directly. No data sent to third-party analytics services.
Built for developers — clean programmatic API, saveHistory/loadHistory/computeTrends all exported, works great in scripts, CI checks, and monitoring setups.
ISP watchdog ready — --watch mode with --alert-below lets you keep a terminal open and get instant alerts when your connection degrades. Pair with --save to build a long-term trend history.
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.
Watch Mode
Monitor your connection continuously with --watch:
# Run every 60 seconds (default)
npx netblip --watch
# Run every 30 seconds
npx netblip --watch 30
# Alert when download drops below 10 Mbps
npx netblip --watch --alert-below 10
# Combine with a provider
npx netblip --watch 60 --provider fastOutput:
netblip — watch mode [Cloudflare]
Interval : 60s
Press Ctrl+C to stop
─── Run #1 09:00:01 ───
📥 Download : 94.2 Mbps
📤 Upload : 23.1 Mbps
🏓 Latency : 12ms (min 9ms / max 18ms / jitter 2ms)
⏱ Next run in 57s... (Ctrl+C to stop)Every 5 runs a rolling summary is printed:
📊 Last 5 runs avg: ↓ 91.4 Mbps ↑ 22.8 Mbps ◉ 13ms
Trends: ↓ 📈 ↑ ➡️ ◉ 📈Watch mode always saves results to history.
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
