| Crates.io | netrunner_cli |
| lib.rs | netrunner_cli |
| version | 0.5.7 |
| created_at | 2025-05-30 01:53:04.478639+00 |
| updated_at | 2025-11-13 00:51:09.613748+00 |
| description | A feature-rich Rust-based CLI to test and analyze your internet connection |
| homepage | https://github.com/sorinirimies/netrunner_cli |
| repository | https://github.com/sorinirimies/netrunner_cli |
| max_upload_size | |
| id | 1694609 |
| size | 3,446,429 |
A high-performance, cyberpunk-styled network diagnostics and speed testing tool built in Rust.
π High-Speed Testing - Optimized for gigabit+ connections (up to 10 Gbps)
π Smart Server Selection - Robust geolocation-based discovery
π Comprehensive Metrics
π Live Animated Bandwidth Monitors
π Historical Tracking
--history flagπ Network Diagnostics
π¨ Stunning Visuals
cargo install netrunner_cli
git clone https://github.com/sorinirimies/netrunner_cli.git
cd netrunner_cli
cargo install --path .
Download pre-built binaries from the Releases page.
netrunner_cli
Experience the full cyberpunk intro with animated borders and color-cycling effects!
# Full speed test with automatic server selection and live bandwidth monitor
netrunner_cli speed
# Speed test with JSON output (no bandwidth monitor)
netrunner_cli speed --json
# Speed test without animations (headless mode, no bandwidth monitor)
netrunner_cli speed --no-animation
During speed tests, Netrunner displays live animated bandwidth monitors that update in real-time:
Download Speed Monitor (15 seconds):
β¨β¨β¨ DOWNLOAD SPEED BANDWIDTH MONITOR β©β©β©
104.2 Mbps
Peak: 120.0 Mbps
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββ
ββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Upload Speed Monitor (12 seconds):
β¨β¨β¨ UPLOAD SPEED BANDWIDTH MONITOR β©β©β©
45.8 Mbps
Peak: 52.3 Mbps
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββ
ββββββββββββββββββ
ββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Animation Features:
# View last 30 days of test results
netrunner_cli --history
# Or use the shorthand
netrunner_cli -H
# Run full network diagnostics
netrunner_cli diag
# Get detailed diagnostics output
netrunner_cli diag --detail detailed
# Run both speed test and diagnostics
netrunner_cli full
netrunner_cli [OPTIONS] [COMMAND]
speed - Run a comprehensive internet speed testdiag - Run network diagnostics to analyze your connectionfull - Run both speed test and diagnosticshelp - Display help information| Flag | Long Form | Description |
|---|---|---|
-H |
--history |
View test history (last 30 days) |
-s <URL> |
--server <URL> |
Custom test server URL |
-z <MB> |
--size <MB> |
Test file size in MB (default: 100) |
-t <SEC> |
--timeout <SEC> |
Timeout in seconds (default: 30) |
-j |
--json |
Output results in JSON format |
-n |
--no-animation |
Disable animations (headless mode) |
-d <LEVEL> |
--detail <LEVEL> |
Detail level: basic, standard, detailed, debug |
-m <COUNT> |
--max-servers <N> |
Maximum servers to test (default: 3) |
-h |
--help |
Display help information |
-V |
--version |
Display version information |
# Run speed test with custom server
netrunner_cli speed --server https://speed.cloudflare.com
# Run diagnostics with debug output
netrunner_cli diag --detail debug
# Get JSON output for scripting
netrunner_cli speed --json > results.json
# Run headless mode (CI/CD)
netrunner_cli speed --no-animation --json
# Test against 5 servers
netrunner_cli speed --max-servers 5
# View your connection history
netrunner_cli --history
Netrunner provides a comprehensive assessment based on multiple metrics:
| Quality | Download | Upload | Ping | Jitter | Packet Loss |
|---|---|---|---|---|---|
| βββββ Excellent | β₯100 Mbps | β₯20 Mbps | <20 ms | <5 ms | <0.1% |
| ββββ Good | β₯50 Mbps | β₯10 Mbps | <50 ms | <15 ms | <1% |
| βββ Average | β₯25 Mbps | β₯5 Mbps | <100 ms | <25 ms | <2.5% |
| ββ Poor | β₯10 Mbps | β₯2 Mbps | <150 ms | <40 ms | <5% |
| β Very Poor | <10 Mbps | <2 Mbps | β₯150 ms | β₯40 ms | β₯5% |
Netrunner is optimized for modern high-speed connections:
Geolocation: Detects your location via IP using 5 services with sequential failover
Data Validation: Every response is validated for:
Server Discovery: Dynamic multi-source approach
Distance Calculation: Haversine formula for accurate geographic distance
distance = 2r Γ arcsin(β(sinΒ²(Ξlat/2) + cos(lat1) Γ cos(lat2) Γ sinΒ²(Ξlon/2)))
where r = 6371 km (Earth's radius)
Quality Scoring: Intelligent server ranking
quality_score = (10000 Γ geographic_weight) / (latency_penalty + distance_penalty)
where:
latency_penalty = max(latency_ms, 1.0)
distance_penalty = max(distance_km / 100.0, 1.0)
geographic_weight = 0.3 to 1.0 (regional > continental > global)
Server Testing: Concurrent performance evaluation
Output: Clean, professional display
NETRUNNER_DEBUG=1~/.netrunner_cli/history.dbExperience the cyberpunk aesthetic with:
Real-time animated bandwidth visualization:
# Set custom history database path
export NETRUNNER_HISTORY_PATH="~/custom/path/history.db"
# Disable colors (for CI/CD)
export NO_COLOR=1
# Enable debug mode (show geolocation service failures)
export NETRUNNER_DEBUG=1
Debug Mode: When NETRUNNER_DEBUG=1 is set, the application shows trace logs for failed geolocation services. This is useful for troubleshooting network issues or API rate limits.
Normal Output:
π Detecting your location...
π Location: Berlin, Germany (via ipinfo.io)
π ISP: Deutsche Telekom
Debug Output:
π Detecting your location...
[TRACE] ipapi.co geolocation failed: HTTP error: 429 Too Many Requests
[TRACE] ip-api.com geolocation failed: timeout
π Location: Berlin, Germany (via ipinfo.io)
π ISP: Deutsche Telekom
Location: ~/.netrunner_cli/history.db
You can manually inspect or backup this database using sled tools.
# Run a simple speed test
netrunner speed
# Output:
# π Detecting your location...
# π Location: San Francisco, United States (via ipapi.co)
# π ISP: Comcast Cable Communications
#
# π Building server pool...
# β 12 servers in pool
#
# β‘ Testing server performance...
# β 3 servers selected for testing
# 1. US West Coast Hub - 8.2 ms (15 km)
# 2. LibreSpeed Los Angeles - 12.5 ms (560 km)
# 3. US Central - 28.3 ms (2800 km)
#
# [Download/Upload speed tests with animated graphs]
#
# β Download: 487.3 Mbps
# β Upload: 125.8 Mbps
# β Ping: 8.2 ms
# β Quality: Excellent
# Get machine-readable results
netrunner speed --json
# Output:
# {
# "timestamp": "2024-01-15T10:30:00Z",
# "download_mbps": 487.3,
# "upload_mbps": 125.8,
# "ping_ms": 8.2,
# "jitter_ms": 1.5,
# "packet_loss_percent": 0.0,
# "server_location": "San Francisco, USA",
# "quality": "Excellent",
# "isp": "Comcast Cable Communications"
# }
# Enable debug mode to see geolocation service failures
NETRUNNER_DEBUG=1 netrunner speed
# Output shows trace logs:
# π Detecting your location...
# [TRACE] ipapi.co geolocation failed: HTTP error: 429 Too Many Requests
# [TRACE] ip-api.com geolocation failed: connection timeout
# π Location: Berlin, Germany (via ipinfo.io)
# Show test history
netrunner history
# Output:
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# β Speed Test History β
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
#
# Recent Tests (Last 7 Days):
# ββββββββββββββββββββββ¬βββββββββββ¬βββββββββββ¬βββββββββββ¬βββββββββββ
# β Date β Download β Upload β Ping β Quality β
# ββββββββββββββββββββββΌβββββββββββΌβββββββββββΌβββββββββββΌβββββββββββ€
# β 2024-01-15 10:30 β 487.3 β 125.8 β 8.2 ms β Excellentβ
# β 2024-01-14 15:20 β 492.1 β 127.3 β 7.9 ms β Excellentβ
# β 2024-01-13 09:45 β 478.5 β 123.1 β 9.1 ms β Excellentβ
# ββββββββββββββββββββββ΄βββββββββββ΄βββββββββββ΄βββββββββββ΄βββββββββββ
# Run comprehensive network diagnostics
netrunner diagnose
# Output includes:
# - Public IP address
# - ISP information
# - DNS servers
# - Network interfaces
# - Traceroute to common destinations
# - Connection quality assessment
# Combine speed test with diagnostics
netrunner analyze
# Performs:
# 1. Network diagnostics
# 2. Speed test
# 3. Historical comparison
# 4. Quality assessment with recommendations
# Test against specific server
netrunner speed --server https://custom-server.example.com
# Useful for testing:
# - Internal network speeds
# - Specific CDN endpoints
# - Custom speed test servers
# Run without animations (faster, CI/CD friendly)
netrunner speed --no-animation
# Or use environment variable
NO_COLOR=1 netrunner speed
# View statistics
netrunner history --stats
# Output:
# Statistics (Last 30 Days):
# ββββββββββββββββββββββββββββββββββββββββ
# Average Download: 485.2 Mbps
# Average Upload: 125.1 Mbps
# Average Ping: 8.5 ms
# Tests Performed: 47
# Best Quality: Excellent (89% of tests)
# Clone the repository
git clone https://github.com/sorinirimies/netrunner_cli.git
cd netrunner_cli
# Build in debug mode
cargo build
# Build in release mode (optimized)
cargo build --release
# Run tests
cargo test
# Run with logging
RUST_LOG=debug cargo run
# Run all tests
cargo test
# Run specific test module
cargo test speed_test
# Run with output
cargo test -- --nocapture
# Run integration tests
cargo test --test '*'
netrunner_cli/
βββ src/
β βββ main.rs # CLI entry point
β βββ lib.rs # Library exports
β βββ modules/
β βββ speed_test.rs # Speed testing implementation
β βββ history.rs # History storage with sled
β βββ diagnostics.rs # Network diagnostics
β βββ intro.rs # Animated intro screen
β βββ logo.rs # ASCII logo rendering
β βββ ui.rs # UI components and gauges
β βββ types.rs # Shared types and traits
βββ tests/ # Integration tests
βββ examples/ # Example usage
βββ Cargo.toml # Project dependencies
Contributions are welcome! Here's how you can help:
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)cargo fmt and cargo clippy before committingcargo testThis project is licensed under the MIT License - see the LICENSE file for details.
See CHANGELOG.md for detailed version history.
Found a bug? Please open an issue with:
RUST_LOG=debug)Have an idea? Open an issue with the enhancement label!
Built with β€οΈ and Rust by Sorin Irimies
Jack in, trace the net, and measure your connection with style. π