Skip to content

uthumany/speedmeter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


πŸš€ SpeedMeter

Terminal-Based Interactive Internet Speed Meter

Real-time bandwidth monitoring in your terminal.

Python 3.10+ MIT License Cross-platform CLI Ready Textual TUI


SpeedMeter is a fully interactive, real-time internet speed meter that runs entirely in your terminal. It combines a beautiful Textual-based Terminal UI (TUI) with the power of speedtest-cli to give you live download/upload speed tests, historical tracking, system resource monitoring, and interactive controls β€” all without leaving your command line.


✨ Features

  • Interactive Terminal UI β€” Beautiful real-time dashboard with speed gauges, charts, and live data
  • Full Speed Tests β€” Download speed, upload speed, ping, and jitter measurements
  • Live Speed Gauges β€” Animated visual indicators for download, upload, and ping
  • Speed History Chart β€” Sparkline-style chart showing test results over time
  • Server Browser β€” Browse and select from available speedtest.net servers
  • System Monitor β€” Live CPU, memory, uptime, and network traffic display
  • Test History β€” Persistent storage of all speed test results (JSON-backed)
  • Quick Mode β€” Run a one-shot speed test from the CLI without the TUI
  • Export Results β€” Save test data to JSON files for analysis
  • Cross-Platform β€” Works on Linux, macOS, and Windows
  • Configurable β€” Custom themes, thresholds, units, and auto-refresh intervals

πŸ“Έ Screenshots

 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚  ╔═══════════════════════════════════════════════════╗  β”‚
 β”‚  β•‘  β”Œβ”€ Download ─┐  β”Œβ”€ Upload ───┐  β”Œβ”€ Ping ────┐  β•‘  β”‚
 β”‚  β•‘  β”‚ 256.42 Mbpsβ”‚  β”‚  42.18 Mbpsβ”‚  β”‚ 12.3 ms   β”‚  β•‘  β”‚
 β”‚  β•‘  β”‚ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β”‚  β”‚  β–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β”‚  β”‚ β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β”‚  β•‘  β”‚
 β”‚  β•‘  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β•‘  β”‚
 β”‚  β•‘  β”Œβ”€ Speed History ──────────────────────────────┐  β•‘  β”‚
 β”‚  β•‘  β”‚ β–„β–„β–„β–„β–„β–„β–„β–ˆβ–ˆβ–ˆβ–€β–€β–€β–ˆβ–ˆβ–ˆβ–ˆβ–„β–„β–„β–„β–„β–„β–ˆβ–ˆβ–ˆβ–€β–€β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ     β”‚  β•‘  β”‚
 β”‚  β•‘  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β•‘  β”‚
 β”‚  β•‘  β”Œβ”€ Connection ───┐  β”Œβ”€ System ───────────────┐  β•‘  β”‚
 β”‚  β•‘  β”‚ Server: XYZ    β”‚  β”‚ CPU: 23.4%             β”‚  β•‘  β”‚
 β”‚  β•‘  β”‚ ISP: ABC       β”‚  β”‚ Memory: 45.2%          β”‚  β•‘  β”‚
 β”‚  β•‘  β”‚ IP: 1.2.3.4    β”‚  β”‚ Uptime: 12h 34m       β”‚  β•‘  β”‚
 β”‚  β•‘  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β•‘  β”‚
 β”‚  β•‘  [Run Test] [Stop] [History] [Quick Mode]        β•‘  β”‚
 β”‚  β•‘  βœ“ 14:32:15 β€” DL: 256.42 | UL: 42.18 | 12.3ms   β•‘  β”‚
 β”‚  β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•  β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“¦ Installation

Prerequisites

  • Python 3.10+
  • pip (Python package manager)
  • git (optional, for cloning the repository)

Option 1: Quick Install (Recommended)

Linux / macOS:

curl -fsSL https://raw.githubusercontent.com/Uthuman/speedmeter/main/install.sh | bash

Windows (PowerShell):

iwr -useb https://raw.githubusercontent.com/Uthuman/speedmeter/main/install.ps1 | iex

Option 2: Manual Install from Source

# Clone the repository
git clone https://github.com/Uthuman/speedmeter.git
cd speedmeter

# Create a virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Install SpeedMeter
pip install -e .

Option 3: Install via pip (when published to PyPI)

pip install speedmeter

πŸš€ Usage

Launch the Interactive TUI

speedmeter

This opens the full interactive terminal dashboard. Use keyboard shortcuts:

