ifpretty 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ifpretty-0.1.0/LICENSE +21 -0
- ifpretty-0.1.0/PKG-INFO +98 -0
- ifpretty-0.1.0/README.md +76 -0
- ifpretty-0.1.0/pyproject.toml +34 -0
- ifpretty-0.1.0/setup.cfg +4 -0
- ifpretty-0.1.0/src/ifpretty/__init__.py +6 -0
- ifpretty-0.1.0/src/ifpretty/__main__.py +8 -0
- ifpretty-0.1.0/src/ifpretty/cli.py +1215 -0
- ifpretty-0.1.0/src/ifpretty/data/oui.tsv.gz +0 -0
- ifpretty-0.1.0/src/ifpretty.egg-info/PKG-INFO +98 -0
- ifpretty-0.1.0/src/ifpretty.egg-info/SOURCES.txt +14 -0
- ifpretty-0.1.0/src/ifpretty.egg-info/dependency_links.txt +1 -0
- ifpretty-0.1.0/src/ifpretty.egg-info/entry_points.txt +2 -0
- ifpretty-0.1.0/src/ifpretty.egg-info/requires.txt +1 -0
- ifpretty-0.1.0/src/ifpretty.egg-info/top_level.txt +1 -0
- ifpretty-0.1.0/tests/test_ifpretty.py +97 -0
ifpretty-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 iklo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
ifpretty-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ifpretty
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Prettify and enrich ifconfig output: aligned tables, IP/MAC/scope annotations, OUI vendor lookup, live DNS/DHCP/route, and a 1h bandwidth graph.
|
|
5
|
+
Author-email: iklo <tiktachack@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Keywords: ifconfig,network,networking,cli,terminal,rich,macos
|
|
8
|
+
Classifier: Environment :: Console
|
|
9
|
+
Classifier: Intended Audience :: System Administrators
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
12
|
+
Classifier: Operating System :: POSIX
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Topic :: System :: Networking
|
|
16
|
+
Classifier: Topic :: System :: Monitoring
|
|
17
|
+
Requires-Python: >=3.9
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: rich>=13
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
|
|
23
|
+
# ifpretty
|
|
24
|
+
|
|
25
|
+
Prettify and **enrich** `ifconfig` output — aligned tables, color, decoded flags,
|
|
26
|
+
IP/MAC/scope annotations, OUI vendor lookup, live DNS/DHCP/route, and a 1‑hour
|
|
27
|
+
bandwidth graph. Built on [rich](https://github.com/Textualize/rich); macOS‑focused.
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
ifconfig | ifpretty
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Install
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
pip install ifpretty
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Usage
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
ifconfig | ifpretty # boxed table per interface (default), borders aligned
|
|
43
|
+
ifconfig | ifpretty --records # compact label/value record layout
|
|
44
|
+
ifconfig | ifpretty --table # single wide table, all fields as columns (<=240)
|
|
45
|
+
ifconfig | ifpretty --live # + route, traffic, friendly names, DNS, DHCP (macOS)
|
|
46
|
+
ifconfig | ifpretty --check # + ping the default gateway for latency (macOS)
|
|
47
|
+
ifconfig | ifpretty --explain # append a legend explaining the flags/options seen
|
|
48
|
+
ifconfig en0 | ifpretty
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
It reads raw `ifconfig` on **stdin**, so you stay in control of which interfaces
|
|
52
|
+
to show.
|
|
53
|
+
|
|
54
|
+
## What it adds
|
|
55
|
+
|
|
56
|
+
**Always on (offline, deterministic):**
|
|
57
|
+
|
|
58
|
+
- Per‑interface **role** (loopback / Ethernet·Wi‑Fi / VPN·tunnel / bridge / …).
|
|
59
|
+
- **IP scope** for every address — loopback / link‑local / ULA / private / global —
|
|
60
|
+
plus IPv4 network + usable‑host count.
|
|
61
|
+
- **MAC** kind (universal vs locally‑administered), **OUI vendor** (bundled IEEE
|
|
62
|
+
registry, no network), shared‑MAC notes (e.g. bridge members), and EUI‑64 detection.
|
|
63
|
+
- **Media** speed/duplex with a half‑duplex ⚠ warning; jumbo / sub‑1280 MTU notes.
|
|
64
|
+
- Decoded flag/option/nd6 bitfields; aligned IPv6 attribute columns.
|
|
65
|
+
|
|
66
|
+
**`--live` (macOS, cross‑references the system):**
|
|
67
|
+
|
|
68
|
+
- Default route + gateway, friendly hardware‑port names, per‑interface DNS and
|
|
69
|
+
search domains, DHCP server + lease, traffic counters (bytes + packets) and
|
|
70
|
+
error/collision counts.
|
|
71
|
+
|
|
72
|
+
**`--check`:** pings the default gateway and reports latency.
|
|
73
|
+
|
|
74
|
+
**1‑hour bandwidth graph:** schedule the recorder, then a Unicode sparkline of
|
|
75
|
+
the last hour appears automatically:
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
# once, e.g. in crontab -e
|
|
79
|
+
* * * * * /usr/local/bin/ifpretty --record
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
1h in ▁▁▁▂▄█▅▂▁▁▁▁ peak 10.0 Mbps
|
|
84
|
+
1h out ▁▂▂▄▆█▄▂▂▁▁▁ peak 533.3 Kbps
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
History is stored at `~/.cache/ifpretty/samples.csv` (override with
|
|
88
|
+
`IFPRETTY_HISTORY`).
|
|
89
|
+
|
|
90
|
+
## Notes
|
|
91
|
+
|
|
92
|
+
- Colors auto‑disable when piped; force with `CLICOLOR_FORCE=1`, disable with `NO_COLOR=1`.
|
|
93
|
+
- `--live` / `--check` / `--record` use macOS tools (`route`, `netstat`,
|
|
94
|
+
`networksetup`, `scutil`, `ipconfig`, `ping`) and no‑op elsewhere.
|
|
95
|
+
|
|
96
|
+
## License
|
|
97
|
+
|
|
98
|
+
MIT
|
ifpretty-0.1.0/README.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# ifpretty
|
|
2
|
+
|
|
3
|
+
Prettify and **enrich** `ifconfig` output — aligned tables, color, decoded flags,
|
|
4
|
+
IP/MAC/scope annotations, OUI vendor lookup, live DNS/DHCP/route, and a 1‑hour
|
|
5
|
+
bandwidth graph. Built on [rich](https://github.com/Textualize/rich); macOS‑focused.
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
ifconfig | ifpretty
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
pip install ifpretty
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
ifconfig | ifpretty # boxed table per interface (default), borders aligned
|
|
21
|
+
ifconfig | ifpretty --records # compact label/value record layout
|
|
22
|
+
ifconfig | ifpretty --table # single wide table, all fields as columns (<=240)
|
|
23
|
+
ifconfig | ifpretty --live # + route, traffic, friendly names, DNS, DHCP (macOS)
|
|
24
|
+
ifconfig | ifpretty --check # + ping the default gateway for latency (macOS)
|
|
25
|
+
ifconfig | ifpretty --explain # append a legend explaining the flags/options seen
|
|
26
|
+
ifconfig en0 | ifpretty
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
It reads raw `ifconfig` on **stdin**, so you stay in control of which interfaces
|
|
30
|
+
to show.
|
|
31
|
+
|
|
32
|
+
## What it adds
|
|
33
|
+
|
|
34
|
+
**Always on (offline, deterministic):**
|
|
35
|
+
|
|
36
|
+
- Per‑interface **role** (loopback / Ethernet·Wi‑Fi / VPN·tunnel / bridge / …).
|
|
37
|
+
- **IP scope** for every address — loopback / link‑local / ULA / private / global —
|
|
38
|
+
plus IPv4 network + usable‑host count.
|
|
39
|
+
- **MAC** kind (universal vs locally‑administered), **OUI vendor** (bundled IEEE
|
|
40
|
+
registry, no network), shared‑MAC notes (e.g. bridge members), and EUI‑64 detection.
|
|
41
|
+
- **Media** speed/duplex with a half‑duplex ⚠ warning; jumbo / sub‑1280 MTU notes.
|
|
42
|
+
- Decoded flag/option/nd6 bitfields; aligned IPv6 attribute columns.
|
|
43
|
+
|
|
44
|
+
**`--live` (macOS, cross‑references the system):**
|
|
45
|
+
|
|
46
|
+
- Default route + gateway, friendly hardware‑port names, per‑interface DNS and
|
|
47
|
+
search domains, DHCP server + lease, traffic counters (bytes + packets) and
|
|
48
|
+
error/collision counts.
|
|
49
|
+
|
|
50
|
+
**`--check`:** pings the default gateway and reports latency.
|
|
51
|
+
|
|
52
|
+
**1‑hour bandwidth graph:** schedule the recorder, then a Unicode sparkline of
|
|
53
|
+
the last hour appears automatically:
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
# once, e.g. in crontab -e
|
|
57
|
+
* * * * * /usr/local/bin/ifpretty --record
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
1h in ▁▁▁▂▄█▅▂▁▁▁▁ peak 10.0 Mbps
|
|
62
|
+
1h out ▁▂▂▄▆█▄▂▂▁▁▁ peak 533.3 Kbps
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
History is stored at `~/.cache/ifpretty/samples.csv` (override with
|
|
66
|
+
`IFPRETTY_HISTORY`).
|
|
67
|
+
|
|
68
|
+
## Notes
|
|
69
|
+
|
|
70
|
+
- Colors auto‑disable when piped; force with `CLICOLOR_FORCE=1`, disable with `NO_COLOR=1`.
|
|
71
|
+
- `--live` / `--check` / `--record` use macOS tools (`route`, `netstat`,
|
|
72
|
+
`networksetup`, `scutil`, `ipconfig`, `ping`) and no‑op elsewhere.
|
|
73
|
+
|
|
74
|
+
## License
|
|
75
|
+
|
|
76
|
+
MIT
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "ifpretty"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Prettify and enrich ifconfig output: aligned tables, IP/MAC/scope annotations, OUI vendor lookup, live DNS/DHCP/route, and a 1h bandwidth graph."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
authors = [{ name = "iklo", email = "tiktachack@gmail.com" }]
|
|
13
|
+
keywords = ["ifconfig", "network", "networking", "cli", "terminal", "rich", "macos"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Environment :: Console",
|
|
16
|
+
"Intended Audience :: System Administrators",
|
|
17
|
+
"License :: OSI Approved :: MIT License",
|
|
18
|
+
"Operating System :: MacOS :: MacOS X",
|
|
19
|
+
"Operating System :: POSIX",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
22
|
+
"Topic :: System :: Networking",
|
|
23
|
+
"Topic :: System :: Monitoring",
|
|
24
|
+
]
|
|
25
|
+
dependencies = ["rich>=13"]
|
|
26
|
+
|
|
27
|
+
[project.scripts]
|
|
28
|
+
ifpretty = "ifpretty.cli:main"
|
|
29
|
+
|
|
30
|
+
[tool.setuptools.packages.find]
|
|
31
|
+
where = ["src"]
|
|
32
|
+
|
|
33
|
+
[tool.setuptools.package-data]
|
|
34
|
+
ifpretty = ["data/*.gz"]
|
ifpretty-0.1.0/setup.cfg
ADDED