Quick Start
Set up your first controller profile and run your first commands
๐Prerequisites
- A UniFi Network controller (Dream Machine, Cloud Key, UCG, or self-hosted)
- An API key (Settings > Integrations) and/or admin credentials
- unifly installed
๐Interactive Setup
Run the setup wizard to configure your first controller profile:
unifly config init
The wizard walks you through:
- Controller URL: your controllerโs address (e.g.,
https://192.168.1.1) - Authentication: API key, username/password, or hybrid mode
- Site selection: choose which site to manage
Credentials are stored in your OS keyring by default. A plaintext config fallback is available if the keyring isnโt accessible.
๐First Commands
Once configured, explore your network:
# List all adopted devices
unifly devices list
# See connected clients
unifly clients list
# View networks and VLANs
unifly networks list
# Stream live events
unifly events watch
Example output:
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
๐Output Formats
Every command supports multiple output formats:
unifly devices list # Default table (human-readable)
unifly devices list -o json # Full JSON (for scripting)
unifly devices list -o json-compact # Single-line JSON (pipe-friendly)
unifly devices list -o yaml # YAML
unifly devices list -o plain # IDs only, one per line (for xargs)
Use -o json for automation and -o plain | xargs for batch operations:
unifly clients list -o plain | xargs -n1 unifly clients get
๐Launch the TUI
For real-time monitoring, launch the terminal dashboard:
unifly tui # Default profile
unifly tui -p office # Specific profile
graph LR 1["1 Dashboard
Health overview"] --> 2["2 Devices
Hardware status"] 2 --> 3["3 Clients
Connected users"] 3 --> 4["4 Networks
VLANs & DHCP"] 4 --> 5["5 Firewall
Policies & zones"] 5 --> 6["6 Topology
Network map"] 6 --> 7["7 Events
Live feed"] 7 --> 8["8 Stats
Historical data"] 8 --> 9["9 WiFi
RF health & roaming"]
Navigate screens with number keys 1-9. Press , for settings, ? for help, q to quit.
Heads Up
events watchrequires Session or Hybrid auth (WebSocket needs a cookie session)- List commands default to 25 rows. Pass
--allor--limit 200for full results - Use Hybrid only when you need live event streaming (
events watch). API Key mode covers most commands on UniFi OS
๐Multiple Controllers
Add more profiles for different controllers:
unifly config init # Add another profile
unifly config profiles # List all profiles
unifly config use office # Switch default profile
unifly -p home devices list # One-off override
๐Next Steps
- Configuration: all config options, environment variables, and profiles
- Authentication: API key vs password vs hybrid
- CLI Commands: full command reference
- TUI Dashboard: screen-by-screen guide with all keybindings
- AI Agent Skill: let your coding agent manage your network