npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

unifi-cli

v0.1.0

Published

CLI and MCP server for the UniFi Network API — auto-generated from the OpenAPI spec, optimized for AI/LLM usage

Readme

unifi-cli

CLI and MCP server for the UniFi Network API. Auto-generated from the official OpenAPI spec, optimized for scripting and AI/LLM tool use.

Requirements

  • Bun runtime (v1.0+)
  • UniFi Network Application v10+ with API key

Install

bun install -g unifi-cli

Quick Start

# Save connection settings
unifi-cli configure --url https://192.168.1.1 --api-key YOUR_API_KEY

# List sites
unifi-cli sites list

# List devices on a site
unifi-cli devices list --site default

# Get device details
unifi-cli devices get --site default DEVICE_ID

Configuration

Configuration is resolved in priority order:

  1. CLI flags: --url, --api-key, --site
  2. Environment variables: UNIFI_URL, UNIFI_API_KEY, UNIFI_SITE
  3. Config file: ~/.config/unifi-cli/config.json

Commands

All 67 UniFi Network API operations are available as CLI commands, organized by resource:

| Group | Commands | |-------|----------| | sites | list | | devices | list, get, stats, pending, adopt, unadopt | | clients | list, get | | networks | list, get, create, update, delete, references | | firewall | zones-list, zones-get, policies-list, policies-get, policies-ordering | | wifi | list, get, create, update, delete | | dns | list, get, create, update, delete | | vpn | tunnels-list, servers-list, ... | | acl | list, get, ordering, ... | | ... | and more |

Run unifi-cli operations to see the full list, or unifi-cli --help for usage.

Output Formats

# JSON (default)
unifi-cli sites list

# JSON Lines (one object per line)
unifi-cli clients list --format jsonl

# Table
unifi-cli devices list --format table

# Filter fields
unifi-cli devices list --fields name,model,status

MCP Server

Expose all operations as tools for AI/LLM agents via the Model Context Protocol:

# Start MCP server (stdio transport)
unifi-cli mcp

# Read-only mode (only GET operations)
unifi-cli mcp --read-only

Claude Desktop / Claude Code

Add to your MCP configuration:

{
  "mcpServers": {
    "unifi": {
      "command": "unifi-cli",
      "args": ["mcp"],
      "env": {
        "UNIFI_URL": "https://192.168.1.1",
        "UNIFI_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

The MCP server provides:

  • 67 tools — one per API operation, with full JSON Schema input validation
  • 3 resourcesunifi://info, unifi://sites, unifi://spec
  • 3 resource templatesunifi://sites/{siteId}/devices, /networks, /clients
  • 3 promptsaudit-firewall, network-topology, device-health

Advanced

# Raw API request
unifi-cli raw GET /v1/sites

# Dry run (show request without executing)
unifi-cli devices list --dry-run

# Skip TLS verification (self-signed certs)
unifi-cli sites list --insecure

# View schema for an operation
unifi-cli schema getAdoptedDeviceOverviewPage

# Dump the bundled OpenAPI spec
unifi-cli openapi

License

MIT