I'm trying to gather information about surrounding access points
but can't find the right tools to do that.
For Linux there are tools like iwconfig and iwlist, but it looks like they are not available for MacOS.
I am not entirely sure what you want to achieve, but with airport you can obtain various information from wireless networks/your connection:
e.g.
sudo airport -s gives information about all the networks in range (such as RSSI strength).
sudo airport -I gives information about your connection, e.g.:
agrCtlRSSI: -66
agrExtRSSI: 0
agrCtlNoise: -93
agrExtNoise: 0
state: running
op mode: station
lastTxRate: 351
maxRate: 1300
lastAssocStatus: 0
802.11 auth: open
link auth: wpa2-psk
BSSID: aa:bb:cc:11:22:33
SSID: mycoolwifi
MCS: 2
guardInterval: 400
NSS: 3
channel: 48,80
The path to airport is:
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport
Under macOS 10.14.6, the SSID of the network you are currently connected to can be gathered with the following command:
ioreg -l -n AirPortDriver | grep IO80211SSID | sed 's/^.*= "\(.*\)".*$/\1/; s/ /_/g