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
nichides inactive and helper noise in the default summary. - Grouped by role
Interfaces are grouped into
Physical / Host,VM / Virtual, andTunnel / VPN. - Key fields only
Default output shows
IFACE,TYPE,IPv4,MAC, andSubnet. - Detail on demand
Use
nic detailornic show <iface>when you need the verbose view. - Cross-platform The same CLI works on macOS, Linux, and Windows.
- Native collection
nicuses 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:
- PyPI: https://pypi.org/project/nic-cli/
- GitHub Release: https://github.com/Kidder1/nic/releases/tag/v0.1.4
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
nicCompact summary of active interfaces only.nic detailGrouped verbose view with per-interface details.nic physicalAll physical adapters on the current machine.nic allFull inventory, including system and helper interfaces.nic show <iface>Detailed view for one interface.nic --jsonMachine-readable payload.nic rawNative raw network command for the current platform.
Platform Notes
- macOS
Uses
ifconfig -a,netstat -rn -f inet, and cachedsystem_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, andgetmac /v /fo csvwhen available.
Development
python3 -m unittest discover -s tests -v
python3 -m nic --help
Version history is in CHANGELOG.md.
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c2db94120297d04c3e72f87525ebbcbc23ddf65a7af3417ec2a6969352aa98a
|
|
| MD5 |
8695cec844e3197bc0fb392e78325e67
|
|
| BLAKE2b-256 |
4eb1f88c7e7d66a85b88f82c8d85a7f3d0b582f417fbe6ceaca189fd01eb3fb8
|
Provenance
The following attestation bundles were made for nic_cli-0.1.4.tar.gz:
Publisher:
publish-pypi.yml on Kidder1/nic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nic_cli-0.1.4.tar.gz -
Subject digest:
0c2db94120297d04c3e72f87525ebbcbc23ddf65a7af3417ec2a6969352aa98a - Sigstore transparency entry: 1361444575
- Sigstore integration time:
-
Permalink:
Kidder1/nic@d937c8f1d40e712f9a4389d6f14cf7354a564894 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Kidder1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@d937c8f1d40e712f9a4389d6f14cf7354a564894 -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e324bcf9d26bb58c36efaa1a0173d982f0d619536cf7a13c43be96483e5ef7ae
|
|
| MD5 |
fc7993f59f8769534efe762ce1d9b87a
|
|
| BLAKE2b-256 |
d064ddc5f05fb9a95ef69289e86181253ea9193a05def17add4e3dd30e30ac23
|
Provenance
The following attestation bundles were made for nic_cli-0.1.4-py3-none-any.whl:
Publisher:
publish-pypi.yml on Kidder1/nic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nic_cli-0.1.4-py3-none-any.whl -
Subject digest:
e324bcf9d26bb58c36efaa1a0173d982f0d619536cf7a13c43be96483e5ef7ae - Sigstore transparency entry: 1361444578
- Sigstore integration time:
-
Permalink:
Kidder1/nic@d937c8f1d40e712f9a4389d6f14cf7354a564894 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Kidder1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@d937c8f1d40e712f9a4389d6f14cf7354a564894 -
Trigger Event:
workflow_dispatch
-
Statement type: