wifimgr

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2026 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

wifimgr

CI Go Report Card License

A CLI tool for managing network infrastructure across Mist and Meraki using configuration-as-code.

Quickstart

# Install
git clone https://github.com/ravinald/wifimgr.git && cd wifimgr && make build

# Configure API access (edit with your org_id, add token to .env.wifimgr)
mkdir -p ~/.config/wifimgr
cp config/wifimgr-config-sample.json ~/.config/wifimgr/wifimgr-config.json

# Verify connection and cache API data
wifimgr -e refresh cache

# List sites
wifimgr show api sites

What It Does

  • Show - View sites, devices, WLANs, and inventory from API or local config
  • Search - Find connected clients (wireless and wired) by hostname, MAC, or partial match (Mist and Meraki)
  • Apply - Push device configurations to the API with dry-run support (currently AP configuration)
  • Import - Bootstrap config files from current API state
  • Refresh - Sync local cache with API data and manage cache age/staleness

Configuration

wifimgr uses a JSON config file for API credentials and settings. The minimum required:

{
  "api": {
    "mist": {
      "vendor": "mist",
      "url": "https://api.mist.com/api/v1",
      "credentials": {
        "org_id": "your-org-uuid"
      }
    }
  },
  "files": {
    "site_configs": ["sites/us-lab.json"]
  }
}

Store your API token in .env.wifimgr (add to .gitignore):

WIFIMGR_API_TOKEN=your-token-here

Run with -e to load the token:

wifimgr -e show api sites

Common Commands

# View
wifimgr show api sites                    # List all sites
wifimgr show api ap site US-LAB-01        # List APs at a site
wifimgr show inventory ap                 # Show AP inventory
wifimgr show intent ap site US-LAB-01     # Show intended AP config

# Apply
wifimgr apply ap US-LAB-01 --dry-run      # Preview changes
wifimgr apply ap US-LAB-01                # Apply AP config to site

# Import from API
wifimgr import api site US-LAB-01         # Preview config from API
wifimgr import api site US-LAB-01 save    # Save to config file

# Search (Mist and Meraki)
wifimgr search wired laptop-john          # Find wired client
wifimgr search wireless 5c:5b:35:8e:4c:f9 # Find wireless client by MAC
wifimgr search wireless john site US-LAB  # Scope search to site
wifimgr search wireless desktop force     # Bypass confirmation for expensive searches

# Cache management
wifimgr show api status                   # Check cache age and freshness
wifimgr refresh cache                     # Sync cache with API

CLI Flags

Flag Description
-e Load API token from .env.wifimgr
-d Debug logging (info level)
-dd Debug logging (debug level)
-ddd Debug logging (trace level, includes API responses)
--dry-run Preview changes without applying
--api <name> Filter to specific API in multi-vendor setups

Multi-Vendor Support

Manage both Mist and Meraki from the same config file. Full support for:

  • View - Sites, devices, inventory, WLANs across all vendors
  • Search - Find connected clients on Mist or Meraki networks (both wireless and wired)
  • Apply - Configure APs on either platform
  • Cache - Automatic cache management with age tracking and TTL

Example configuration:

{
  "api": {
    "mist-prod": {
      "vendor": "mist",
      "url": "https://api.mist.com/api/v1",
      "credentials": { "org_id": "..." },
      "cache_ttl": 86400
    },
    "meraki-corp": {
      "vendor": "meraki",
      "url": "https://api.meraki.com",
      "credentials": { "org_id": "..." },
      "cache_ttl": 86400
    }
  }
}

Filter commands to a specific API:

wifimgr show api sites --api mist-prod
wifimgr search wireless laptop --api meraki-corp

Documentation

Development

make build          # Build binary
make test           # Run tests
make test-coverage  # Generate coverage report

License

Apache License 2.0

Documentation

Overview

Copyright © 2025 NAME HERE <EMAIL ADDRESS>

Directories

Path Synopsis
Package api provides functionality for interacting with the Mist API and managing local configuration, cache, and validation.
Package api provides functionality for interacting with the Mist API and managing local configuration, cache, and validation.
cmd
ap
filehash command
cmd
internal
jsonschema
Package jsonschema provides validation functionality for JSON documents against schemas
Package jsonschema provides validation functionality for JSON documents against schemas
keypath
Package keypath provides utilities for parsing and working with dot-notation key paths.
Package keypath provides utilities for parsing and working with dot-notation key paths.
macaddr
Package macaddr provides utilities for handling and manipulating MAC addresses
Package macaddr provides utilities for handling and manipulating MAC addresses
nameresolver
Package nameresolver provides name-to-ID resolution for configuration references.
Package nameresolver provides name-to-ID resolution for configuration references.
pdf
vendors
Package vendors provides vendor-agnostic types for network device configuration.
Package vendors provides vendor-agnostic types for network device configuration.
vendors/meraki
Package meraki provides a Meraki implementation of the vendors.Client interface.
Package meraki provides a Meraki implementation of the vendors.Client interface.
vendors/mist
Package mist provides Mist-specific API conversions.
Package mist provides Mist-specific API conversions.
xdg
Package xdg provides XDG Base Directory Specification support for wifimgr.
Package xdg provides XDG Base Directory Specification support for wifimgr.
licenses
github.com/juju/ratelimit
Package ratelimit provides an efficient token bucket implementation that can be used to limit the rate of arbitrary things.
Package ratelimit provides an efficient token bucket implementation that can be used to limit the rate of arbitrary things.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL