A clean, readable cross-platform network interface CLI for macOS, Linux, and Windows.
Project description
English | 中文
nic
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, andTunnel / VPN detail,physical,all,show <iface>, and--jsonmodes- 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 cachedsystem_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, andgetmac /v /fo csvwhen available.
nic raw runs the native raw command for the current platform:
- macOS:
ifconfig -a - Linux:
ip addr - Windows:
ipconfig /all
Install
Latest release:
- Release page: https://github.com/Kidder1/nic/releases/tag/v0.1.2
- Wheel:
nic_cli-0.1.2-py3-none-any.whl
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
nicCompact grouped summary of active interfaces withIFACE,TYPE,IPv4,MAC, andSubnet.nic detailVerbose active summary with per-interface detail sections.nic physicalAll physical adapters on the current platform.nic allFull inventory of physical, system or virtual, and tunnel interfaces.nic show <iface>Detailed view for one interface.nic --jsonMachine-readable JSON payload.nic rawNative raw network command for the current platform.nic --refreshRefreshes 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;
nicdegrades 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
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.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
012f6aff509541d793020aea58d1e900d202597225648db65b89fb261f671577
|
|
| MD5 |
e3d84ee44ed6f68162ec92df2b94248c
|
|
| BLAKE2b-256 |
196943523ee6417cc1dfa021ec40cb887d1c96aef2d2e4b03fae7ba5886b46b6
|
Provenance
The following attestation bundles were made for nic_cli-0.1.2.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.2.tar.gz -
Subject digest:
012f6aff509541d793020aea58d1e900d202597225648db65b89fb261f671577 - Sigstore transparency entry: 1361389137
- Sigstore integration time:
-
Permalink:
Kidder1/nic@446d051e3c1ee5f7d9c7791f3b5f8004c33eb7c7 -
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@446d051e3c1ee5f7d9c7791f3b5f8004c33eb7c7 -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97af1d7f988046cfe05f57b23d831e10d0148c974d4cab23cfee45fc4e022cff
|
|
| MD5 |
5868d40d4f730ac5bfe0ec24706c4623
|
|
| BLAKE2b-256 |
7ec11870046f81d506381ddf754f41cec2a089ed93bf9dca2daaad3735043fb5
|
Provenance
The following attestation bundles were made for nic_cli-0.1.2-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.2-py3-none-any.whl -
Subject digest:
97af1d7f988046cfe05f57b23d831e10d0148c974d4cab23cfee45fc4e022cff - Sigstore transparency entry: 1361389153
- Sigstore integration time:
-
Permalink:
Kidder1/nic@446d051e3c1ee5f7d9c7791f3b5f8004c33eb7c7 -
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@446d051e3c1ee5f7d9c7791f3b5f8004c33eb7c7 -
Trigger Event:
workflow_dispatch
-
Statement type: