Skip to main content

A clean, readable cross-platform network interface CLI for macOS, Linux, and Windows.

Project description

English | 中文

nic

Release CI License

nic is a cross-platform CLI that turns native network tooling into a compact interface view you can scan quickly.

It keeps the default output focused on the active interfaces that matter right now: physical adapters, VM or virtual networks, and VPN or tunnel interfaces. Detailed per-interface data is still available when you explicitly ask for it.

Features

  • compact default summary for active interfaces only
  • grouped tables for Physical / Host, VM / Virtual, and Tunnel / VPN
  • detail, physical, all, show <iface>, and --json modes
  • platform-native collection on macOS, Linux, and Windows
  • stable output shape with graceful fallback when a field is unavailable
  • no third-party runtime dependencies

Platform Support

  • macOS Uses ifconfig -a, netstat -rn -f inet, and cached system_profiler SPNetworkDataType -json.
  • Linux Uses ip -j addr, ip -j route, and /etc/resolv.conf, with text-command fallback when JSON output is unavailable.
  • Windows Uses ipconfig /all, route print -4, and getmac /v /fo csv when available.

nic raw runs the native raw command for the current platform:

  • macOS: ifconfig -a
  • Linux: ip addr
  • Windows: ipconfig /all

Install

Latest release:

Option 1: install from GitHub Release

Recommended for normal users.

macOS / Linux:

python3 -m pip install --upgrade https://github.com/Kidder1/nic/releases/download/v0.1.2/nic_cli-0.1.2-py3-none-any.whl

Windows:

python -m pip install --upgrade https://github.com/Kidder1/nic/releases/download/v0.1.2/nic_cli-0.1.2-py3-none-any.whl

Option 2: pip install from source

Works on macOS, Linux, and Windows.

git clone https://github.com/<your-name>/nic.git
cd nic
python3 -m pip install .

On Windows, use python -m pip install . if python3 is not available.

Releases

nic is a pure Python CLI, so the best release format is not per-platform binaries. Each GitHub release publishes:

  • a source tarball
  • a universal wheel: py3-none-any.whl

The same wheel works on macOS, Linux, and Windows as long as the target machine has a supported Python version.

Version history is also tracked in CHANGELOG.md.

Option 3: local launcher

For macOS and Linux shells, you can install the repo launcher into ~/.local/bin:

git clone https://github.com/<your-name>/nic.git
cd nic
./scripts/install.sh

Usage

nic
nic detail
nic physical
nic all
nic show en0
nic --json
nic raw

Commands

  • nic Compact grouped summary of active interfaces with IFACE, TYPE, IPv4, MAC, and Subnet.
  • nic detail Verbose active summary with per-interface detail sections.
  • nic physical All physical adapters on the current platform.
  • nic all Full inventory of physical, system or virtual, and tunnel interfaces.
  • nic show <iface> Detailed view for one interface.
  • nic --json Machine-readable JSON payload.
  • nic raw Native raw network command for the current platform.
  • nic --refresh Refreshes cached metadata when the platform supports it. Today this mainly affects macOS.

Example

Network summary
  Primary       : en0 (Wi-Fi)
  Default route : en0 -> 172.17.6.1
  Active        : 1 physical, 3 vm/virtual, 1 tunnel/VPN

Physical / Host
  IFACE  TYPE   IPv4             MAC                Subnet
  en0    Wi-Fi  172.17.6.246/23  5a:41:83:8a:50:40  172.17.6.0/23

VM / Virtual
  IFACE      TYPE        IPv4            MAC                Subnet
  bridge100  Bridge      10.211.55.2/24  be:d0:74:73:20:64  10.211.55.0/24
  bridge101  Bridge      10.37.129.2/24  be:d0:74:73:20:65  10.37.129.0/24
  vmenet1    VM network  -               ce:8a:fb:1c:07:34  -

Tunnel / VPN
  IFACE  TYPE        IPv4           MAC  Subnet
  utun4  Tunnel/VPN  198.18.0.1/30  -    198.18.0.0/30

Notes

  • The default view is optimized for human scanning, not full completeness.
  • Interface names and adapter labels vary by platform.
  • Some fields such as hardware MAC, DNS, or gateway may be unavailable on certain systems; nic degrades gracefully.
  • macOS can show different current and hardware MAC addresses when Private Wi-Fi Address is enabled.

Local Development

python3 -m unittest discover -s tests -v
python3 -m nic --help

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

nic_cli-0.1.2.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

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

nic_cli-0.1.2-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file nic_cli-0.1.2.tar.gz.

File metadata

  • Download URL: nic_cli-0.1.2.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nic_cli-0.1.2.tar.gz
Algorithm Hash digest
SHA256 012f6aff509541d793020aea58d1e900d202597225648db65b89fb261f671577
MD5 e3d84ee44ed6f68162ec92df2b94248c
BLAKE2b-256 196943523ee6417cc1dfa021ec40cb887d1c96aef2d2e4b03fae7ba5886b46b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for nic_cli-0.1.2.tar.gz:

Publisher: publish-pypi.yml on Kidder1/nic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nic_cli-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: nic_cli-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nic_cli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 97af1d7f988046cfe05f57b23d831e10d0148c974d4cab23cfee45fc4e022cff
MD5 5868d40d4f730ac5bfe0ec24706c4623
BLAKE2b-256 7ec11870046f81d506381ddf754f41cec2a089ed93bf9dca2daaad3735043fb5

See more details on using hashes here.

Provenance

The following attestation bundles were made for nic_cli-0.1.2-py3-none-any.whl:

Publisher: publish-pypi.yml on Kidder1/nic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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