router-cli 0.1.0__py3-none-any.whl → 0.3.0__py3-none-any.whl

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.
@@ -1,11 +1,26 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: router-cli
3
- Version: 0.1.0
3
+ Version: 0.3.0
4
4
  Summary: CLI tool to manage D-Link DSL-2750U router
5
+ Keywords: router,cli,dlink,dsl-2750u,network,admin
5
6
  Author: d3vr
6
7
  Author-email: d3vr <hi@f3.al>
8
+ License: MIT
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Environment :: Console
11
+ Classifier: Intended Audience :: System Administrators
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: System :: Networking
7
19
  Requires-Dist: tomli>=2.0.0 ; python_full_version < '3.11'
8
20
  Requires-Python: >=3.10
21
+ Project-URL: Homepage, https://github.com/d3vr/router-cli
22
+ Project-URL: Repository, https://github.com/d3vr/router-cli
23
+ Project-URL: Issues, https://github.com/d3vr/router-cli/issues
9
24
  Description-Content-Type: text/markdown
10
25
 
11
26
  # router-cli
@@ -25,7 +40,7 @@ Since the router doesn't provide a formal API, this tool works by authenticating
25
40
 
26
41
  ## Installation
27
42
 
28
- Requires Python 3.11 or higher.
43
+ Requires Python 3.10 or higher.
29
44
 
30
45
  ### Using uv (recommended)
31
46
 
@@ -58,10 +73,12 @@ username = "admin"
58
73
  password = "your_password_here"
59
74
 
60
75
  # Optional: Define known devices for colorized output
76
+ # Use MAC addresses for devices with stable MACs
77
+ # Use hostnames for devices with random MACs (like Android)
61
78
  [known_devices]
62
79
  "AA:BB:CC:DD:EE:FF" = "My Phone"
63
80
  "11:22:33:44:55:66" = "Smart TV"
64
- "DE:AD:BE:EF:00:01" = "Work Laptop"
81
+ "android-abc123" = "John's Pixel"
65
82
  ```
66
83
 
67
84
  The tool searches for configuration in the following locations (in order):
@@ -71,6 +88,24 @@ The tool searches for configuration in the following locations (in order):
71
88
 
72
89
  ## Usage
73
90
 
91
+ ### Global Options
92
+
93
+ All commands support these global options:
94
+
95
+ ```bash
96
+ router --ip 192.168.1.1 --user admin --pass secret status
97
+ router --json clients
98
+ ```
99
+
100
+ | Option | Environment Variable | Description |
101
+ |--------|---------------------|-------------|
102
+ | `--ip ADDRESS` | `ROUTER_IP` | Router IP address |
103
+ | `--user USERNAME` | `ROUTER_USER` | Username for authentication |
104
+ | `--pass PASSWORD` | `ROUTER_PASS` | Password for authentication |
105
+ | `--json` | - | Output in JSON format (for scripting) |
106
+
107
+ **Configuration priority**: CLI flags > environment variables > config file > defaults
108
+
74
109
  ### Quick Overview
75
110
 
76
111
  ```bash
@@ -189,7 +224,7 @@ Sends a reboot command to the router.
189
224
 
190
225
  ## Known Devices
191
226
 
192
- The `[known_devices]` section in your config file maps MAC addresses to friendly names. This enables:
227
+ The `[known_devices]` section in your config file maps MAC addresses or hostnames to friendly names. This enables:
193
228
 
194
229
  - **Color-coded output**: Known devices appear in green, unknown in red
195
230
  - **Friendly names**: See "My Phone" instead of a hostname or MAC address
@@ -197,11 +232,18 @@ The `[known_devices]` section in your config file maps MAC addresses to friendly
197
232
 
198
233
  ```toml
199
234
  [known_devices]
235
+ # By MAC address (for devices with stable MACs)
200
236
  "AA:BB:CC:DD:EE:FF" = "My Phone"
201
237
  "11:22:33:44:55:66" = "Smart TV"
238
+
239
+ # By hostname (for devices with random MACs, like some Android phones)
240
+ "android-abc123def" = "John's Pixel"
241
+ "Galaxy-S24" = "Sarah's Phone"
202
242
  ```
203
243
 
