ui-cli 1.2.1__tar.gz → 2.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.
- {ui_cli-1.2.1 → ui_cli-2.1.0}/CHANGELOG.md +15 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/PKG-INFO +21 -123
- {ui_cli-1.2.1 → ui_cli-2.1.0}/README.md +20 -120
- ui_cli-2.1.0/VERSION +1 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/pyproject.toml +1 -6
- ui_cli-2.1.0/src/ui_cli/commands/local/firewall.py +673 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/local_client.py +41 -5
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/main.py +1 -4
- ui_cli-1.2.1/VERSION +0 -1
- ui_cli-1.2.1/src/ui_cli/commands/local/firewall.py +0 -285
- ui_cli-1.2.1/src/ui_cli/commands/mcp.py +0 -416
- ui_cli-1.2.1/src/ui_mcp/ARCHITECTURE.md +0 -243
- ui_cli-1.2.1/src/ui_mcp/README.md +0 -235
- ui_cli-1.2.1/src/ui_mcp/__init__.py +0 -7
- ui_cli-1.2.1/src/ui_mcp/__main__.py +0 -10
- ui_cli-1.2.1/src/ui_mcp/cli_runner.py +0 -112
- ui_cli-1.2.1/src/ui_mcp/server.py +0 -468
- {ui_cli-1.2.1 → ui_cli-2.1.0}/.gitignore +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/LICENSE +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/__init__.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/client.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/__init__.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/devices.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/groups.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/hosts.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/isp.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/local/__init__.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/local/apgroups.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/local/clients.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/local/config.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/local/devices.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/local/dpi.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/local/events.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/local/health.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/local/networks.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/local/portfwd.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/local/stats.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/local/utils.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/local/vouchers.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/local/wan.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/local/wlans.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/sdwan.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/sites.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/speedtest.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/status.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/commands/version.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/config.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/groups.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/models.py +0 -0
- {ui_cli-1.2.1 → ui_cli-2.1.0}/src/ui_cli/output.py +0 -0
|
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.1.0] - 2026-06-26
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `ui lo firewall add` for creating classic local-controller firewall rules, including
|
|
15
|
+
IPv4 source/destination filters, port filters, logging, dry-run output, and
|
|
16
|
+
`--before`/`--after` ordering helpers.
|
|
17
|
+
|
|
18
|
+
## [2.0.0] - 2026-04-16
|
|
19
|
+
|
|
20
|
+
### Removed
|
|
21
|
+
|
|
22
|
+
- Removed the legacy `ui-mcp` server and the `ui mcp` command tree; `ui-cli` is now a CLI-only package again
|
|
23
|
+
- Dropped MCP-related packaging entry points, optional dependencies, and bundled documentation
|
|
24
|
+
|
|
10
25
|
## [1.2.1] - 2026-04-16
|
|
11
26
|
|
|
12
27
|
### Changed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ui-cli
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: CLI utility for UniFi Site Manager and local controller APIs
|
|
5
5
|
Project-URL: Homepage, https://github.com/vedanta/ui-cli
|
|
6
6
|
Project-URL: Documentation, https://vedanta.github.io/ui-cli
|
|
@@ -32,8 +32,6 @@ Requires-Dist: mypy>=1.10.0; extra == 'dev'
|
|
|
32
32
|
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
|
|
33
33
|
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
34
34
|
Requires-Dist: ruff>=0.5.0; extra == 'dev'
|
|
35
|
-
Provides-Extra: mcp
|
|
36
|
-
Requires-Dist: mcp>=1.0.0; extra == 'mcp'
|
|
37
35
|
Description-Content-Type: text/markdown
|
|
38
36
|
|
|
39
37
|
# UniFi CLI
|
|
@@ -64,7 +62,6 @@ Description-Content-Type: text/markdown
|
|
|
64
62
|
- [Cloud API Commands](#cloud-api-commands)
|
|
65
63
|
- [Local Controller Commands](#local-controller-commands)
|
|
66
64
|
- [Client Groups](#client-groups)
|
|
67
|
-
- [Claude Desktop Integration](#claude-desktop-integration)
|
|
68
65
|
- [Output Formats](#output-formats)
|
|
69
66
|
- [Command Reference](#command-reference)
|
|
70
67
|
- [Data Storage](#data-storage)
|
|
@@ -101,12 +98,6 @@ UI-CLI is a comprehensive command-line tool for managing UniFi network infrastru
|
|
|
101
98
|
- **Guest Management** - Create hotspot vouchers with custom duration, data limits, and speed caps, list and delete existing vouchers
|
|
102
99
|
- **Configuration Export** - Export running config to YAML/JSON for backup, filter by section (networks, wireless, firewall, devices)
|
|
103
100
|
|
|
104
|
-
**Claude Desktop Integration (MCP)**
|
|
105
|
-
- Natural language control of your network via Claude Desktop
|
|
106
|
-
- 21 tools covering status, health, client management, device control, groups, and vouchers
|
|
107
|
-
- Ask questions like "How many devices are connected?" or "Block the kids iPad"
|
|
108
|
-
- Group actions like "Block all kids devices" or "Show status of smart bulbs"
|
|
109
|
-
|
|
110
101
|
**General**
|
|
111
102
|
- Multiple output formats: table (human-readable), JSON (scripting), CSV (spreadsheets), YAML (config)
|
|
112
103
|
- Works with UDM, UDM Pro, UDM SE, Cloud Key, and self-hosted controllers
|
|
@@ -549,6 +540,21 @@ Requires `UNIFI_CONTROLLER_URL`, `UNIFI_CONTROLLER_USERNAME`, and `UNIFI_CONTROL
|
|
|
549
540
|
./ui lo firewall list -v # Verbose with full details
|
|
550
541
|
./ui lo firewall list -o json # JSON output
|
|
551
542
|
|
|
543
|
+
# Create a targeted inter-VLAN allow rule
|
|
544
|
+
./ui lo firewall add "Allow Hermes to MacBook MoneyMoney MCP" \
|
|
545
|
+
--ruleset LAN_IN \
|
|
546
|
+
--action accept \
|
|
547
|
+
--protocol tcp \
|
|
548
|
+
--src 192.168.60.63/32 \
|
|
549
|
+
--dst 192.168.2.120/32 \
|
|
550
|
+
--dst-port 3850 \
|
|
551
|
+
--before "VLAN60" \
|
|
552
|
+
--logging \
|
|
553
|
+
-y
|
|
554
|
+
|
|
555
|
+
# Preview the UniFi payload without changing the controller
|
|
556
|
+
./ui lo firewall add "Allow MCP" --protocol tcp --dst-port 3850 --dry-run -o json
|
|
557
|
+
|
|
552
558
|
# Address and port groups
|
|
553
559
|
./ui lo firewall groups # List all groups
|
|
554
560
|
./ui lo firewall groups -v # Show group members
|
|
@@ -835,102 +841,6 @@ Auto groups dynamically match clients based on rules. Members are evaluated at q
|
|
|
835
841
|
|
|
836
842
|
---
|
|
837
843
|
|
|
838
|
-
## Claude Desktop Integration
|
|
839
|
-
|
|
840
|
-
Control your UniFi network using natural language through [Claude Desktop](https://claude.ai/download).
|
|
841
|
-
|
|
842
|
-
### Setup
|
|
843
|
-
|
|
844
|
-
```bash
|
|
845
|
-
# Install MCP server to Claude Desktop
|
|
846
|
-
./ui mcp install
|
|
847
|
-
|
|
848
|
-
# Verify installation
|
|
849
|
-
./ui mcp check
|
|
850
|
-
|
|
851
|
-
# View current configuration
|
|
852
|
-
./ui mcp show
|
|
853
|
-
|
|
854
|
-
# Restart Claude Desktop to activate
|
|
855
|
-
```
|
|
856
|
-
|
|
857
|
-
### MCP Commands
|
|
858
|
-
|
|
859
|
-
```bash
|
|
860
|
-
./ui mcp install # Add to Claude Desktop config
|
|
861
|
-
./ui mcp check # Verify setup and connectivity
|
|
862
|
-
./ui mcp show # View current configuration
|
|
863
|
-
./ui mcp remove # Remove from Claude Desktop
|
|
864
|
-
```
|
|
865
|
-
|
|
866
|
-
### Example Prompts
|
|
867
|
-
|
|
868
|
-
| You say... | Claude does... |
|
|
869
|
-
|------------|----------------|
|
|
870
|
-
| "How many devices are on my network?" | Counts clients by type |
|
|
871
|
-
| "What's my network health?" | Shows WAN/LAN/WLAN/VPN status |
|
|
872
|
-
| "What's my internet speed?" | Shows last speed test result |
|
|
873
|
-
| "Run a speed test" | Initiates new speed test |
|
|
874
|
-
| "Find my iPhone" | Searches for client by name |
|
|
875
|
-
| "Is the TV online?" | Checks client status |
|
|
876
|
-
| "Block the kids iPad" | Blocks specific client |
|
|
877
|
-
| "Unblock the kids iPad" | Unblocks client |
|
|
878
|
-
| "Block all kids devices" | Blocks entire group |
|
|
879
|
-
| "Restart the garage AP" | Restarts device |
|
|
880
|
-
| "Create a guest WiFi voucher" | Creates voucher |
|
|
881
|
-
| "What groups do I have?" | Lists all groups |
|
|
882
|
-
| "Show the kids devices group" | Shows group details |
|
|
883
|
-
|
|
884
|
-
### Available Tools (21)
|
|
885
|
-
|
|
886
|
-
| Category | Tools | Description |
|
|
887
|
-
|----------|-------|-------------|
|
|
888
|
-
| **Status & Health** | `network_status` | Check API connectivity |
|
|
889
|
-
| | `network_health` | Site health summary |
|
|
890
|
-
| | `internet_speed` | Last speed test result |
|
|
891
|
-
| | `run_speedtest` | Run new speed test |
|
|
892
|
-
| | `isp_performance` | ISP metrics over time |
|
|
893
|
-
| **Counts & Lists** | `client_count` | Count clients by category |
|
|
894
|
-
| | `device_list` | List UniFi devices |
|
|
895
|
-
| | `network_list` | List networks/VLANs |
|
|
896
|
-
| **Lookups** | `find_client` | Find client by name/MAC |
|
|
897
|
-
| | `find_device` | Find device by name/MAC/IP |
|
|
898
|
-
| | `client_status` | Check if client is online/blocked |
|
|
899
|
-
| **Actions** | `block_client` | Block from network |
|
|
900
|
-
| | `unblock_client` | Restore access |
|
|
901
|
-
| | `kick_client` | Force disconnect |
|
|
902
|
-
| | `restart_device` | Reboot device |
|
|
903
|
-
| | `create_voucher` | Create guest WiFi code |
|
|
904
|
-
| **Groups** | `list_groups` | List all client groups |
|
|
905
|
-
| | `get_group` | Get group details |
|
|
906
|
-
| | `block_group` | Block all in group |
|
|
907
|
-
| | `unblock_group` | Unblock all in group |
|
|
908
|
-
| | `group_status` | Live status of group members |
|
|
909
|
-
|
|
910
|
-
### Architecture
|
|
911
|
-
|
|
912
|
-
```
|
|
913
|
-
┌─────────────────┐
|
|
914
|
-
│ Claude Desktop │
|
|
915
|
-
└────────┬────────┘
|
|
916
|
-
│ MCP Protocol (stdio)
|
|
917
|
-
▼
|
|
918
|
-
┌─────────────────┐
|
|
919
|
-
│ MCP Server │ ← 21 AI-optimized tools
|
|
920
|
-
│ (ui_mcp) │
|
|
921
|
-
└────────┬────────┘
|
|
922
|
-
│ subprocess
|
|
923
|
-
▼
|
|
924
|
-
┌─────────────────┐
|
|
925
|
-
│ UI CLI │ ← All business logic
|
|
926
|
-
│ (ui_cli) │
|
|
927
|
-
└─────────────────┘
|
|
928
|
-
```
|
|
929
|
-
|
|
930
|
-
See [MCP Documentation](src/ui_mcp/README.md) for full technical details.
|
|
931
|
-
|
|
932
|
-
---
|
|
933
|
-
|
|
934
844
|
## Output Formats
|
|
935
845
|
|
|
936
846
|
All commands support multiple output formats:
|
|
@@ -1002,8 +912,7 @@ NO_COLOR=1 ./ui lo health
|
|
|
1002
912
|
├── isp # ISP metrics (cloud)
|
|
1003
913
|
├── sdwan # SD-WAN configuration (cloud)
|
|
1004
914
|
├── groups # Client groups (local storage)
|
|
1005
|
-
|
|
1006
|
-
└── mcp # Claude Desktop integration
|
|
915
|
+
└── local / lo # Local controller commands
|
|
1007
916
|
```
|
|
1008
917
|
|
|
1009
918
|
### Cloud API Commands
|
|
@@ -1098,6 +1007,10 @@ NO_COLOR=1 ./ui lo health
|
|
|
1098
1007
|
├── list # List firewall rules
|
|
1099
1008
|
│ ├── --ruleset # Filter by ruleset
|
|
1100
1009
|
│ └── -v # Verbose
|
|
1010
|
+
├── add <name> # Create a firewall rule
|
|
1011
|
+
│ ├── --src/--dst # IPv4 address/CIDR filters
|
|
1012
|
+
│ ├── --dst-port # Destination port/list/range
|
|
1013
|
+
│ └── --before # Place before rule ID/name
|
|
1101
1014
|
└── groups # List address/port groups
|
|
1102
1015
|
└── -v # Show members
|
|
1103
1016
|
|
|
@@ -1190,18 +1103,6 @@ NO_COLOR=1 ./ui lo health
|
|
|
1190
1103
|
|
|
1191
1104
|
</details>
|
|
1192
1105
|
|
|
1193
|
-
### MCP Commands
|
|
1194
|
-
|
|
1195
|
-
```
|
|
1196
|
-
./ui mcp
|
|
1197
|
-
├── install # Add to Claude Desktop config
|
|
1198
|
-
├── check # Verify setup
|
|
1199
|
-
├── show # View current config
|
|
1200
|
-
└── remove # Remove from Claude Desktop
|
|
1201
|
-
```
|
|
1202
|
-
|
|
1203
|
-
---
|
|
1204
|
-
|
|
1205
1106
|
## Data Storage
|
|
1206
1107
|
|
|
1207
1108
|
UI-CLI stores local data in `~/.config/ui-cli/`:
|
|
@@ -1285,7 +1186,6 @@ rm ~/.config/ui-cli/session.json
|
|
|
1285
1186
|
./ui lo --help
|
|
1286
1187
|
./ui lo clients --help
|
|
1287
1188
|
./ui groups --help
|
|
1288
|
-
./ui mcp --help
|
|
1289
1189
|
```
|
|
1290
1190
|
|
|
1291
1191
|
---
|
|
@@ -1297,8 +1197,6 @@ rm ~/.config/ui-cli/session.json
|
|
|
1297
1197
|
| [Online Documentation](https://vedanta.github.io/ui-cli) | Full documentation site |
|
|
1298
1198
|
| [User Guide](USERGUIDE.md) | Detailed usage examples |
|
|
1299
1199
|
| [Client Groups](docs/groups.md) | Groups feature guide |
|
|
1300
|
-
| [MCP Server](src/ui_mcp/README.md) | Claude Desktop integration |
|
|
1301
|
-
| [MCP Architecture](src/ui_mcp/ARCHITECTURE.md) | Technical design |
|
|
1302
1200
|
| [Roadmap](ROADMAP.md) | Planned features |
|
|
1303
1201
|
| [Changelog](CHANGELOG.md) | Version history |
|
|
1304
1202
|
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
- [Cloud API Commands](#cloud-api-commands)
|
|
27
27
|
- [Local Controller Commands](#local-controller-commands)
|
|
28
28
|
- [Client Groups](#client-groups)
|
|
29
|
-
- [Claude Desktop Integration](#claude-desktop-integration)
|
|
30
29
|
- [Output Formats](#output-formats)
|
|
31
30
|
- [Command Reference](#command-reference)
|
|
32
31
|
- [Data Storage](#data-storage)
|
|
@@ -63,12 +62,6 @@ UI-CLI is a comprehensive command-line tool for managing UniFi network infrastru
|
|
|
63
62
|
- **Guest Management** - Create hotspot vouchers with custom duration, data limits, and speed caps, list and delete existing vouchers
|
|
64
63
|
- **Configuration Export** - Export running config to YAML/JSON for backup, filter by section (networks, wireless, firewall, devices)
|
|
65
64
|
|
|
66
|
-
**Claude Desktop Integration (MCP)**
|
|
67
|
-
- Natural language control of your network via Claude Desktop
|
|
68
|
-
- 21 tools covering status, health, client management, device control, groups, and vouchers
|
|
69
|
-
- Ask questions like "How many devices are connected?" or "Block the kids iPad"
|
|
70
|
-
- Group actions like "Block all kids devices" or "Show status of smart bulbs"
|
|
71
|
-
|
|
72
65
|
**General**
|
|
73
66
|
- Multiple output formats: table (human-readable), JSON (scripting), CSV (spreadsheets), YAML (config)
|
|
74
67
|
- Works with UDM, UDM Pro, UDM SE, Cloud Key, and self-hosted controllers
|
|
@@ -511,6 +504,21 @@ Requires `UNIFI_CONTROLLER_URL`, `UNIFI_CONTROLLER_USERNAME`, and `UNIFI_CONTROL
|
|
|
511
504
|
./ui lo firewall list -v # Verbose with full details
|
|
512
505
|
./ui lo firewall list -o json # JSON output
|
|
513
506
|
|
|
507
|
+
# Create a targeted inter-VLAN allow rule
|
|
508
|
+
./ui lo firewall add "Allow Hermes to MacBook MoneyMoney MCP" \
|
|
509
|
+
--ruleset LAN_IN \
|
|
510
|
+
--action accept \
|
|
511
|
+
--protocol tcp \
|
|
512
|
+
--src 192.168.60.63/32 \
|
|
513
|
+
--dst 192.168.2.120/32 \
|
|
514
|
+
--dst-port 3850 \
|
|
515
|
+
--before "VLAN60" \
|
|
516
|
+
--logging \
|
|
517
|
+
-y
|
|
518
|
+
|
|
519
|
+
# Preview the UniFi payload without changing the controller
|
|
520
|
+
./ui lo firewall add "Allow MCP" --protocol tcp --dst-port 3850 --dry-run -o json
|
|
521
|
+
|
|
514
522
|
# Address and port groups
|
|
515
523
|
./ui lo firewall groups # List all groups
|
|
516
524
|
./ui lo firewall groups -v # Show group members
|
|
@@ -797,102 +805,6 @@ Auto groups dynamically match clients based on rules. Members are evaluated at q
|
|
|
797
805
|
|
|
798
806
|
---
|
|
799
807
|
|
|
800
|
-
## Claude Desktop Integration
|
|
801
|
-
|
|
802
|
-
Control your UniFi network using natural language through [Claude Desktop](https://claude.ai/download).
|
|
803
|
-
|
|
804
|
-
### Setup
|
|
805
|
-
|
|
806
|
-
```bash
|
|
807
|
-
# Install MCP server to Claude Desktop
|
|
808
|
-
./ui mcp install
|
|
809
|
-
|
|
810
|
-
# Verify installation
|
|
811
|
-
./ui mcp check
|
|
812
|
-
|
|
813
|
-
# View current configuration
|
|
814
|
-
./ui mcp show
|
|
815
|
-
|
|
816
|
-
# Restart Claude Desktop to activate
|
|
817
|
-
```
|
|
818
|
-
|
|
819
|
-
### MCP Commands
|
|
820
|
-
|
|
821
|
-
```bash
|
|
822
|
-
./ui mcp install # Add to Claude Desktop config
|
|
823
|
-
./ui mcp check # Verify setup and connectivity
|
|
824
|
-
./ui mcp show # View current configuration
|
|
825
|
-
./ui mcp remove # Remove from Claude Desktop
|
|
826
|
-
```
|
|
827
|
-
|
|
828
|
-
### Example Prompts
|
|
829
|
-
|
|
830
|
-
| You say... | Claude does... |
|
|
831
|
-
|------------|----------------|
|
|
832
|
-
| "How many devices are on my network?" | Counts clients by type |
|
|
833
|
-
| "What's my network health?" | Shows WAN/LAN/WLAN/VPN status |
|
|
834
|
-
| "What's my internet speed?" | Shows last speed test result |
|
|
835
|
-
| "Run a speed test" | Initiates new speed test |
|
|
836
|
-
| "Find my iPhone" | Searches for client by name |
|
|
837
|
-
| "Is the TV online?" | Checks client status |
|
|
838
|
-
| "Block the kids iPad" | Blocks specific client |
|
|
839
|
-
| "Unblock the kids iPad" | Unblocks client |
|
|
840
|
-
| "Block all kids devices" | Blocks entire group |
|
|
841
|
-
| "Restart the garage AP" | Restarts device |
|
|
842
|
-
| "Create a guest WiFi voucher" | Creates voucher |
|
|
843
|
-
| "What groups do I have?" | Lists all groups |
|
|
844
|
-
| "Show the kids devices group" | Shows group details |
|
|
845
|
-
|
|
846
|
-
### Available Tools (21)
|
|
847
|
-
|
|
848
|
-
| Category | Tools | Description |
|
|
849
|
-
|----------|-------|-------------|
|
|
850
|
-
| **Status & Health** | `network_status` | Check API connectivity |
|
|
851
|
-
| | `network_health` | Site health summary |
|
|
852
|
-
| | `internet_speed` | Last speed test result |
|
|
853
|
-
| | `run_speedtest` | Run new speed test |
|
|
854
|
-
| | `isp_performance` | ISP metrics over time |
|
|
855
|
-
| **Counts & Lists** | `client_count` | Count clients by category |
|
|
856
|
-
| | `device_list` | List UniFi devices |
|
|
857
|
-
| | `network_list` | List networks/VLANs |
|
|
858
|
-
| **Lookups** | `find_client` | Find client by name/MAC |
|
|
859
|
-
| | `find_device` | Find device by name/MAC/IP |
|
|
860
|
-
| | `client_status` | Check if client is online/blocked |
|
|
861
|
-
| **Actions** | `block_client` | Block from network |
|
|
862
|
-
| | `unblock_client` | Restore access |
|
|
863
|
-
| | `kick_client` | Force disconnect |
|
|
864
|
-
| | `restart_device` | Reboot device |
|
|
865
|
-
| | `create_voucher` | Create guest WiFi code |
|
|
866
|
-
| **Groups** | `list_groups` | List all client groups |
|
|
867
|
-
| | `get_group` | Get group details |
|
|
868
|
-
| | `block_group` | Block all in group |
|
|
869
|
-
| | `unblock_group` | Unblock all in group |
|
|
870
|
-
| | `group_status` | Live status of group members |
|
|
871
|
-
|
|
872
|
-
### Architecture
|
|
873
|
-
|
|
874
|
-
```
|
|
875
|
-
┌─────────────────┐
|
|
876
|
-
│ Claude Desktop │
|
|
877
|
-
└────────┬────────┘
|
|
878
|
-
│ MCP Protocol (stdio)
|
|
879
|
-
▼
|
|
880
|
-
┌─────────────────┐
|
|
881
|
-
│ MCP Server │ ← 21 AI-optimized tools
|
|
882
|
-
│ (ui_mcp) │
|
|
883
|
-
└────────┬────────┘
|
|
884
|
-
│ subprocess
|
|
885
|
-
▼
|
|
886
|
-
┌─────────────────┐
|
|
887
|
-
│ UI CLI │ ← All business logic
|
|
888
|
-
│ (ui_cli) │
|
|
889
|
-
└─────────────────┘
|
|
890
|
-
```
|
|
891
|
-
|
|
892
|
-
See [MCP Documentation](src/ui_mcp/README.md) for full technical details.
|
|
893
|
-
|
|
894
|
-
---
|
|
895
|
-
|
|
896
808
|
## Output Formats
|
|
897
809
|
|
|
898
810
|
All commands support multiple output formats:
|
|
@@ -964,8 +876,7 @@ NO_COLOR=1 ./ui lo health
|
|
|
964
876
|
├── isp # ISP metrics (cloud)
|
|
965
877
|
├── sdwan # SD-WAN configuration (cloud)
|
|
966
878
|
├── groups # Client groups (local storage)
|
|
967
|
-
|
|
968
|
-
└── mcp # Claude Desktop integration
|
|
879
|
+
└── local / lo # Local controller commands
|
|
969
880
|
```
|
|
970
881
|
|
|
971
882
|
### Cloud API Commands
|
|
@@ -1060,6 +971,10 @@ NO_COLOR=1 ./ui lo health
|
|
|
1060
971
|
├── list # List firewall rules
|
|
1061
972
|
│ ├── --ruleset # Filter by ruleset
|
|
1062
973
|
│ └── -v # Verbose
|
|
974
|
+
├── add <name> # Create a firewall rule
|
|
975
|
+
│ ├── --src/--dst # IPv4 address/CIDR filters
|
|
976
|
+
│ ├── --dst-port # Destination port/list/range
|
|
977
|
+
│ └── --before # Place before rule ID/name
|
|
1063
978
|
└── groups # List address/port groups
|
|
1064
979
|
└── -v # Show members
|
|
1065
980
|
|
|
@@ -1152,18 +1067,6 @@ NO_COLOR=1 ./ui lo health
|
|
|
1152
1067
|
|
|
1153
1068
|
</details>
|
|
1154
1069
|
|
|
1155
|
-
### MCP Commands
|
|
1156
|
-
|
|
1157
|
-
```
|
|
1158
|
-
./ui mcp
|
|
1159
|
-
├── install # Add to Claude Desktop config
|
|
1160
|
-
├── check # Verify setup
|
|
1161
|
-
├── show # View current config
|
|
1162
|
-
└── remove # Remove from Claude Desktop
|
|
1163
|
-
```
|
|
1164
|
-
|
|
1165
|
-
---
|
|
1166
|
-
|
|
1167
1070
|
## Data Storage
|
|
1168
1071
|
|
|
1169
1072
|
UI-CLI stores local data in `~/.config/ui-cli/`:
|
|
@@ -1247,7 +1150,6 @@ rm ~/.config/ui-cli/session.json
|
|
|
1247
1150
|
./ui lo --help
|
|
1248
1151
|
./ui lo clients --help
|
|
1249
1152
|
./ui groups --help
|
|
1250
|
-
./ui mcp --help
|
|
1251
1153
|
```
|
|
1252
1154
|
|
|
1253
1155
|
---
|
|
@@ -1259,8 +1161,6 @@ rm ~/.config/ui-cli/session.json
|
|
|
1259
1161
|
| [Online Documentation](https://vedanta.github.io/ui-cli) | Full documentation site |
|
|
1260
1162
|
| [User Guide](USERGUIDE.md) | Detailed usage examples |
|
|
1261
1163
|
| [Client Groups](docs/groups.md) | Groups feature guide |
|
|
1262
|
-
| [MCP Server](src/ui_mcp/README.md) | Claude Desktop integration |
|
|
1263
|
-
| [MCP Architecture](src/ui_mcp/ARCHITECTURE.md) | Technical design |
|
|
1264
1164
|
| [Roadmap](ROADMAP.md) | Planned features |
|
|
1265
1165
|
| [Changelog](CHANGELOG.md) | Version history |
|
|
1266
1166
|
|
ui_cli-2.1.0/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.1.0
|
|
@@ -36,9 +36,6 @@ dependencies = [
|
|
|
36
36
|
]
|
|
37
37
|
|
|
38
38
|
[project.optional-dependencies]
|
|
39
|
-
mcp = [
|
|
40
|
-
"mcp>=1.0.0",
|
|
41
|
-
]
|
|
42
39
|
dev = [
|
|
43
40
|
"pytest>=8.0.0",
|
|
44
41
|
"pytest-asyncio>=0.23.0",
|
|
@@ -48,7 +45,6 @@ dev = [
|
|
|
48
45
|
|
|
49
46
|
[project.scripts]
|
|
50
47
|
ui = "ui_cli.main:app"
|
|
51
|
-
ui-mcp = "ui_mcp.server:main"
|
|
52
48
|
|
|
53
49
|
[tool.hatch.version]
|
|
54
50
|
source = "regex"
|
|
@@ -58,7 +54,6 @@ pattern = "(?m)^(?P<version>\\d+\\.\\d+\\.\\d+)$"
|
|
|
58
54
|
[tool.hatch.build.targets.sdist]
|
|
59
55
|
include = [
|
|
60
56
|
"/src/ui_cli",
|
|
61
|
-
"/src/ui_mcp",
|
|
62
57
|
"/README.md",
|
|
63
58
|
"/CHANGELOG.md",
|
|
64
59
|
"/LICENSE",
|
|
@@ -66,7 +61,7 @@ include = [
|
|
|
66
61
|
]
|
|
67
62
|
|
|
68
63
|
[tool.hatch.build.targets.wheel]
|
|
69
|
-
packages = ["src/ui_cli"
|
|
64
|
+
packages = ["src/ui_cli"]
|
|
70
65
|
|
|
71
66
|
[tool.ruff]
|
|
72
67
|
line-length = 100
|