Skip to main content

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 with NO_COLOR=1.
  • --live / --check / --record use macOS tools (route, netstat, networksetup, scutil, ipconfig, ping) and no‑op elsewhere.

License

MIT

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

ifpretty-0.2.0.tar.gz (405.0 kB view details)

Uploaded Source

Built Distribution

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

ifpretty-0.2.0-py3-none-any.whl (400.9 kB view details)

Uploaded Python 3

File details

Details for the file ifpretty-0.2.0.tar.gz.

File metadata

  • Download URL: ifpretty-0.2.0.tar.gz
  • Upload date:
  • Size: 405.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for ifpretty-0.2.0.tar.gz
Algorithm Hash digest
SHA256 16e38099bb94f1250c3d640399ba68d0f8c546e2e717118e23d12586b2036cef
MD5 2c96e81004a58701321e3064bc3ea194
BLAKE2b-256 46baacaefaf3871602d24ba4d61f6d2f4b390a666bab33fdb010d9838676785e

See more details on using hashes here.

File details

Details for the file ifpretty-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ifpretty-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 400.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for ifpretty-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9bd04a013ba3793c313fff551aa2c625d8fe008a944e0c3e4008b9b1c6e26a6c
MD5 d7eb9425ec6589a86fe373593c4229c1
BLAKE2b-256 d5832a5ba75055014002170bdeb8e678ceae1b5588274504bdcc778fd46675fe

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