ui-cli 1.2.1__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.
Files changed (48) hide show
  1. ui_cli-1.2.1/.gitignore +97 -0
  2. ui_cli-1.2.1/CHANGELOG.md +170 -0
  3. ui_cli-1.2.1/LICENSE +21 -0
  4. ui_cli-1.2.1/PKG-INFO +1315 -0
  5. ui_cli-1.2.1/README.md +1277 -0
  6. ui_cli-1.2.1/VERSION +1 -0
  7. ui_cli-1.2.1/pyproject.toml +97 -0
  8. ui_cli-1.2.1/src/ui_cli/__init__.py +31 -0
  9. ui_cli-1.2.1/src/ui_cli/client.py +269 -0
  10. ui_cli-1.2.1/src/ui_cli/commands/__init__.py +1 -0
  11. ui_cli-1.2.1/src/ui_cli/commands/devices.py +187 -0
  12. ui_cli-1.2.1/src/ui_cli/commands/groups.py +503 -0
  13. ui_cli-1.2.1/src/ui_cli/commands/hosts.py +114 -0
  14. ui_cli-1.2.1/src/ui_cli/commands/isp.py +100 -0
  15. ui_cli-1.2.1/src/ui_cli/commands/local/__init__.py +63 -0
  16. ui_cli-1.2.1/src/ui_cli/commands/local/apgroups.py +445 -0
  17. ui_cli-1.2.1/src/ui_cli/commands/local/clients.py +1537 -0
  18. ui_cli-1.2.1/src/ui_cli/commands/local/config.py +758 -0
  19. ui_cli-1.2.1/src/ui_cli/commands/local/devices.py +570 -0
  20. ui_cli-1.2.1/src/ui_cli/commands/local/dpi.py +369 -0
  21. ui_cli-1.2.1/src/ui_cli/commands/local/events.py +289 -0
  22. ui_cli-1.2.1/src/ui_cli/commands/local/firewall.py +285 -0
  23. ui_cli-1.2.1/src/ui_cli/commands/local/health.py +195 -0
  24. ui_cli-1.2.1/src/ui_cli/commands/local/networks.py +426 -0
  25. ui_cli-1.2.1/src/ui_cli/commands/local/portfwd.py +153 -0
  26. ui_cli-1.2.1/src/ui_cli/commands/local/stats.py +234 -0
  27. ui_cli-1.2.1/src/ui_cli/commands/local/utils.py +85 -0
  28. ui_cli-1.2.1/src/ui_cli/commands/local/vouchers.py +410 -0
  29. ui_cli-1.2.1/src/ui_cli/commands/local/wan.py +302 -0
  30. ui_cli-1.2.1/src/ui_cli/commands/local/wlans.py +257 -0
  31. ui_cli-1.2.1/src/ui_cli/commands/mcp.py +416 -0
  32. ui_cli-1.2.1/src/ui_cli/commands/sdwan.py +168 -0
  33. ui_cli-1.2.1/src/ui_cli/commands/sites.py +65 -0
  34. ui_cli-1.2.1/src/ui_cli/commands/speedtest.py +192 -0
  35. ui_cli-1.2.1/src/ui_cli/commands/status.py +410 -0
  36. ui_cli-1.2.1/src/ui_cli/commands/version.py +13 -0
  37. ui_cli-1.2.1/src/ui_cli/config.py +106 -0
  38. ui_cli-1.2.1/src/ui_cli/groups.py +567 -0
  39. ui_cli-1.2.1/src/ui_cli/local_client.py +897 -0
  40. ui_cli-1.2.1/src/ui_cli/main.py +61 -0
  41. ui_cli-1.2.1/src/ui_cli/models.py +188 -0
  42. ui_cli-1.2.1/src/ui_cli/output.py +251 -0
  43. ui_cli-1.2.1/src/ui_mcp/ARCHITECTURE.md +243 -0
  44. ui_cli-1.2.1/src/ui_mcp/README.md +235 -0
  45. ui_cli-1.2.1/src/ui_mcp/__init__.py +7 -0
  46. ui_cli-1.2.1/src/ui_mcp/__main__.py +10 -0
  47. ui_cli-1.2.1/src/ui_mcp/cli_runner.py +112 -0
  48. ui_cli-1.2.1/src/ui_mcp/server.py +468 -0
