Skip to main content

A TUI network usage monitor.

Project description

Netwatch TUI (netwatchpy)

PyPI Version License: MIT

A TUI (Text-based User Interface) for monitoring network usage in real-time, with support for data limits and desktop notifications.


netwatch_demo


Features

  • Real-time Dashboard: A clean, terminal-based dashboard showing total download, upload, and current speeds.
  • Historical Analytics: View your usage trends for the last 24 hours with hourly breakdown, peak hour identification, and traffic statistics including download/upload percentages and average usage.
  • Crash-Proof Database: Powered by SQLite with Write-Ahead Logging (WAL) to ensure your data is safe even if your PC loses power.
  • Data Cap Monitoring: Set a data limit (e.g., 10GB) and see your usage on a real-time progress bar.
  • Desktop Notifications: Get native desktop notifications when you hit 80% and 100% of your data limit.
  • Live Activity Log: An interactive, scrolling log of all network activity, updated every second.
  • Command Palette & Dark Mode: A modern TUI experience with a built-in command palette (Ctrl+P) and dark mode support (Ctrl+D).
  • Auto-Migration: Automatically detects and imports data from older versions (quota.json) so you never lose history.
  • Cross-Platform: Runs perfectly on Windows, macOS, and Linux.

Installation

Designed for Python 3.8+ and distributed on PyPI for simple installation with pip.

pip install netwatchpy

Usage

Once installed, the netwatch command will be available in your terminal.

To start the monitor (monitors all interfaces):

netwatch

To see all available options and help:

netwatch --help

Command-Line Arguments

You can control the monitor with these arguments:

  • -h, --help

    • Shows the help message and all options.
  • -i INTERFACE, --interface INTERFACE

    • Monitors a single, specific network interface (e.g., -i "Wi-Fi"). Defaults to "all".
  • -l LIMIT, --limit LIMIT

    • Sets a data cap and shows a progress bar (e.g., -l "10GB" or -l "500MB").
  • --log LOG

    • Saves all network activity to a specified CSV file (e.g., --log "usage.csv").

Examples

Set a 10GB data limit:

netwatch -l "10GB"

Monitor a specific interface ("Wi-Fi") and log to a file:

netwatch -i "Wi-Fi" --log "my_usage.csv"

In-App Keybindings

  • Ctrl+p: Open the Command Palette

  • Ctrl+d: Toggle Dark / Light Mode

  • r: Refresh the history chart

  • Ctrl+r: Reset all counters and history to zero

  • Ctrl+s: Show save status (Data is auto-saved)

  • Ctrl+q: Quit the application


Understanding the Interface

1. Live Monitor Tab

This is the default view. It shows:

  • Summary Cards: Total Upload, Download, and Combined Usage for the current session + history.

  • Quota Bar: If a limit was set, this bar fills up. It turns Yellow at 80% and Red at 100%.

  • Live Table: A scrolling list of network speeds recorded every second.

2. History Tab (24h)

This tab visualizes your traffic over the last 24 hours.

  • Rows: Each row represents a 1-hour block of time (e.g., 14:00 covers 2:00 PM to 2:59 PM).

  • The Bar:

    • Solid Block (█): Represents Download traffic.

    • Shaded Block (░): Represents Upload traffic.

  • Total: The text on the right shows the exact data transferred during that hour.

Tip: If the graph looks outdated, press r to pull the latest stats from the database.


Bug Reports & Feature Requests

Found a bug or have a great idea? Please open an issue on the GitHub repository.

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netwatchpy-1.2.1.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netwatchpy-1.2.1-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file netwatchpy-1.2.1.tar.gz.

File metadata

  • Download URL: netwatchpy-1.2.1.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for netwatchpy-1.2.1.tar.gz
Algorithm Hash digest
SHA256 a43b611c439ee317fd4853bd179aba2ecbfec43a4016fb8940ed9a64ef7e9383
MD5 3a6f622ccc9c5e2a9d0a6e0434fbe65f
BLAKE2b-256 64b27735095144beedc43f627e6258e95f2871a897c383bf12f8c66d58069fd4

See more details on using hashes here.

File details

Details for the file netwatchpy-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: netwatchpy-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for netwatchpy-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0f9ce83c9304507fb27b62e42b6d9f80af3ef0c2fd0271389a8a6f580e4589ca
MD5 efadee3f1e04c079ea6bce946a06a16d
BLAKE2b-256 11978936d822fc620c92a60b2a1582670e9c1cdf01cc5011876bd202a2246d00

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page