๐ Elegant UniFi network management CLI & TUI - for humans and agents
> /plugin marketplace add hyperb1iss/unifly> /plugin install unifly@hyperb1iss
Repo: hyperb1iss/unifly
What's inside
A complete command-line toolkit for managing Ubiquiti UniFi network controllers. One binary with 28 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 dedicated skill bundle: full CLI reference, automation workflows, and a ready-made network manager agent that can provision VLANs, audit firewalls, and diagnose connectivity without asking permission for every command. One command to install:
npx skills add hyperb1iss/uniflyHumans 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.
| 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) |
| ๐ฆ 28 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 |
curl -fsSL https://raw.githubusercontent.com/hyperb1iss/unifly/main/install.sh | sh
irm https://raw.githubusercontent.com/hyperb1iss/unifly/main/install.ps1 | iex
| Method | Command |
|---|---|
| Homebrew | brew install hyperb1iss/tap/unifly |
| AUR | yay -S unifly-bin |
| Cargo | cargo install --git https://github.com/hyperb1iss/unifly.git unifly |
| Binary | Download from GitHub Releases |
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)
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.
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
Best of both worlds: API key for Integration API plus session HTTP, and username/password for the WebSocket cookie session. Choose this when you want full live monitoring plus maximum compatibility.
Use auth_mode = "cloud" when the controller is only reachable through
Site Manager. unifly will route Integration-backed commands through the cloud
connector and can auto-resolve host_id when exactly one console, or one
owner console, is visible to the API key.
unifly config cloud-setup
unifly cloud hosts
unifly cloud sites
unifly cloud switch default
unifly --profile cloud-home networks list
If the API key can see more than one console, unifly cloud ... still works
without host_id, but controller-bound commands such as devices list need a
saved host_id or a unique auto-resolution path. unifly cloud switch <site>
updates the active cloud profile's controller-side site target using the
connector's site names or internal references.
| Variable | Description |
|---|
FAQ
unifly is a Claude Code plugin with 1 hand-picked skill for automation work, indexed on Flowy. Install it with the command on its page. It includes unifly. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it