speedtest-cli
A fast and simple command-line tool to test your internet connection speed, written in Rust.
Features
- Download Speed Test: Measure your download speed
- Upload Speed Test: Measure your upload speed
- Full Speed Test: Run both download and upload tests
- Multiple Units: Display results in bps, Kbps, Mbps, or Gbps
- Verbose Logging: Debug mode for detailed test information
- Colorful Output: Easy-to-read colored terminal output
Installation
From crates.io (once published)
From source
Clone and build:
The binary will be available at target/release/speedtest-cli
Install directly to PATH
Build and install in one step:
This will compile the binary and install it to ~/.cargo/bin/ (which should be in your PATH). After installation, you can run speedtest-cli from anywhere.
To uninstall:
Usage
Basic Commands
Run a full speed test (download + upload):
Test download speed only:
Test upload speed only:
Options
Unit Selection
Use the --unit or -u flag to specify the output unit:
Available units:
bps- bits per secondkbps- kilobits per secondmbps- megabits per second (default)gbps- gigabits per second
Verbose Mode
Enable detailed logging with the --verbose or -v flag:
Examples
# Quick download test with default settings
# Full test showing results in Kbps
# Upload test with verbose logging
# Download test in Gbps with debug info
Help
Get help for any command:
Sample Output
=> Running full speed test (download + upload)...
Speed Test Results
===================
Download Speed: 48.42 Mbps
Upload Speed: 25.08 Mbps
Requirements
- Rust 1.70 or higher
- Active internet connection
Dependencies
clap- Command-line argument parsingtokio- Async runtimereqwest- HTTP clientenv_logger&log- Loggingcolored- Terminal colorsthiserror- Error handlingfutures-util- Async utilities
How It Works
The tool performs speed tests by:
- Download: Downloading test files from reliable servers and measuring transfer rate
- Upload: Uploading data to test endpoints and measuring transfer rate
Results are calculated in bytes per second and converted to your chosen unit.
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Roadmap
- Add server selection options
- Support for latency/ping tests
- JSON output format
- Configuration file support
- Progress bars for long tests
Made with ❤️ and Rust