CLI reference
About 533 words
Every command of unifi, generated from the binary's own help with unifi docs generate. Each page covers one top-level command with all of its subcommands.
unifi controls a UniFi network from the terminal.
Commands follow the grammar unifi <subject> <verb>, for example unifi clients get or unifi ports set "Core Switch" NAS --poe off. Contexts (unifi ctx) select the account, controller and site, the way kubectl contexts select a cluster.
Network
unifi clients: List, inspect and manage connected clientsunifi consoles: List and inspect the consoles of your UI accountunifi devices: List, inspect and operate gateways, switches and access pointsunifi ports: See and change switch ports by name: PoE, profiles, namesunifi sites: List the controller's sites and choose the default one
Monitoring
unifi dashboard: Show the live dashboard of the siteunifi events: Read and follow the system log and the audit logunifi topology: Draw the network topology of the site
Settings
unifi acls: Manage switch ACL rulesunifi ddns: Manage dynamic DNS entriesunifi dns: Manage local DNS records and DNS policiesunifi firewall: Manage the zone-based firewallunifi internet: Manage internet (WAN) connectionsunifi known-clients: Manage client records: aliases, fixed IPs and notesunifi networks: Manage networks and VLANsunifi port-forwards: Manage port forwarding rulesunifi port-profiles: Manage switch port profilesunifi radius: Manage RADIUS profilesunifi routes: Manage static routesunifi settings: Manage controller and site settingsunifi traffic: Manage traffic rules, traffic routes and matching listsunifi users: List and inspect the controller's administratorsunifi vouchers: Manage hotspot vouchersunifi vpn: Manage VPN servers, clients and site-to-site tunnelsunifi wifi: Manage WiFi networks (SSIDs)
Configuration as code
unifi apply: Make the site match a set of manifestsunifi diff: Show what apply would changeunifi export: Dump the site's configuration as manifestsunifi resources: List the configuration kinds unifi can manage
Contexts and CLI
unifi completion: Print the shell completion scriptunifi config: View and edit the configuration of unifi-cliunifi ctx: List, switch and edit contextsunifi login: Sign in to a UniFi console and create a context for itunifi logout: Sign out: remove a context and its stored API keyunifi prompt: Show the current context in your shell promptunifi shell: Open an interactive configuration shellunifi theme: List, preview and select themesunifi version: Show the version of unifi-cli
Global flags
These flags are accepted by every command.
| Flag | Description |
|---|---|
--color-scheme <string> | color scheme: auto, dark or light |
--context <string> | context to use instead of the current one |
--no-cache | ask the controller for everything instead of using cached answers |
-o, --output <string> | output format: text, wide, json, yaml (table is another name for text) |
-s, --site <string> | site to act on instead of the context's default site |
--theme <string> | theme to render with instead of the configured one |
