一键导入
unifi-cli
Manage local UniFi Network controllers using the unifi CLI. Use when working with Dream Machine, Cloud Key, or self-hosted UniFi controllers.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Manage local UniFi Network controllers using the unifi CLI. Use when working with Dream Machine, Cloud Key, or self-hosted UniFi controllers.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Manage the CLI tools monorepo using helper scripts. Use when checking CI status, release commits, or managing multiple CLI projects.
Manage UniFi sites via the cloud-based Site Manager API using the usm CLI. Use when working with multiple sites, cloud controllers, or UniFi cloud infrastructure.
Interact with X API using the x CLI. Use when working with posts, timelines, media uploads, user data, or when the user mentions X, social media, posts, or x.
Manage Apple Business Connect listings using the abc CLI. Use when working with business locations, place cards, hours, or when the user mentions Apple Business Connect, Apple Maps business, location listings, or abc.
Query Advance Commerce APIs using the adv CLI. Use when working with e-commerce data, product catalogs, inventory, orders, or when the user mentions Advance Commerce, e-commerce, product data, or adv.
Query Apple Maps Server APIs using the ams CLI. Use when working with geocoding, reverse geocoding, search, directions, or when the user mentions Apple Maps, geolocation, map data, or ams.
| name | unifi-cli |
| description | Manage local UniFi Network controllers using the unifi CLI. Use when working with Dream Machine, Cloud Key, or self-hosted UniFi controllers. |
This skill provides guidance for the unifi CLI tool, a command-line interface for local UniFi Network controllers.
unifi connects directly to your local UniFi Controller (Dream Machine, Cloud Key, or self-hosted) to manage sites, devices, and clients. For cloud-based management across multiple sites, use the separate usm CLI.
brew tap dl-alexandre/tap
brew install unifi
Download from GitHub Releases.
unifi init
# Or set environment variables:
export UNIFI_BASE_URL="https://192.168.1.1"
export UNIFI_USERNAME="admin"
export UNIFI_PASSWORD="your-password"
unifi sites list
unifi devices list
unifi clients list
Interactive configuration setup. Creates ~/.config/unifi/config.yaml.
Use when:
List all sites on the controller.
Use when:
List all UniFi devices (APs, switches, gateways).
Use when:
Flags:
--site=<id> - Specific site (default: first available)List connected clients.
Use when:
Flags:
--site=<id> - Specific site (default: first available)Show version information.
Config file: ~/.config/unifi/config.yaml
Note: Passwords are NOT stored in config. Use environment variables or flags.
api:
base_url: https://192.168.1.1
timeout: 30
auth:
username: admin
output:
format: table
color: auto
| Variable | Description |
|---|---|
UNIFI_BASE_URL | Controller URL (e.g., https://192.168.1.1) |
UNIFI_USERNAME | Username for authentication |
UNIFI_PASSWORD | Password for authentication |
UNIFI_FORMAT | Output format: table, json |
UNIFI_COLOR | Color mode: auto, always, never |
UNIFI_NO_HEADERS | Disable table headers |
UNIFI_CONFIG | Path to config file |
Local UniFi Controllers use session-based authentication:
/api/auth/loginSecurity notes:
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Authentication failure |
| 4 | Validation error |
| 5 | Rate limited |
| 6 | Network error |
for site in $(unifi sites list --output json | jq -r '.[].name'); do
echo "=== Site: $site ==="
unifi devices list --site "$site"
done
unifi devices list --output json > devices.json
unifi clients list --output json | jq '.[] | select(.ip == "192.168.1.100")'
unifi devices list --output json | jq '.[] | select(.adopted == false)'
Local UniFi Controller API endpoints:
GET /api/self/sites - List sitesGET /api/s/{site}/stat/device - List devicesGET /api/s/{site}/stat/sta - List clientsGET /api/s/{site}/stat/health - Site healthusm - For cloud-based UniFi Site Manager API (multi-site overview)Connection refused:
Authentication failed:
Certificate errors:
curl -k equivalent or add certificate to trust store