# Unifly

> >-

- **Type:** Skill
- **Install:** `agentstack add skill-hyperb1iss-unifly-unifly`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [hyperb1iss](https://agentstack.voostack.com/s/hyperb1iss)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [hyperb1iss](https://github.com/hyperb1iss)
- **Source:** https://github.com/hyperb1iss/unifly/tree/main/skills/unifly
- **Website:** https://hyperb1iss.github.io/unifly/

## Install

```sh
agentstack add skill-hyperb1iss-unifly-unifly
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# unifly: UniFi Network Management

unifly is a Rust CLI for managing Ubiquiti UniFi network infrastructure. It
unifies the modern Integration API (REST, API key), the Session API (cookie
plus CSRF), and Site Manager cloud APIs behind a single coherent interface,
plus real-time WebSocket event streaming. 28 top-level commands cover devices,
clients, networks, WiFi, firewall policies and zones, NAT policies, ACLs, DNS,
traffic matching lists, hotspot vouchers, DPI, stats, backups, cloud fleet
queries, and a raw API escape hatch.

Unique capabilities worth leading with when the user's task suits them:

- **Dual-API enrichment** merges Integration and Session data (e.g. client
  bytes, hostnames, uplink MACs only exist in the Session API; configuration CRUD only
  exists in Integration). On UniFi OS, API key mode can already reach session
  HTTP; Hybrid adds the WebSocket session for live monitoring.
- **Real-time event streaming** via `unifly events watch` over WebSocket.
- **Firewall policy reordering** via `reorder --get` / `reorder --set` for
  deterministic, round-trippable ordering edits.
- **`unifly api` raw passthrough** for endpoints unifly does not wrap.
- **Multi-profile** (`-p home`, `-p office`) for managing multiple controllers
  from one command line.

## Prerequisites

Verify availability before running any command:

```bash
command -v unifly >/dev/null 2>&1 && unifly --version || echo "unifly not installed"
```

If unifly is not installed, prefer `brew install hyperb1iss/tap/unifly` on
macOS or `cargo install --git https://github.com/hyperb1iss/unifly.git unifly`
elsewhere. After install, run `unifly config init` for a local controller or
`unifly config cloud-setup` for Site Manager. See `examples/config.toml` for
manual configuration.

## Authentication Modes

unifly supports four modes. **API key mode is enough for most HTTP
automation on UniFi OS controllers.** Choose **Hybrid** when the task needs
live WebSocket features (`events watch`) or you want maximum compatibility.

| Mode          | Credentials             | What It Unlocks                                                                                              |
| ------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------ |
| `integration` | API key                 | Integration API plus session HTTP on UniFi OS: CRUD, device commands, stats, reservations, admin, event list |
| `session`     | Username + password     | Session HTTP + WebSocket only: events watch, stats, device commands, DPI control, admin, backups             |
| `hybrid`      | API key + username/pass | Everything above, including session WebSocket plus enriched records with maximum controller compatibility    |
| `cloud`       | Site Manager API key    | Connector-routed Integration CRUD plus `unifly cloud` fleet commands against `api.ui.com`                    |

Session WebSocket still rejects API keys, so `events watch` needs `session` or
`hybrid`. Cloud mode does **not** expose Session API endpoints or WebSocket
streaming.

For the complete command-to-API gate matrix (which commands require which
auth mode), consult `references/concepts.md`.

## Command Inventory

All commands follow `unifly [global-flags]   [args]`.

| Command         | Aliases    | Actions                                                                                                                                                                                                                                                                                                                                                                                           |
| --------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `devices`       | `dev`, `d` | list, get, adopt, remove, restart, locate, port-cycle, ports, ports-export, port-set, stats, pending, upgrade, provision, speedtest, tags                                                                                                                                                                                                                                                         |
| `clients`       | `cl`       | list, find, get, roams, wifi, authorize, unauthorize, block, unblock, kick, forget, reservations (`res`), set-ip, remove-ip                                                                                                                                                                                                                                                                       |
| `cloud`         |            | hosts [get], sites, switch, devices, isp [query], sdwan [get, status]                                                                                                                                                                                                                                                                                                                             |
| `networks`      | `net`, `n` | list, get, create, update, delete, refs                                                                                                                                                                                                                                                                                                                                                           |
| `wifi`          | `w`        | list, get, neighbors, channels, create, update, delete                                                                                                                                                                                                                                                                                                                                            |
| `firewall`      | `fw`       | policies {list, get, create, update, patch, delete, reorder}, zones {list, get, create, update, delete}, groups {list, get, create, update, delete}                                                                                                                                                                                                                                               |
| `nat`           |            | policies {list, get, create, update, delete}                                                                                                                                                                                                                                                                                                                                                      |
| `acl`           |            | list, get, create, update, delete, reorder                                                                                                                                                                                                                                                                                                                                                        |
| `dns`           |            | list, get, create, update, delete                                                                                                                                                                                                                                                                                                                                                                 |
| `traffic-lists` |            | list, get, create, update, delete                                                                                                                                                                                                                                                                                                                                                                 |
| `hotspot`       |            | list, get, create, delete, purge                                                                                                                                                                                                                                                                                                                                                                  |
| `events`        |            | list, watch                                                                                                                                                                                                                                                                                                                                                                                       |
| `alarms`        |            | list, archive, archive-all                                                                                                                                                                                                                                                                                                                                                                        |
| `stats`         |            | site, device, client, gateway, dpi                                                                                                                                                                                                                                                                                                                                                                |
| `dpi`           |            | apps, categories, status, enable, disable                                                                                                                                                                                                                                                                                                                                                         |
| `topology`      | `topo`     | _(no subcommands)_                                                                                                                                                                                                                                                                                                                                                                                |
| `system`        | `sys`      | info, health, sysinfo, backup {create, list, download, delete}, reboot, poweroff                                                                                                                                                                                                                                                                                                                  |
| `settings`      |            | list, get, set, export                                                                                                                                                                                                                                                                                                                                                                            |
| `sites`         |            | list, create, delete                                                                                                                                                                                                                                                                                                                                                                              |
| `admin`         |            | list, invite, revoke, update                                                                                                                                                                                                                                                                                                                                                                      |
| `wans`          |            | list                                                                                                                                                                                                                                                                                                                                                                                              |
| `vpn`           |            | servers {list, get}, tunnels {list, get}, status, health, site-to-site {list, get, create, update, delete}, remote-access {list, get, create, update, suggest-port, download-config, delete}, clients {list, get, create, update, delete}, connections {list, get, restart}, peers {list, get, create, update, delete, subnets}, magic-site-to-site {list, get}, settings {list, get, set, patch} |
| `radius`        |            | profiles                                                                                                                                                                                                                                                                                                                                                                                          |
| `countries`     |            | _(no subcommands)_                                                                                                                                                                                                                                                                                                                                                                                |
| `api`           |            | Raw API passthrough (GET/POST/PUT/PATCH/DELETE any path)                                                                                                                                                                                                                                                                                                                                          |
| `config`        |            | init, cloud-setup, show, set, profiles, use, set-password                                                                                                                                                                                                                                                                                                                                         |
| `tui`           |            | _(no subcommands)_                                                                                                                                                                                                                                                                                                                                                                                |
| `completions`   |            | bash, zsh, fish, powershell, elvish                                                                                                                                                                                                                                                                                                                                                               |

For flag details and gotchas, consult `referenc

…

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [hyperb1iss](https://github.com/hyperb1iss)
- **Source:** [hyperb1iss/unifly](https://github.com/hyperb1iss/unifly)
- **License:** Apache-2.0
- **Homepage:** https://hyperb1iss.github.io/unifly/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-hyperb1iss-unifly-unifly
- Seller: https://agentstack.voostack.com/s/hyperb1iss
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
