A Terminal User Interface (TUI) application for monitoring network interfaces and process connections on macOS.
- Real-time Network Statistics: View IP addresses and bandwidth usage with braille graphs
- Bandwidth Formatting: Automatic formatting in B, KB, MB, or GB for easy reading
- Process Monitoring: List unique process names with their connection counts
- Connection Details: Select a process to view all its network connections (protocol, addresses, ports, status)
- Auto-refresh: Data updates every 3 seconds automatically
- Professional UI: Clean, organized interface with rounded borders and color-coded graphs
- macOS
- Python 3.12+
brew tap libardoram/tools
brew install macnetmonitoruv tool install git+https://github.com/libardoram/macnetmonitor.gitpipx install git+https://github.com/libardoram/macnetmonitor.gitpip install git+https://github.com/libardoram/macnetmonitor.gitgit clone https://github.com/libardoram/macnetmonitor.git
cd macnetmonitor
uv sync
uv run python main.py# Run the application
netw
# To view process connections (requires elevated privileges)
sudo netwq- Quit the applicationr- Manually refresh datas- Toggle sort (by connections or name)↑/↓- Navigate process list
# If installed with Homebrew
brew update
brew upgrade macnetmonitor
# If installed with uv
uv tool upgrade netw
# If installed with pipx
pipx upgrade netw
# If installed with pip
pip install --upgrade git+https://github.com/libardoram/macnetmonitor.git# If installed with Homebrew
brew uninstall macnetmonitor
# If installed with uv
uv tool uninstall netw
# If installed with pipx
pipx uninstall netw
# If installed with pip
pip uninstall netwmacnetmonitor/
├── main.py # Entry point
├── src/
│ ├── app.py # Main application class
│ ├── models/ # Data models
│ │ ├── connection.py # Connection data model
│ │ ├── network_stats.py # Network statistics model
│ │ └── process_info.py # Process information model
│ ├── network/ # Network data collection
│ │ └── collector.py # NetworkCollector class
│ └── ui/ # UI widgets
│ ├── braille_graph.py # Multi-line braille graph renderer
│ ├── connection_details.py # Connection details table
│ ├── network_stats.py # Network stats display
│ └── process_list.py # Process list table
├── pyproject.toml # Project configuration
└── README.md # This file
- macOS specific: Uses psutil's macOS-specific network interfaces
- Permissions:
psutil.net_connections()requires sudo on macOS for full process information - Address families: Supports IPv4 (AF_INET=2) and IPv6 (AF_INET6=10)
git clone https://github.com/libardoram/macnetmonitor.git
cd macnetmonitor
uv sync
uv run python main.py- Follow PEP 8
- Use type hints (Python 3.12+ with
from __future__ import annotations) - Modern type syntax:
list[str]instead ofList[str],|instead ofUnion
MIT License - see LICENSE file for details
Libardo Ramirez Tirado (libar@mac.com)