@@ -0,0 +1,97 @@
1
+ # Claude Code
2
+ .claude/
3
+ .claude*
4
+
5
+ # Environment variables (contains secrets)
6
+ .env
7
+ .env.local
8
+ .env.*.local
9
+
10
+ # Python
11
+ __pycache__/
12
+ *.py[cod]
13
+ *$py.class
14
+ *.so
15
+ .Python
16
+ build/
17
+ develop-eggs/
18
+ dist/
19
+ downloads/
20
+ eggs/
21
+ .eggs/
22
+ lib/
23
+ lib64/
24
+ parts/
25
+ sdist/
26
+ var/
27
+ wheels/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+
32
+ # Virtual environments
33
+ venv/
34
+ ENV/
35
+ env/
36
+ .venv/
37
+
38
+ # Conda
39
+ .conda/
40
+
41
+ # IDE
42
+ .idea/
43
+ .vscode/
44
+ *.swp
45
+ *.swo
46
+ *~
47
+ .project
48
+ .pydevproject
49
+ .settings/
50
+
51
+ # Testing
52
+ .tox/
53
+ .nox/
54
+ .coverage
55
+ .coverage.*
56
+ htmlcov/
57
+ .pytest_cache/
58
+ .hypothesis/
59
+
60
+ # mypy
61
+ .mypy_cache/
62
+ .dmypy.json
63
+ dmypy.json
64
+
65
+ # ruff
66
+ .ruff_cache/
67
+
68
+ # OS
69
+ .DS_Store
70
+ .DS_Store?
71
+ ._*
72
+ .Spotlight-V100
73
+ .Trashes
74
+ ehthumbs.db
75
+ Thumbs.db
76
+
77
+ # Logs
78
+ *.log
79
+ logs/
80
+
81
+ # Temporary files
82
+ tmp/
83
+ temp/
84
+ *.tmp
85
+ *.temp
86
+
87
+ # MkDocs
88
+ site/
89
+ uv.lock
90
+
91
+ # Dolt database files (added by bd init)
92
+ .dolt/
93
+ *.db
94
+ .beads/backup/
95
+
96
+ # Local caches from other CLI tooling
97
+ aiohomematic_storage/
@@ -0,0 +1,170 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [1.2.1] - 2026-04-16
11
+
12
+ ### Changed
13
+
14
+ - Consolidated package versioning onto the root `VERSION` file for builds and local runs
15
+ - Aligned the external release flow with `fmcli` and `nanobanana` via a single tag-driven PyPI publish workflow
16
+ - Added `git-cliff` configuration for changelog generation without changing the SemVer workflow
17
+
18
+ ## [1.2.0] - 2026-04-15
19
+
20
+ ### Added
21
+
22
+ #### UniFi API Key Authentication (Local Controller)
23
+ - **X-API-KEY header authentication** for UDM/UniFi OS controllers — no session cookies needed
24
+ - `controller_api_key` field in settings — configure via `UI_CLI_CONTROLLER_API_KEY` env var
25
+ - **Automatic UDM prefix detection** — `/proxy/network` prefix applied automatically when API key is used
26
+ - **Legacy controller fallback** — if a 404/405 is received and credentials are available, retries with cookie-based login automatically
27
+ - `is_local_configured()` and `check_local_controller()` updated to accept API key as valid auth method
28
+ - Status command supports API key authentication
29
+
30
+ ### Fixed
31
+
32
+ - Hard 401 error on invalid/rejected API key — no silent fallback when key is wrong
33
+ - Removed v2 endpoint 404-to-503 remapping regression
34
+
35
+ ## [0.3.0] - 2024-12-03
36
+
37
+ ### Added
38
+
39
+ #### Claude Desktop Integration (MCP Server)
40
+ - **16 AI-optimized tools** for natural language network management
41
+ - `./ui mcp install` - One-command Claude Desktop setup
42
+ - `./ui mcp check` - Verify installation
43
+ - `./ui mcp show` - View current configuration
44
+ - `./ui mcp remove` - Remove from Claude Desktop
45
+
46
+ **Available Tools:**
47
+ | Category | Tools |
48
+ |----------|-------|
49
+ | Status & Health | `network_status`, `network_health`, `internet_speed`, `run_speedtest`, `isp_performance` |
50
+ | Counts & Lists | `client_count`, `device_list`, `network_list` |
51
+ | Lookups | `find_client`, `find_device`, `client_status` |
52
+ | Actions | `block_client`, `unblock_client`, `kick_client`, `restart_device`, `create_voucher` |
53
+
54
+ #### Quick Timeout & Spinners
55
+ - `--quick` / `-q` option for 5-second timeout on connectivity checks
56
+ - `--timeout` / `-t` option for custom timeout values
57
+ - Spinners on all local commands for better UX
58
+ - Default timeout reduced from 30s to 15s
59
+
60
+ #### CI/CD Support
61
+ - `UNIFI_NO_SPINNER` env var to disable spinners
62
+ - Auto-disable spinners when `CI=true` or `NO_COLOR` is set
63
+
64
+ ### Architecture
65
+ - Subprocess-based tools layer for MCP (CLI remains single source of truth)
66
+ - JSON output for all action commands
67
+
68
+ ---
69
+
70
+ ## [0.2.0] - 2024-12-01
71
+
72
+ ### Added
73
+
74
+ #### Local Controller API (Milestone 2)
75
+ - **Health & Monitoring**
76
+ - `./ui lo health` - Site health summary (WAN, LAN, WLAN, VPN status)
77
+ - `./ui lo events list` - View recent events with filtering
78
+
79
+ - **Client Management**
80
+ - `./ui lo clients list` - List connected clients with filters (wired/wireless/network)
81
+ - `./ui lo clients all` - List all clients including offline
82
+ - `./ui lo clients get` - Get client details by name or MAC
83
+ - `./ui lo clients status` - Comprehensive client status (signal, experience, data usage)
84
+ - `./ui lo clients block/unblock` - Block or unblock clients
85
+ - `./ui lo clients kick` - Disconnect (reconnect) clients
86
+ - `./ui lo clients count` - Count clients by type/network/vendor/AP
87
+ - `./ui lo clients duplicates` - Find duplicate client names
88
+
89
+ - **Device Management**
90
+ - `./ui lo devices list` - List network devices
91
+ - `./ui lo devices get` - Get device details by ID/MAC/name
92
+ - `./ui lo devices restart` - Restart a device
93
+ - `./ui lo devices upgrade` - Upgrade device firmware
94
+ - `./ui lo devices locate` - Toggle locate LED
95
+ - `./ui lo devices adopt` - Adopt a new device
96
+
97
+ - **Network Configuration**
98
+ - `./ui lo networks list` - List all networks/VLANs
99
+ - `./ui lo config show` - Export running configuration (table/JSON/YAML)
100
+
101
+ - **Security & Firewall**
102
+ - `./ui lo firewall list` - List firewall rules with ruleset filter
103
+ - `./ui lo firewall groups` - List firewall groups (address/port)
104
+ - `./ui lo portfwd list` - List port forwarding rules
105
+
106
+ - **Guest Management**
107
+ - `./ui lo vouchers list` - List guest vouchers
108
+ - `./ui lo vouchers create` - Create vouchers with duration/quota/limits
109
+ - `./ui lo vouchers delete` - Delete vouchers
110
+
111
+ - **DPI & Statistics**
112
+ - `./ui lo dpi stats` - Site-level DPI statistics
113
+ - `./ui lo dpi client` - Per-client DPI breakdown
114
+ - `./ui lo stats daily` - Daily traffic statistics
115
+ - `./ui lo stats hourly` - Hourly traffic statistics
116
+
117
+ - **Other**
118
+ - `./ui speedtest` - Run speedtest via controller
119
+ - `./ui status` - Enhanced status with local controller info
120
+
121
+ ### Added (Testing)
122
+ - Comprehensive pytest test suite (87 tests)
123
+ - 71 unit tests
124
+ - 16 integration tests
125
+ - Test fixtures for mock API responses
126
+ - pytest-asyncio for async test support
127
+
128
+ ### Changed
129
+ - Updated documentation (README, USERGUIDE, ROADMAP)
130
+ - Added CONTRIBUTING.md and LICENSE
131
+
132
+ ---
133
+
134
+ ## [0.1.0] - 2024-11-29
135
+
136
+ ### Added
137
+
138
+ #### Site Manager API (Milestone 1)
139
+ - **Authentication**
140
+ - API key authentication via `UNIFI_API_KEY`
141
+ - Connection status check (`./ui status`)
142
+
143
+ - **Hosts**
144
+ - `./ui hosts list` - List all controllers
145
+ - `./ui hosts get` - Get controller details
146
+
147
+ - **Sites**
148
+ - `./ui sites list` - List all sites
149
+
150
+ - **Devices**
151
+ - `./ui devices list` - List all devices with host filter
152
+ - `./ui devices count` - Count devices by model/status/host/product-line
153
+
154
+ - **ISP Metrics**
155
+ - `./ui isp metrics` - ISP performance metrics with interval options
156
+
157
+ - **SD-WAN**
158
+ - `./ui sdwan list` - List SD-WAN configurations
159
+ - `./ui sdwan get` - Get configuration details
160
+ - `./ui sdwan status` - Get deployment status
161
+
162
+ - **Output Formats**
163
+ - Table (default), JSON, CSV output for all commands
164
+ - Verbose mode for additional details
165
+
166
+ ### Infrastructure
167
+ - Typer CLI framework
168
+ - Rich terminal formatting
169
+ - httpx async HTTP client
170
+ - pydantic-settings configuration
ui_cli-1.2.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Vedanta Barooah
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.