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 lookups
  • unifly 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

CapabilityDescription
Device ManagementList, inspect, restart, upgrade, and provision devices
Client MonitoringSee connected clients with signal, traffic, and VLAN info
Network ConfigurationManage VLANs, subnets, DHCP, and IPv6 settings
WiFi ManagementCreate and modify SSIDs, scan neighbors, analyze channels, track client roams and WiFi experience
FirewallManage policies, zones, and ACL rules
NATMasquerade, source NAT, and destination NAT rules (via Legacy v2 API)
Events & AlarmsStream live events, acknowledge and archive alarms
StatisticsQuery bandwidth, client counts, and DPI data over time
Raw API AccessHit any controller endpoint directly with unifly api
Real-Time DashboardMonitor 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