Skip to main content

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

Project description

中文 | English

nic

Minimal network interface CLI for macOS, Linux, and Windows.

nic is built for the common case: you want to see the interfaces that are actually working right now, not pages of raw ifconfig or ipconfig output.

Why nic

  • Active-first default view nic hides inactive and helper noise in the default summary.
  • Grouped by role Interfaces are grouped into Physical / Host, VM / Virtual, and Tunnel / VPN.
  • Key fields only Default output shows IFACE, TYPE, IPv4, MAC, and Subnet.
  • Detail on demand Use nic detail or nic show <iface> when you need the verbose view.
  • Cross-platform The same CLI works on macOS, Linux, and Windows.
  • Native collection nic uses built-in OS tools instead of third-party runtime dependencies.

Install

Recommended:

pip install nic-cli

If pip is not on your PATH, use python -m pip install nic-cli or python3 -m pip install nic-cli.

Current release:

Usage

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

Default view

Network summary
  Primary       : Ethernet (Ethernet)
  Default route : Ethernet -> 192.168.5.1
  Active        : 1 physical, 2 vm/virtual

Physical / Host
  IFACE     TYPE      IPv4            MAC                Subnet
  Ethernet  Ethernet  192.168.5.12/24 e0:be:03:97:aa:b4 192.168.5.0/24

VM / Virtual
  IFACE   TYPE        IPv4              MAC                Subnet
  VMnet1  VM network  192.168.159.1/24  00:50:56:c0:00:01  192.168.159.0/24
  VMnet8  VM network  192.168.206.1/24  00:50:56:c0:00:08  192.168.206.0/24

The compact summary only shows active, meaningful interfaces. For the expanded multi-interface view, use nic detail.

Commands

  • nic Compact summary of active interfaces only.
  • nic detail Grouped verbose view with per-interface details.
  • nic physical All physical adapters on the current machine.
  • nic all Full inventory, including system and helper interfaces.
  • nic show <iface> Detailed view for one interface.
  • nic --json Machine-readable payload.
  • nic raw Native raw network command for the current platform.

Platform Notes

  • 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 fallback when JSON output is unavailable.
  • Windows Uses ipconfig /all, route print -4, and getmac /v /fo csv when available.

Development

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

Version history is in CHANGELOG.md.

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.4.tar.gz (21.8 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.4-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nic_cli-0.1.4.tar.gz
  • Upload date:
  • Size: 21.8 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.4.tar.gz
Algorithm Hash digest
SHA256 0c2db94120297d04c3e72f87525ebbcbc23ddf65a7af3417ec2a6969352aa98a
MD5 8695cec844e3197bc0fb392e78325e67
BLAKE2b-256 4eb1f88c7e7d66a85b88f82c8d85a7f3d0b582f417fbe6ceaca189fd01eb3fb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for nic_cli-0.1.4.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.4-py3-none-any.whl.

File metadata

  • Download URL: nic_cli-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 14.7 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e324bcf9d26bb58c36efaa1a0173d982f0d619536cf7a13c43be96483e5ef7ae
MD5 fc7993f59f8769534efe762ce1d9b87a
BLAKE2b-256 d064ddc5f05fb9a95ef69289e86181253ea9193a05def17add4e3dd30e30ac23

See more details on using hashes here.

Provenance

The following attestation bundles were made for nic_cli-0.1.4-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