
Your UniFi network, at your fingertips.
CLI + TUI for humans and agents







Features •
Install •
Quick Start •
CLI •
TUI •
Architecture •
Library •
AI Agent Skill •
Development
💜 What is unifly?
A complete command-line toolkit for managing Ubiquiti UniFi network controllers. One binary with 29 top-level commands for scripting and a built-in TUI dashboard for real-time monitoring, powered by a shared async engine that speaks every UniFi API dialect, including Site Manager cloud fleet APIs and the cloud connector.
Manage devices, monitor clients, inspect VLANs, stream events, and watch bandwidth charts, all without leaving your terminal.
UniFi controllers expose multiple APIs with different capabilities. unifly unifies them all into a single, coherent interface so you never have to think about which endpoint to hit.
🤖 AI Agent? 👤 Human? Both Welcome.
unifly speaks fluent silicon and carbon.
Coding agents get a small discovery skill that loads version-matched guidance from unifly skill. The binary ships command discovery, automation workflows, and payload examples, all available offline. The install scripts add the skill to ~/.agents/skills for you; after any other install method, one command does it:
unifly skill --install # --claude targets Claude Code's skills directory
npx skills add hyperb1iss/unifly installs the same skill without the binary, but agents still need the binary to load the guide. Older binaries without unifly skill need an update before they can serve it.
Humans get a gorgeous 11-screen TUI, shell completions, pipe-friendly output, and the quiet satisfaction of never opening the UniFi web UI again. Keep scrolling to Install.
Claude Code loads the unifly skill, works the --demo-fleet studio network with read-only commands and jq, and comes back with a punch list.
✦ Features
| Capability | What You Get |
|---|
| 🔮 Triple-Path API Engine | Integration API + Session API via a single API key on UniFi OS, plus Site Manager cloud fleet and connector support. Hybrid mode adds WebSocket for live event streaming |
| ⚡ Real-Time TUI | 11-screen dashboard with SilkCircuit octant traffic charts, CPU/MEM gauges, live client counts, zoomable topology, and auto-detected graphics-protocol charts (Kitty/Sixel/iTerm2) |
| 🦋 29 Top-Level Commands | Devices and switch port config-as-code, clients, networks, WiFi, firewall policies/zones/groups, ACLs, NAT, DNS, full VPN surface, DPI, RADIUS, site settings, topology, cloud fleet, raw API passthrough, tui... |
| 📡 Wi-Fi Observability | Neighboring APs, regulatory channels, per-client Wi-Fi experience scores, roam timelines |
| 💎 Flexible Output | Table, JSON, compact JSON, YAML, and plain text. Pipe-friendly for scripting |
| 🔒 Secure Credentials | OS keyring storage for API keys and passwords by default. Explicit api_key / password in TOML config wins when set, useful for headless or shared machines. |
| 🌐 Multi-Profile | Named profiles for multiple controllers. Switch with a single flag |
| 🧠 Smart Config | Interactive wizard, environment variables, TOML config, CLI overrides |
| 📡 WebSocket Events | Live event streaming with 10K rolling buffer, severity filtering, pause/scroll-back |
| 📊 Historical Stats | WAN bandwidth area fills, client counts, DPI app/category breakdown (1h to 30d) |
| 🎨 SilkCircuit Theme | Neon-on-dark color palette powered by opaline. Token-based theming across CLI and TUI with ANSI fallback |
⚡ Install
Linux / macOS
curl -fsSL https://raw.githubusercontent.com/hyperb1iss/unifly/main/install.sh | sh
Windows (PowerShell)
irm https://raw.githubusercontent.com/hyperb1iss/unifly/main/install.ps1 | iex
Other Methods
| Method | Command |
|---|
| Homebrew | brew install hyperb1iss/tap/unifly |
| AUR | yay -S unifly-bin |
| Cargo | cargo install unifly |
| Binary | Download from GitHub Releases |
The install scripts also add the agent skill to ~/.agents/skills for your user (set UNIFLY_NO_SKILL=1 to skip). Homebrew and AUR install unifly for every user and cannot write into your home directory, so after those, Cargo, or a manual download, run unifly skill --install yourself.
🔮 Quick Start
Run the interactive setup wizard:
unifly config init # Local controller
unifly config cloud-setup # Site Manager / cloud controller
The local wizard walks you through controller URL, authentication method, and site selection, and asks whether the controller uses a self-signed certificate (defaulting yes for IPs and .local-style hostnames, no for public ones). The cloud wizard validates your Site Manager API key, lets you pick a console by name, discovers its sites, and writes a ready-to-use cloud profile. Credentials can be stored in your OS keyring, referenced from UNIFI_API_KEY, or saved in plaintext config, depending on the path you choose.
Once configured:
unifly devices list # All adopted devices
unifly devices ports my-switch # Live port states with connected clients
unifly clients list # Connected clients
unifly networks list # VLANs and subnets
unifly firewall groups list # Port and address groups (Session API)
unifly vpn servers # VPN server inventory
unifly settings list # Site-level setting sections
unifly wifi neighbors # Nearby APs your radios can see
unifly clients wifi 10.0.0.42 # Per-client Wi-Fi experience score
unifly events watch # Live event feed (requires Hybrid auth)
unifly cloud hosts # Consoles visible through Site Manager
unifly cloud switch default # Re-target the active cloud profile to another site
ID | Name | Model | Status
--------------------------------------+-----------------+-----------------+--------
a1b2c3d4-e5f6-7890-abcd-ef1234567890 | Office Gateway | UDM-Pro | ONLINE
b2c3d4e5-f6a7-8901-bcde-f12345678901 | Living Room AP | U6-LR | ONLINE
c3d4e5f6-a7b8-9012-cdef-123456789012 | Garage Switch | USW-Lite-8-PoE | ONLINE
Create commands print the created entity on stdout in the chosen --output
format, so scripts capture IDs directly:
NET_ID=$(unifly networks create --name lab --management switch --vlan 42 -o json | jq -r .id)
🔐 Authentication
API Key (recommended)
Generate a key on your controller under Settings > Integrations. On UniFi
OS controllers, the same key also authenticates session HTTP endpoints, so API
key mode covers most CLI automation: CRUD, device commands, stats, DHCP
reservations, admin operations, Wi-Fi observability (wifi neighbors,
wifi channels, clients roams, clients wifi), and events list.
unifly config init # Select "API Key" during setup
unifly --api-key <KEY> devices list # Or pass directly
Live WebSocket features still need a session cookie, so events watch
requires Username/Password or Hybrid.
Username / Password
Session-based auth with cookie and CSRF token handling. Use this when
you need live WebSocket features (events watch) or when your controller does
not accept API keys on session HTTP endpoints.
unifly config init # Select "Username/Password" during setup
Hybrid Mode
Best of both worlds: API key for Integration API plus session HTTP, and