204
- MAC addresses are matched case-insensitively.
244
+ **MAC addresses** are identified by their format (`XX:XX:XX:XX:XX:XX`) and matched case-insensitively.
245
+
246
+ **Hostnames** are useful for Android and iOS devices that use MAC address randomization for privacy. These devices typically maintain a consistent hostname even when their MAC changes. Hostnames are also matched case-insensitively.
205
247
 
206
248
  ## Development
207
249
 
@@ -218,7 +260,7 @@ uv run pytest
218
260
 
219
261
  ## Compatibility
220
262
 
221
- - **Python**: 3.11+
263
+ - **Python**: 3.10+
222
264
  - **Router**: D-Link DSL-2750U (firmware ME_1.00)
223
265
 
224
266
  This tool may work with other D-Link routers that share a similar web interface, but has only been tested with the DSL-2750U.
@@ -0,0 +1,14 @@
1
+ router_cli/__init__.py,sha256=rXtUqxUti4S10Iz4Xttp_qsECHXqv5A7gNYHrh-RsEk,74
2
+ router_cli/client.py,sha256=0T0ZQoC4KkFrhzDDVlCa26P8EV-IK9ooFPsO0LKq9Nk,11811
3
+ router_cli/commands.py,sha256=tg0DVp__j7R5gLG1hydz1FrXTZ0Z9Z00ubSnuVdE-Ew,7009
4
+ router_cli/config.py,sha256=c9RWWKtnKWELtMB_g3I8oFwk0nEqPYs5Tqq5uHaB34s,6240
5
+ router_cli/display.py,sha256=Xt0cr55vVIHrV5gB2WG2LM8I4Qgyuw7i72J1gfXYc7k,5343
6
+ router_cli/formatters.py,sha256=goY_SVXOdaV3c4gvHrq1pvW--RSI6U8Dxtu0P4377H8,12566
7
+ router_cli/main.py,sha256=Qfj0GJPScP1jrJkI9xiP7JhwPyoxmjQtJe0tzblOiy0,3547
8
+ router_cli/models.py,sha256=TDtZqOY_h7jZggZp6xqQREifngWzsJM4WTNBGXRyVLw,3279
9
+ router_cli/parser.py,sha256=khRFClFYQ8tsUmDKIXti3QtTEm9wjWmdBmIInkxYf3U,15575
10
+ router_cli/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
+ router_cli-0.3.0.dist-info/WHEEL,sha256=fAguSjoiATBe7TNBkJwOjyL1Tt4wwiaQGtNtjRPNMQA,80
12
+ router_cli-0.3.0.dist-info/entry_points.txt,sha256=PfkydZeDJvlgvEXYOG1gYvbTM39Cm-OgsPpREH3UNAU,49
13
+ router_cli-0.3.0.dist-info/METADATA,sha256=TvHRQ_2LkPlwwYIrKJzhh_170RwkS47XxYrE1GKgLug,7413
14
+ router_cli-0.3.0.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- router_cli/__init__.py,sha256=R-j6ZUnvZT4qKwxPGaYBQEOCLsPATLn1qHLHSmdfo2c,74
2
- router_cli/client.py,sha256=DuOqZvsCkcgut2k0LqKcdYD_rN4E1TRtwfqm9bnJTEU,29631
3
- router_cli/config.py,sha256=SX1s1CJk_XiiCHlZ47I9vgda9IRqqUwBTQKjC3BYoVE,1803
4
- router_cli/main.py,sha256=UzIYNKIM9f4NQ2UW-wenI8yQRVKMVMiPyaXPjyTggaU,22469
5
- router_cli/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- router_cli-0.1.0.dist-info/WHEEL,sha256=fAguSjoiATBe7TNBkJwOjyL1Tt4wwiaQGtNtjRPNMQA,80
7
- router_cli-0.1.0.dist-info/entry_points.txt,sha256=PfkydZeDJvlgvEXYOG1gYvbTM39Cm-OgsPpREH3UNAU,49
8
- router_cli-0.1.0.dist-info/METADATA,sha256=HqMMKyryg1MFSZneA_OMyN3rR7mJ_7VBp7OCcjuKHJA,5509
9
- router_cli-0.1.0.dist-info/RECORD,,