Prettify and enrich ifconfig output: aligned tables, IP/MAC/scope annotations, OUI vendor lookup, live DNS/DHCP/route, and a 1h bandwidth graph.
Project description
ifpretty
Prettify and enrich ifconfig output — aligned tables, color, decoded flags,
IP/MAC/scope annotations, OUI vendor lookup, live DNS/DHCP/route, and a 1‑hour
bandwidth graph. Built on rich; macOS‑focused.
ifconfig | ifpretty
Install
pip install ifpretty
Usage
ifconfig | ifpretty # boxed table per interface (default), borders aligned
ifconfig | ifpretty --records # compact label/value record layout
ifconfig | ifpretty --table # single wide table, all fields as columns (<=240)
ifconfig | ifpretty --live # + route, traffic, friendly names, DNS, DHCP (macOS)
ifconfig | ifpretty --check # + ping the default gateway for latency (macOS)
ifconfig | ifpretty --explain # append a legend explaining the flags/options seen
ifconfig en0 | ifpretty
It reads raw ifconfig on stdin, so you stay in control of which interfaces
to show.
What it adds
Always on (offline, deterministic):
- Per‑interface role (loopback / Ethernet·Wi‑Fi / VPN·tunnel / bridge / …).
- IP scope for every address — loopback / link‑local / ULA / private / global — plus IPv4 network + usable‑host count.
- MAC kind (universal vs locally‑administered), OUI vendor (bundled IEEE registry, no network), shared‑MAC notes (e.g. bridge members), and EUI‑64 detection.
- Media speed/duplex with a half‑duplex ⚠ warning; jumbo / sub‑1280 MTU notes.
- Decoded flag/option/nd6 bitfields; aligned IPv6 attribute columns.
--live (macOS, cross‑references the system):
- Default route + gateway, friendly hardware‑port names, per‑interface DNS and search domains, DHCP server + lease, traffic counters (bytes + packets) and error/collision counts.
--check: pings the default gateway and reports latency.
1‑hour bandwidth graph: schedule the recorder, then a Unicode sparkline of the last hour appears automatically:
# once, e.g. in crontab -e
* * * * * /usr/local/bin/ifpretty --record
1h in ▁▁▁▂▄█▅▂▁▁▁▁ peak 10.0 Mbps
1h out ▁▂▂▄▆█▄▂▂▁▁▁ peak 533.3 Kbps
History is stored at ~/.cache/ifpretty/samples.csv (override with
IFPRETTY_HISTORY).
Notes
- Colors auto‑disable when piped; force with
CLICOLOR_FORCE=1, disable withNO_COLOR=1. --live/--check/--recorduse macOS tools (route,netstat,networksetup,scutil,ipconfig,ping) and no‑op elsewhere.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ifpretty-0.1.0.tar.gz.
File metadata
- Download URL: ifpretty-0.1.0.tar.gz
- Upload date:
- Size: 404.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f01d246187f45a29dddbff2b3f0ca63c03a1b28bab762ea4f3e147e0adeb372
|
|
| MD5 |
6bc3b42fb6ff830c6aee5cc3df4a1d3d
|
|
| BLAKE2b-256 |
21ac8db17a307402a9c90f2e47016e95c692e34192d9821279e39442252ae9da
|
File details
Details for the file ifpretty-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ifpretty-0.1.0-py3-none-any.whl
- Upload date:
- Size: 400.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2f4df5082ede0f858eb7e895571e9cc72f3f56cb52b67d32df2780c5fa84983
|
|
| MD5 |
9c574a273a549e182b9c9f95708df608
|
|
| BLAKE2b-256 |
61e6bd2eea02cd2a7dc3b86dcad9707111fd7580d19df231cf8b58ac4ec604fe
|