{"id":47726940,"url":"https://github.com/hyperb1iss/unifly","last_synced_at":"2026-04-08T07:02:04.668Z","repository":{"id":338375068,"uuid":"1157326300","full_name":"hyperb1iss/unifly","owner":"hyperb1iss","description":"Elegant UniFi network management CLI \u0026 TUI — built with Rust","archived":false,"fork":false,"pushed_at":"2026-04-01T00:02:32.000Z","size":2683,"stargazers_count":12,"open_issues_count":0,"forks_count":5,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-03T06:29:42.338Z","etag":null,"topics":["cli","networking","ratatui","rust","terminal","tui","ubiquiti","unifi"],"latest_commit_sha":null,"homepage":"https://hyperb1iss.github.io/unifly/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyperb1iss.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":"hyperb1iss","ko_fi":"hyperb1iss"}},"created_at":"2026-02-13T17:33:45.000Z","updated_at":"2026-04-01T00:02:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"180327e2-878d-4504-a70b-39f7f181cb44","html_url":"https://github.com/hyperb1iss/unifly","commit_stats":null,"previous_names":["hyperb1iss/unifly"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/hyperb1iss/unifly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperb1iss%2Funifly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperb1iss%2Funifly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperb1iss%2Funifly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperb1iss%2Funifly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperb1iss","download_url":"https://codeload.github.com/hyperb1iss/unifly/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperb1iss%2Funifly/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31544087,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"online","status_checked_at":"2026-04-08T02:00:06.127Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","networking","ratatui","rust","terminal","tui","ubiquiti","unifi"],"created_at":"2026-04-02T20:44:49.445Z","updated_at":"2026-04-08T07:02:04.627Z","avatar_url":"https://github.com/hyperb1iss.png","language":"Rust","funding_links":["https://github.com/sponsors/hyperb1iss","https://ko-fi.com/hyperb1iss"],"categories":["Applications","Controller \u0026 Management","💻 Apps"],"sub_categories":["System tools","Ruby","🌐 Networking and Internet"],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cbr\u003e\n  🌐 unifly\n  \u003cbr\u003e\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eYour UniFi Network, at Your Fingertips\u003c/strong\u003e\u003cbr\u003e\n  \u003csub\u003e✦ CLI + TUI for UniFi Network Controllers ✦\u003c/sub\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Rust-1.94+-e135ff?style=for-the-badge\u0026logo=rust\u0026logoColor=white\" alt=\"Rust\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Edition-2024-80ffea?style=for-the-badge\u0026logo=rust\u0026logoColor=0a0a0f\" alt=\"Edition 2024\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/ratatui-TUI-ff6ac1?style=for-the-badge\u0026logo=gnometerminal\u0026logoColor=white\" alt=\"ratatui\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/opaline-Theme-e135ff?style=for-the-badge\u0026logo=rust\u0026logoColor=white\" alt=\"opaline\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/tokio-Async-f1fa8c?style=for-the-badge\u0026logo=rust\u0026logoColor=0a0a0f\" alt=\"tokio\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/License-Apache--2.0-50fa7b?style=for-the-badge\u0026logo=apache\u0026logoColor=0a0a0f\" alt=\"License\"\u003e\n  \u003ca href=\"https://github.com/sponsors/hyperb1iss\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Sponsor-ff6ac1?style=for-the-badge\u0026logo=githubsponsors\u0026logoColor=white\" alt=\"Sponsor\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#-features\"\u003eFeatures\u003c/a\u003e •\n  \u003ca href=\"#-install\"\u003eInstall\u003c/a\u003e •\n  \u003ca href=\"#-quick-start\"\u003eQuick Start\u003c/a\u003e •\n  \u003ca href=\"#-cli\"\u003eCLI\u003c/a\u003e •\n  \u003ca href=\"#-tui\"\u003eTUI\u003c/a\u003e •\n  \u003ca href=\"#-architecture\"\u003eArchitecture\u003c/a\u003e •\n  \u003ca href=\"#-library\"\u003eLibrary\u003c/a\u003e •\n  \u003ca href=\"#-ai-agent-skill\"\u003eAI Agent Skill\u003c/a\u003e •\n  \u003ca href=\"#-development\"\u003eDevelopment\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## 💜 What is unifly?\n\nA complete command-line toolkit for managing Ubiquiti UniFi network controllers. One binary with 26 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.\n\n\u003e _Manage devices, monitor clients, inspect VLANs, stream events, and watch bandwidth charts, all without leaving your terminal._\n\nUniFi 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.\n\n---\n\n\u003e ### 🤖 AI Agent? 👤 Human? Both Welcome.\n\u003e\n\u003e unifly speaks fluent silicon *and* carbon.\n\u003e\n\u003e **Coding agents** get a dedicated [skill bundle](skills/unifly/SKILL.md): 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:\n\u003e\n\u003e ```bash\n\u003e npx skills add hyperb1iss/unifly\n\u003e ```\n\u003e\n\u003e **Humans** get a gorgeous 10-screen TUI, shell completions, pipe-friendly output, and the quiet satisfaction of never opening the UniFi web UI again. Keep scrolling to [Install](#-install).\n\n---\n\n## ✦ Features\n\n| Capability | What You Get |\n| --- | --- |\n| 🔮 **Dual API Engine** | Integration API (REST, API key) + Session API (session, cookie/CSRF) with automatic Hybrid negotiation |\n| ⚡ **Real-Time TUI** | 10-screen dashboard with area-fill traffic charts, CPU/MEM gauges, live client counts, zoomable topology |\n| 🦋 **26 Top-Level Commands** | Devices, clients, networks, WiFi, firewall policies, zones, ACLs, NAT, DNS, VPN, DPI, RADIUS, topology, raw API passthrough, `tui`... |\n| 💎 **Flexible Output** | Table, JSON, compact JSON, YAML, and plain text. Pipe-friendly for scripting |\n| 🔒 **Secure Credentials** | OS keyring storage for API keys and passwords, with plaintext config support when you choose it |\n| 🌐 **Multi-Profile** | Named profiles for multiple controllers. Switch with a single flag |\n| 🧠 **Smart Config** | Interactive wizard, environment variables, TOML config, CLI overrides |\n| 📡 **WebSocket Events** | Live event streaming with 10K rolling buffer, severity filtering, pause/scroll-back |\n| 📊 **Historical Stats** | WAN bandwidth area fills, client counts, DPI app/category breakdown (1h to 30d) |\n| 🎨 **SilkCircuit Theme** | Neon-on-dark color palette powered by [opaline](https://crates.io/crates/opaline). Token-based theming across CLI and TUI with ANSI fallback |\n\n---\n\n## ⚡ Install\n\n### Linux / macOS\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/hyperb1iss/unifly/main/install.sh | sh\n```\n\n### Windows (PowerShell)\n\n```powershell\nirm https://raw.githubusercontent.com/hyperb1iss/unifly/main/install.ps1 | iex\n```\n\n### Other Methods\n\n| Method | Command |\n| --- | --- |\n| **Homebrew** | `brew install hyperb1iss/tap/unifly` |\n| **AUR** | `yay -S unifly-bin` |\n| **Cargo** | `cargo install --git https://github.com/hyperb1iss/unifly.git unifly` |\n| **Binary** | Download from [GitHub Releases](https://github.com/hyperb1iss/unifly/releases/latest) |\n\n---\n\n## 🔮 Quick Start\n\nRun the interactive setup wizard:\n\n```bash\nunifly config init\n```\n\nThe wizard walks you through controller URL, authentication method, and site selection. Credentials can be stored in your OS keyring or saved in plaintext config, depending on the option you choose.\n\nOnce configured:\n\n```bash\nunifly devices list          # All adopted devices\nunifly clients list          # Connected clients\nunifly networks list         # VLANs and subnets\nunifly events watch          # Live event feed (requires session auth or Hybrid)\n```\n\n```\n ID                                   | Name            | Model           | Status\n--------------------------------------+-----------------+-----------------+--------\n a1b2c3d4-e5f6-7890-abcd-ef1234567890 | Office Gateway  | UDM-Pro         | ONLINE\n b2c3d4e5-f6a7-8901-bcde-f12345678901 | Living Room AP  | U6-LR           | ONLINE\n c3d4e5f6-a7b8-9012-cdef-123456789012 | Garage Switch   | USW-Lite-8-PoE  | ONLINE\n```\n\n---\n\n## 🔐 Authentication\n\n### API Key (recommended)\n\nGenerate a key on your controller under **Settings \u003e Integrations**. On UniFi\nOS controllers, the same key also authenticates session HTTP endpoints, so API\nkey mode covers most CLI automation: CRUD, device commands, stats, DHCP\nreservations, admin operations, and `events list`.\n\n```bash\nunifly config init                     # Select \"API Key\" during setup\nunifly --api-key \u003cKEY\u003e devices list    # Or pass directly\n```\n\nLive WebSocket features still need a session cookie, so `events watch`\nrequires **Username/Password** or **Hybrid**.\n\n### Username / Password\n\nSession-based auth with cookie and CSRF token handling. Use this when\nyou need live WebSocket features (`events watch`) or when your controller does\nnot accept API keys on session HTTP endpoints.\n\n```bash\nunifly config init                     # Select \"Username/Password\" during setup\n```\n\n### Hybrid Mode\n\nBest of both worlds: API key for Integration API plus session HTTP, and\nusername/password for the WebSocket cookie session. Choose this when you want\nfull live monitoring plus maximum compatibility.\n\n### Environment Variables\n\n| Variable | Description |\n| --- | --- |\n| `UNIFI_API_KEY` | Integration API key |\n| `UNIFI_URL` | Controller URL |\n| `UNIFI_PROFILE` | Profile name |\n| `UNIFI_SITE` | Site name or UUID |\n| `UNIFI_OUTPUT` | Default output format |\n| `UNIFI_INSECURE` | Accept self-signed TLS certs |\n| `UNIFI_TIMEOUT` | Request timeout (seconds) |\n\n---\n\n## 💻 CLI\n\n### Commands\n\n| Command | Alias | Description |\n| --- | --- | --- |\n| `acl` | | Manage ACL rules |\n| `admin` | | Administrator management |\n| `alarms` | | Manage alarms |\n| `clients` | `cl` | Manage clients and DHCP reservations |\n| `completions` | | Generate shell completions |\n| `config` | | Manage CLI configuration |\n| `countries` | | List available country codes |\n| `devices` | `dev`, `d` | Manage adopted and pending devices |\n| `dns` | | Manage DNS policies (local records) |\n| `dpi` | | DPI reference data |\n| `events` | | View and stream events |\n| `firewall` | `fw` | Manage firewall policies and zones |\n| `nat` | | Manage NAT policies (masquerade, SNAT, DNAT) |\n| `hotspot` | | Manage hotspot vouchers |\n| `networks` | `net`, `n` | Manage networks and VLANs |\n| `radius` | | View RADIUS profiles |\n| `sites` | | Manage sites |\n| `stats` | | Query statistics and reports |\n| `system` | `sys` | System operations and info |\n| `topology` | `topo` | Show network topology tree |\n| `traffic-lists` | | Manage traffic matching lists |\n| `vpn` | | View VPN inventory, session site-to-site, remote-access, and client records, OpenVPN helpers, VPN connections, WireGuard peers, magic site-to-site configs, and VPN settings |\n| `wans` | | View WAN interfaces |\n| `wifi` | `w` | Manage WiFi broadcasts (SSIDs) |\n| `api` | | Raw API passthrough (GET/POST/PUT/PATCH/DELETE to any endpoint) |\n| `tui` | | Launch the real-time terminal dashboard |\n\nMost resource groups support `list` and `get`; some also expose `create`, `update`, `delete`, `patch`, or specialized actions. Run `unifly \u003ccommand\u003e --help` for details.\n\n### Global Flags\n\n```\n-p, --profile \u003cNAME\u003e     Controller profile to use\n-c, --controller \u003cURL\u003e   Controller URL (overrides profile)\n-s, --site \u003cSITE\u003e        Site name or UUID\n-o, --output \u003cFORMAT\u003e    Output: table, json, json-compact, yaml, plain\n-k, --insecure           Accept self-signed TLS certificates\n-v, --verbose            Increase verbosity (-v, -vv, -vvv)\n-q, --quiet              Suppress non-error output\n-y, --yes                Skip confirmation prompts\n    --timeout \u003cSECS\u003e     Request timeout (default: 30)\n    --color \u003cMODE\u003e       Color: auto, always, never\n```\n\n### Shell Completions\n\n```bash\n# Bash\nunifly completions bash \u003e ~/.local/share/bash-completion/completions/unifly\n\n# Zsh\nunifly completions zsh \u003e ~/.zfunc/_unifly\n\n# Fish\nunifly completions fish \u003e ~/.config/fish/completions/unifly.fish\n\n# PowerShell\nunifly completions powershell | Out-String | Invoke-Expression\n```\n\n---\n\n## 🖥️ TUI\n\n`unifly tui` launches a 10-screen real-time dashboard for monitoring and managing your network.\n\n```bash\nunifly tui                   # Launch with default profile\nunifly tui -p office         # Use a specific profile\nunifly tui -k                # Accept self-signed TLS certs\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/images/dashboard.png\" alt=\"unifly tui dashboard\" width=\"900\"\u003e\n\u003c/p\u003e\n\n| Screen | Highlights |\n| --- | --- |\n| **Dashboard** | btop-style overview: WAN traffic chart, gateway info, CPU/MEM gauges, top clients, recent events |\n| **Devices** | Model, firmware, uptime, CPU/MEM. 5-tab detail panel. Restart, locate, upgrade |\n| **Clients** | Signal, traffic, VLAN. Filter by type. Block/unblock/kick |\n| **Networks** | VLAN topology with inline edit overlay for live config changes |\n| **Firewall** | Policies, zones, ACL, NAT across four sub-tabs with drag reordering |\n| **Topology** | Zoomable network tree with pan, zoom, fit-to-view |\n| **Events** | Live WebSocket stream with 10K buffer, pause, severity filtering |\n| **Stats** | WAN bandwidth, client counts, DPI breakdown (1h/24h/7d/30d) |\n| **Settings** | Profile switching, theme selector, display preferences |\n| **Onboarding** | First-run setup wizard |\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/images/devices.png\" alt=\"unifly tui devices\" width=\"900\"\u003e\n  \u003cimg src=\"docs/images/clients.png\" alt=\"unifly tui clients\" width=\"900\"\u003e\n\u003c/p\u003e\n\nFull keybinding reference and screen details in the [TUI documentation](https://hyperb1iss.github.io/unifly/reference/tui).\n\n---\n\n## 🏗️ Architecture\n\nTwo crates, clean dependency chain:\n\n| Crate | Purpose |\n| --- | --- |\n| **unifly-api** | Async HTTP/WebSocket client, Controller lifecycle, reactive DataStore (`DashMap` + `tokio::watch`), entity models. Published on [crates.io](https://crates.io/crates/unifly-api) |\n| **unifly** | Single binary: CLI commands + `unifly tui` dashboard via feature flags, profile/keyring config, 10-screen ratatui dashboard with SilkCircuit theme |\n\nDeep dive: [Architecture documentation](https://hyperb1iss.github.io/unifly/architecture/)\n\n---\n\n## ⚙️ Configuration\n\n```bash\nunifly config init             # Interactive setup wizard\nunifly config profiles         # List profiles (* marks active)\nunifly config use office       # Switch default profile\nunifly -p home devices list    # One-off override\n```\n\nNamed profiles for multiple controllers, OS keyring credential storage, environment variable overrides, and TOML config files. Full details: [Configuration guide](https://hyperb1iss.github.io/unifly/guide/configuration)\n\n---\n\n## 📦 Library\n\n[![unifly-api](https://img.shields.io/crates/v/unifly-api.svg)](https://crates.io/crates/unifly-api) · Async HTTP/WebSocket transport, high-level Controller, reactive DataStore, domain models\n\n```rust\nuse unifly_api::{Controller, ControllerConfig, AuthCredentials, TlsVerification};\nuse secrecy::SecretString;\n\nlet config = ControllerConfig {\n    url: \"https://192.168.1.1\".parse()?,\n    auth: AuthCredentials::ApiKey(SecretString::from(\"your-api-key\")),\n    tls: TlsVerification::DangerAcceptInvalid,\n    ..Default::default()\n};\nlet controller = Controller::new(config);\ncontroller.connect().await?;\n\nlet devices = controller.devices_snapshot();\nprintln!(\"Found {} devices\", devices.len());\n```\n\nFull API docs on [docs.rs/unifly-api](https://docs.rs/unifly-api). Usage guide with more examples: [Library documentation](https://hyperb1iss.github.io/unifly/reference/library)\n\n---\n\n## 🤖 AI Agent Skill\n\n### Install Options\n\n```bash\nnpx skills add hyperb1iss/unifly                    # Claude Code, Cursor, Copilot, Codex, Gemini, ...\nnpx skills add hyperb1iss/unifly -a claude-code     # Target a specific agent\n/plugin marketplace add hyperb1iss/unifly           # As a Claude Code plugin\n```\n\n### What's Included\n\n| Component | Description |\n| --- | --- |\n| **unifly skill** | Complete CLI reference, command patterns, output formats, automation tips |\n| **Network Manager agent** | Autonomous agent for provisioning, diagnostics, and security audits |\n| **Reference docs** | Command reference, UniFi networking concepts, workflow patterns |\n\n---\n\n## 🦋 Development\n\n### Prerequisites\n\n- Rust 1.94+ (edition 2024)\n- A UniFi Network controller (Cloud Key, Dream Machine, or self-hosted)\n\n### Build\n\n```bash\ngit clone https://github.com/hyperb1iss/unifly.git\ncd unifly\ncargo build --workspace\n```\n\n### Test \u0026 Lint\n\n```bash\ncargo test --workspace\ncargo clippy --workspace --all-targets\n```\n\n### Run\n\n```bash\ncargo run -p unifly -- devices list\ncargo run -p unifly -- tui\n```\n\n### Workspace Layout\n\n```\ncrates/\n  unifly-api/      # Library: HTTP/WS transport, Controller, DataStore, domain models\n  unifly/          # Single binary: CLI commands + tui subcommand, config, profiles\n```\n\n### Lint Policy\n\nPedantic clippy with `unsafe_code = \"forbid\"`. See `Cargo.toml` workspace lints for the full configuration. It's opinionated and we like it that way.\n\n---\n\n## ⚖️ License\n\nApache-2.0. See [LICENSE](LICENSE)\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/sponsors/hyperb1iss\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Sponsor-hyperb1iss-e135ff?style=for-the-badge\u0026logo=githubsponsors\u0026logoColor=white\" alt=\"Sponsor on GitHub\"\u003e\n  \u003c/a\u003e\n  \u0026nbsp;\n  \u003ca href=\"https://github.com/hyperb1iss/unifly\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/hyperb1iss/unifly?style=for-the-badge\u0026logo=github\u0026logoColor=white\u0026color=80ffea\" alt=\"Star on GitHub\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003csub\u003e\n    If unifly keeps your network running smooth, \u003ca href=\"https://github.com/sponsors/hyperb1iss\"\u003e\u003cstrong\u003esponsor the project\u003c/strong\u003e\u003c/a\u003e or give it a ⭐\n    \u003cbr\u003e\u003cbr\u003e\n    ✦ Built with obsession by \u003ca href=\"https://hyperbliss.tech\"\u003e\u003cstrong\u003eHyperbliss Technologies\u003c/strong\u003e\u003c/a\u003e ✦\n  \u003c/sub\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperb1iss%2Funifly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperb1iss%2Funifly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperb1iss%2Funifly/lists"}