Introduction
Stop context-switching to the UniFi web dashboard. Unifly puts your entire network at your fingertips from the terminal you're already in.
unifly <command>: CLI for scripting, automation, and quick lookupsunifly tui: real-time terminal dashboard for monitoring
Both are powered by a shared async engine that speaks every UniFi API dialect, so you never have to think about which endpoint to hit.
πThe Problem
UniFi controllers expose two completely different APIs:
graph LR
subgraph "Integration API"
I["REST + API Key"]
I1["Networks, WiFi, Firewall"]
I2["DNS, ACL, NAT, Traffic Lists"]
end
subgraph "Session API"
S["Cookie + CSRF"]
S1["Events, Stats, DPI"]
S2["Device Commands, Admin"]
end
subgraph unifly
U["Unified Interface"]
end
I --> U
S --> U
U --> CLI["CLI Output"]
U --> TUI["TUI Dashboard"]- Integration API: RESTful, API-key authenticated, covers CRUD for most resources
- Session API: Session-based with cookie/CSRF, required for events, statistics, and device commands
Most tools only speak one dialect. The web dashboard is slow and canβt be scripted. Unifly handles the routing, authentication, and data merging automatically.
πWhat You Can Do
| Capability | Description |
|---|---|
| Device Management | List, inspect, restart, upgrade, and provision devices |
| Client Monitoring | See connected clients with signal, traffic, and VLAN info |
| Network Configuration | Manage VLANs, subnets, DHCP, and IPv6 settings |
| WiFi Management | Create and modify SSIDs, scan neighbors, analyze channels, track client roams and WiFi experience |
| Firewall | Manage policies, zones, and ACL rules |
| NAT | Masquerade, source NAT, and destination NAT rules (via Legacy v2 API) |
| Events & Alarms | Stream live events, acknowledge and archive alarms |
| Statistics | Query bandwidth, client counts, and DPI data over time |
| Raw API Access | Hit any controller endpoint directly with unifly api |
| Real-Time Dashboard | Monitor everything with live Braille charts and status bars |
πArchitecture at a Glance
graph TD UNIFLY["unifly
CLI + TUI (single binary)"] API["unifly-api
Library crate on crates.io"] UNIFLY --> API API --> INT["Integration Client
REST + API Key"] API --> SES["Session Client
Cookie + CSRF"] API --> WS["WebSocket
Live Events"] API --> DS["DataStore
DashMap + watch channels"]
Two crates with a clean dependency chain. The library is published independently for Rust developers building custom integrations. See the Architecture section for the full picture.
πNext Steps
- Installation: get unifly on your system
- Quick Start: configure and run your first commands
- Authentication: understand API key vs password vs hybrid
- AI Agent Skill: let your coding agent manage your network
In this section
Installation
Install unifly via Homebrew, Cargo, AUR, or binary download
Quick Start
Set up your first controller profile and run your first commands
Configuration
Profiles, TOML config, environment variables, and keyring storage
Authentication
API key, credentials, hybrid, and cloud auth modes explained
AI Agent Skill
Teach AI coding agents to manage your UniFi network