Key Action
Space / R Run a speed test
S View test history
C View configuration
D Toggle detail view
Q Quit
Tab Navigate between widgets

Quick Test (CLI Mode)

Run a single speed test and exit (no TUI):

speedmeter --quick

List Available Servers

speedmeter --list-servers

Test with a Specific Server

speedmeter --quick --server 12345

Save Results to File

speedmeter --quick --output results.json

Use a Custom Config

speedmeter --config /path/to/config.json

Verbose Logging

speedmeter --verbose

Check Version

speedmeter --version

Run from Project Directory

python -m speedmeter
python -m speedmeter --quick

πŸŽ›οΈ Configuration

Configuration is stored at standard OS locations via platformdirs:

OS Config Path
Linux ~/.config/speedmeter/config.json
macOS ~/Library/Application Support/speedmeter/config.json
Windows C:\Users\<USER>\AppData\Local\speedmeter\config.json

Default Configuration

{
  "app": {
    "refresh_interval": 5,
    "theme": "auto",
    "history_size": 50,
    "chart_points": 30,
    "timeout": 30
  },
  "units": {
    "speed": "Mbps",
    "precision": 2
  },
  "notifications": {
    "enabled": true,
    "threshold_download": null,
    "threshold_upload": null
  }
}

πŸ§ͺ Running Tests

# Install dev dependencies
pip install -e ".[dev]"

# Run all tests
pytest

# Run with verbose output
pytest -v

# Run specific test file
pytest tests/test_speedmeter.py

# Run without network-dependent tests
pytest -m "not network"

πŸ—οΈ Project Structure

speedmeter/
β”œβ”€β”€ speedmeter/              # Main package
β”‚   β”œβ”€β”€ __init__.py          # Package init
β”‚   β”œβ”€β”€ __main__.py          # CLI entry point & arg parsing
β”‚   β”œβ”€β”€ app.py               # Textual TUI application
β”‚   β”œβ”€β”€ config.py            # Configuration management
β”‚   β”œβ”€β”€ history.py           # Test history persistence
β”‚   β”œβ”€β”€ tester.py            # Speed test execution
β”‚   └── widgets.py           # Custom Textual widgets
β”œβ”€β”€ tests/
β”‚   └── test_speedmeter.py   # Pytest test suite
β”œβ”€β”€ install.sh               # Unix installation script
β”œβ”€β”€ install.ps1              # Windows installation script
β”œβ”€β”€ uninstall.sh             # Unix uninstallation script
β”œβ”€β”€ requirements.txt         # Python dependencies
β”œβ”€β”€ setup.py                 # Package setup script
β”œβ”€β”€ pyproject.toml           # Modern build configuration
β”œβ”€β”€ pytest.ini               # Pytest configuration
β”œβ”€β”€ .gitignore               # Git ignore rules
β”œβ”€β”€ LICENSE                  # MIT License
└── README.md                # This file

🧰 Dependencies

Package Purpose
speedtest-cli Internet speed test engine (download, upload, ping)
rich Terminal rendering with styled output and progress bars
textual Terminal UI framework for interactive layouts
prompt_toolkit Interactive terminal input and key bindings
psutil System resource monitoring (CPU, memory, network)
colorama Cross-platform terminal color support (Windows)
platformdirs Standard OS paths for config, cache, and logs
requests HTTP fallback and API-based network checks
asyncio Non-blocking async operations for live UI
argparse CLI argument parsing
logging Runtime event and error logging
pytest Automated test suite

πŸ–₯️ Compatibility

Platform Status Notes
Linux βœ… Full support Tested on Ubuntu 22.04+, Fedora
macOS βœ… Full support Tested on macOS 13+ (Apple Silicon & Intel)
Windows βœ… Full support Tested on Windows 10/11 (PowerShell, cmd, Git Bash)

Terminal Requirements

  • 256-color support recommended (most modern terminals)
  • Minimum 80Γ—24 terminal size
  • Works in: GNOME Terminal, iTerm2, Windows Terminal, Alacritty, Kitty, tmux, VS Code integrated terminal

🀝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Setup

git clone https://github.com/Uthuman/speedmeter.git
cd speedmeter
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pip install -e ".[dev]"

πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.


πŸ™ Acknowledgments

  • speedtest-cli β€” Internet speed test library
  • Textual β€” Terminal UI framework
  • Rich β€” Terminal formatting library

Made with ❀️ for the terminal community
SpeedMeter v1.0.0

About

Terminal-based interactive internet speed meter with real-time TUI - Live download/upload/ping gauges, history charts, system monitor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors