macwifi-cli
wifi info via command line on mac os
Can produce json output parsable using jq
Commands:
scan List nearby Wi-Fi networks.
info Show the network the Mac is currently connected to.
password Print the saved Keychain password for an SSID.
help Show this message.
version Print version information.
Global flags:
--json Emit JSON instead of a human-readable table.
--no-prompt-hint Suppress the "macOS may prompt..." stderr hint.
Examples:
macwifi-cli scan
macwifi-cli scan --json | jq '.[] | select(.rssi > -65)'
macwifi-cli info
macwifi-cli password "MyHomeWiFi"
% macwifi-cli info
SSID BSSID RSSI CH BAND WIDTH SEC FLAGS
disabled 8c:8b:5b:5f:17:b5 -44 11 2.4GHz 40 WPA3 CS
% macwifi-cli scan
SSID BSSID RSSI CH BAND WIDTH SEC FLAGS
disabled 8c:8b:5b:5f:17:b5 -46 1 2.4GHz 40 WPA3 CS
TP-LINK_A52016 f4:f2:6d:a5:20:16 -52 11 2.4GHz 80 WPA3 S
HP-Print-CA-Photosmart 7520 10:60:4b:c6:58:ca -68 1 2.4GHz 40 none
Verizon_LZHTJ9-2.4ghz 78:67:0e:e1:6a:75 -80 11 2.4GHz 40 WPA3
Verizon_3PWKQV 78:67:0e:00:d7:03 -86 6 2.4GHz 80 WPA3
Fight or Flight or Franek 24:05:88:42:47:87 -90 11 2.4GHz 40 WPA3
Fios-NVq2f b8:f8:53:87:c7:62 -92 11 2.4GHz 40 WPA3
allergyguest - 0 0 unknown 0 unknown S
Trinity-Guest - 0 0 unknown 0 unknown S
Apple Store - 0 0 unknown 0 unknown S
Dennis's iPhone - 0 0 unknown 0 unknown S
Verizon_3NHPY4 - 0 0 unknown 0 unknown S
KEMPINSKI - 0 0 unknown 0 unknown S
TauckSpot_Savor - 0 0 unknown 0 unknown S
Dennis-s_iPhone17 - 0 0 unknown 0 unknown S
Dennis's iPhone ok - 0 0 unknown 0 unknown S
Airport-Frankfurt - 0 0 unknown 0 unknown S
Omega-D594 - 0 0 unknown 0 unknown S
Fios-Q8EDY-5G - 0 0 unknown 0 unknown S
Fios-6kMGJ - 0 0 unknown 0 unknown S
gpy-wlan-64b0 - 0 0 unknown 0 unknown S
Pomerantzhome - 0 0 unknown 0 unknown S
ClientScape - 0 0 unknown 0 unknown S
Marilyn's iPhone - 0 0 unknown 0 unknown S
NETGEAR77 - 0 0 unknown 0 unknown S
RuuviGatewayD828 - 0 0 unknown 0 unknown S
Omega-CFDC - 0 0 unknown 0 unknown S
disabled-plus - 0 0 unknown 0 unknown S
iPhone - 0 0 unknown 0 unknown S
Fios-X6Vcm - 0 0 unknown 0 unknown S
Telekom_FlyNet - 0 0 unknown 0 unknown S
FiOS-E3V4C - 0 0 unknown 0 unknown S
RuuviCollector 1.1 - 0 0 unknown 0 unknown S
Meckanation - 0 0 unknown 0 unknown S
TP-Link_68F4 - 0 0 unknown 0 unknown S
dlink-CA9E - 0 0 unknown 0 unknown S
Fios-fN4Lr - 0 0 unknown 0 unknown S
Fios-2YjV6 - 0 0 unknown 0 unknown S
Tesla Guest - 0 0 unknown 0 unknown S
_Free EWR WiFi - 0 0 unknown 0 unknown S
Fios-IETFS_EXT - 0 0 unknown 0 unknown S
NJU Guest - 0 0 unknown 0 unknown S
rscguest - 0 0 unknown 0 unknown S
MeckTravel - 0 0 unknown 0 unknown S
gpy-wlan-7b7c - 0 0 unknown 0 unknown S
Fios-2YjV6_EXT - 0 0 unknown 0 unknown S
HBH-Guestnet - 0 0 unknown 0 unknown S
Dennis's iPhone - 0 0 unknown 0 unknown S
Fios-IETFS - 0 0 unknown 0 unknown S
Verizon_HHS9BK - 0 0 unknown 0 unknown S
thefamishedfrog.com - 0 0 unknown 0 unknown S
Pomerantzhome_5GEXT - 0 0 unknown 0 unknown S
RuuviGateway D829 - 0 0 unknown 0 unknown S
Verizon_J4Y7JG - 0 0 unknown 0 unknown S
brew install jaisonerick/tap/macwifi-cli
==> Auto-updating Homebrew...
Adjust how often this is run with `$HOMEBREW_AUTO_UPDATE_SECS` or disable with
`$HOMEBREW_NO_AUTO_UPDATE=1`. Hide these hints with `$HOMEBREW_NO_ENV_HINTS=1` (see `man brew`).
==> Would install 1 formula:
macwifi-cli
==> Fetching downloads for: macwifi-cli XX Formula macwifi-cli (1.0.0) Verified 1.3MB/ 1.3MB
==> Installing macwifi-cli from jaisonerick/tap
==> Caveats macwifi-cli only supports macOS 13+ on Apple Silicon. OK
-
brew install jaisonerick/tap/macwifi-cli
==> Auto-updating Homebrew...
Adjust how often this is run with `$HOMEBREW_AUTO_UPDATE_SECS` or disable with
`$HOMEBREW_NO_AUTO_UPDATE=1`. Hide these hints with `$HOMEBREW_NO_ENV_HINTS=1` (see `man brew`).
==> Would install 1 formula:
macwifi-cli
==> Fetching downloads for: macwifi-cli
XX Formula macwifi-cli (1.0.0) Verified 1.3MB/ 1.3MB
==> Installing macwifi-cli from jaisonerick/tap
==> Caveats
macwifi-cli only supports macOS 13+ on Apple Silicon.
-
The first run of `macwifi-cli scan` triggers the macOS Location Services prompt.
Approve it to receive real BSSIDs back from future scans.
You can review the permission any time at:
System Settings > Privacy & Security > Location Services
==> Summary
XX /opt/homebrew/Cellar/macwifi-cli/1.0.0: 6 files, 3.1MB, built in 1 second
==> Running `brew cleanup macwifi-cli`...
Disable this behaviour by setting `HOMEBREW_NO_INSTALL_CLEANUP=1`.
Hide these hints with `HOMEBREW_NO_ENV_HINTS=1` (see `man brew`).
==> `brew cleanup` has not been run in the last 30 days, running now...
Disable this behaviour by setting `HOMEBREW_NO_INSTALL_CLEANUP=1`.
Hide these hints with `HOMEBREW_NO_ENV_HINTS=1` (see `man brew`).
Removing: /opt/homebrew/Cellar/bdw-gc/8.2.4... (73 files, 1.8MB)
Removing: /opt/homebrew/Cellar/libtool/2.4.7... (75 files, 4.0MB)
Removing: /opt/homebrew/Cellar/m4/1.4.19... (13 files, 760.3KB)
Removing: /opt/homebrew/Cellar/ncurses/6.3... (3,968 files, 10MB)
Removing: /Users/dgerman/Library/Caches/Homebrew/portable-ruby-4.0.5_1.arm64_big_sur.bottle.tar.gz... (12.7MB)
Removing: /Users/dgerman/Library/Caches/Homebrew/bootsnap/0ea... (1,063 files, 9.7MB)
Removing: /Users/dgerman/Library/Caches/Homebrew/bootsnap/f181... (1,060 files, 9.6MB)
Removing: /Users/dgerman/Library/Caches/Homebrew/bootsnap/148d3... (1,043 files, 9.4MB)
Removing: /Users/dgerman/Library/Logs/Homebrew/openssl@3... (64B)
Removing: /Users/dgerman/Library/Logs/Homebrew/ca-certificates... (64B)
Removing: /Users/dgerman/Library/Logs/Homebrew/gnutls... (64B)
dgerman@smac14 dgerman % brew install jaisonerick/tap/macwifi-cli