netsweep
v1.2.0
Published
Network Swiss Army Knife - CLI tool for comprehensive network diagnostics
Maintainers
Readme
netsweep
Network Swiss Army Knife - A single command for comprehensive network diagnostics.

Features
- Connection Info - Local IP, gateway, external IP, DNS servers
- Device Discovery - Find all devices on your network via ARP with vendor identification
- Speed Test - Download/upload speeds and latency via Cloudflare
- Port Scanner - Scan common ports on any host
- WiFi Info - Signal strength, noise, channel, and transmit rate
- ISP & Geolocation - ISP name, ASN, and location lookup
- Traceroute - Visual traceroute with latency bars
- Internet Health - Check connectivity to major services
- Beautiful Output - Clean terminal UI with colors and tables
- JSON Output - Pipe results to other tools
Installation
Using Bun (recommended)
# Run directly without installing
bunx netsweep
# Or install globally
bun install -g netsweep
netsweepUsing npm
# Run directly
npx netsweep
# Or install globally
npm install -g netsweep
netsweepFrom source
git clone https://github.com/Johannes-Berggren/netsweep.git
cd netsweep
bun install
bun link
netsweepUsage
# Full network scan (all diagnostics)
netsweep
# Individual scans
netsweep -d # Devices only
netsweep -s # Speed test only
netsweep -p # Gateway ports only
netsweep -w # WiFi info only
netsweep --isp # ISP & location only
netsweep --trace # Traceroute only
netsweep --health # Internet health only
# Scan specific host
netsweep -p -t 192.168.0.7
# JSON output for scripting
netsweep --json
netsweep -d --json | jq '.devices[] | select(.vendor == "Apple")'
# Diagnose a slow or partial scan
netsweep --verbose # per-phase timings, and which probes failed
netsweep --timeout 3 # give up on any phase after 3 secondsOptions
| Flag | Short | Description |
|------|-------|-------------|
| --all | -a | Run all scans (default) |
| --devices | -d | Scan for network devices |
| --speed | -s | Run speed test |
| --ports | -p | Scan gateway ports |
| --wifi | -w | Show WiFi info |
| --isp | -i | Show ISP & geolocation |
| --trace | -r | Run traceroute to 1.1.1.1 |
| --health | | Check internet health |
| --target <ip> | -t | Scan specific IP for ports |
| --timeout <sec> | | Cap every scan phase at <sec> seconds |
| --verbose | | Show per-phase timings and why probes failed |
| --json | | Output as JSON |
| --help | | Show help |
Requirements
- Bun >= 1.0 or Node.js >= 18
- macOS (Linux support coming soon)
How it works
- Connection: Uses
ipconfig,netstat, and ipify.org API - Devices: Parses the ARP table with MAC vendor lookup (1000+ vendors)
- Speed: Download/upload against Cloudflare's speed test endpoints
- Latency: TCP handshake timing against public resolvers, sampled five times against a single host so the jitter figure is real variance
- Ports: TCP connect scan on common service ports
- WiFi: Reads from macOS system_profiler
- ISP: Queries ip-api.com (free, no API key required)
- Traceroute: Runs native traceroute command
- Health: HTTP HEAD requests to major services
Every phase runs under a deadline, so one unreachable host or blocked probe
can't wedge the scan. A probe that fails reports unreachable rather than a
misleading 0ms — run --verbose to see exactly which one and why.
License
MIT
