How stevelacey/wifi-cli-macos works
Wi-Fi CLI MacOS is a macOS command-line utility for discovering networks and managing connections and network settings. The principal workflow starts at the CLI, optionally scans and prompts for a network, then connects through the native scanner; other commands inspect or change DNS, IP, router, and MAC settings. Separate capabilities include saved-network/keychain access, iPhone hotspot discovery, QR sharing, and speed tests. The graph follows relationships shown in excerpts or the README; the Swift scanner’s build-to-source relationship and some unsampled command wiring are not asserted.
Main entry points: index.js Command handlers · wifi.js Wi-Fi operations · network.js DNS, IP, router, MAC · support.js Process and utilities
Components 14
CLI interaction
- Command handlers
index.js - Interactive prompts
prompts.js - Terminal output and QR
terminal.js - DNS presets and version
settings.js
Network discovery
- Scanner commands
scanner.js - Wi-Fi and BLE scanner
wifi-scanner.swift
Network configuration
- DNS, IP, router, MAC
network.js - Wi-Fi operations
wifi.js
macOS integration
- Device identification
system.js - Process and utilities
support.js
Other components
- CLI user
- macOS network services
- macOS Keychain
- Apple network speed test
Connections 20
- CLI user → Command handlers: runs commands
README.md - Command handlers → Interactive prompts: requests input
index.js - Command handlers → Scanner commands: scans and connects
index.js - Command handlers → DNS, IP, router, MAC: reads and sets
index.js - Command handlers → Wi-Fi operations: invokes operations
index.js - Command handlers → Terminal output and QR: formats output
index.js - Command handlers → DNS presets and version: reads presets
index.js - Command handlers → Process and utilities: generates MAC
index.js - Scanner commands → Process and utilities: runs processes
scanner.js - DNS, IP, router, MAC → Process and utilities: runs commands
network.js - DNS, IP, router, MAC → Device identification: uses device details
network.js - DNS, IP, router, MAC → Wi-Fi operations: restarts Wi-Fi
network.js - Wi-Fi operations → Process and utilities: runs processes
wifi.js - Wi-Fi operations → Device identification: uses device details
wifi.js - Terminal output and QR → DNS presets and version: uses product name
terminal.js - Scanner commands → macOS network services: invokes system tools
scanner.js - DNS, IP, router, MAC → macOS network services: configures networking
network.js - Wi-Fi operations → macOS Keychain: retrieves passwords
wifi.js - Wi-Fi operations → Apple network speed test: runs speed test
wifi.js - Command handlers → Terminal output and QR: generates QR
index.js