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
ifpretty # essentials view; runs `ifconfig` for you
ifpretty -v # verbose: every field + expand collapsed interfaces
ifpretty en0 # limit to one or more interfaces
ifconfig | ifpretty # or pipe ifconfig in yourself
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 --wan # + public IP / ASN / geo (opt-in; sends IP to ipapi.co)
ifconfig | ifpretty --explain # append a legend explaining the flags/options seen
ifpretty --update-oui # refresh the bundled IEEE vendor database
Run it bare and it runs ifconfig for you; or pipe ifconfig in to control which
interfaces to show. The default is an essentials view (identity, routable IPs,
gateway, throughput) that collapses down/address-less interfaces to one line; pass
-v for every field.
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.
--wan (external, opt‑in): looks up your public IP plus ASN/ISP/geo via
ipapi.co and shows it in the overview. This sends your public IP to a third
party, so it is strictly opt‑in; the result is cached for ~1 h, times out fast,
and degrades silently offline. --update-oui refreshes the vendor database from
the IEEE registry into ~/.cache/ifpretty/ (overrides the bundled copy).
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.4.0.tar.gz.
File metadata
- Download URL: ifpretty-0.4.0.tar.gz
- Upload date:
- Size: 408.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
daf36c484fc4a91e655228668bb1c1c007b334ecd09e075e2e72c1875eecc724
|
|
| MD5 |
6dd59d04362e8349aa1709b173c3414c
|
|
| BLAKE2b-256 |
61d027ee4a3f39bffd359ac547efb20ea0b4d0475e087c4b9317eafa99110c2c
|
File details
Details for the file ifpretty-0.4.0-py3-none-any.whl.
File metadata
- Download URL: ifpretty-0.4.0-py3-none-any.whl
- Upload date:
- Size: 403.6 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 |
ed74751a4ca328dbb504835adf1708bc8553d4fd8e6cfc2d2da247b329d0de28
|
|
| MD5 |
a8f56218b94016c50658ee20363ecffe
|
|
| BLAKE2b-256 |
ca0dda9f5108d9caa92bb49b7172f9f34150eeece7080035a5930a48bb5a71e7
|