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.3.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.3-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nic_cli-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 f9a9add253d3f0d128514314f7cb851963ef06f54a7e5416f62c4160d68407e9
MD5 e4c6fb20ce47cb24d5f75d24b63b4293
BLAKE2b-256 46a287741b87eb51cdeffd0ba6d1b8f663e5237ca6de08e40e9d61052fde227f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: nic_cli-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 14.6 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 12691c3b49d9297d1eda7812b1638662273a095740d21601c22baecb6e50bd76
MD5 96a0211843ace454171a5ff80625974d
BLAKE2b-256 0737d08c904782e93943d06b9110459d27ae1b7b7325a54a1fcb877f70112942

See more details on using hashes here.

Provenance

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