Is there a way to get BSSID and the list of available Wi-Fi networks from within Terminal?
I.e. I'm looking for something similar to
ifconfig run0 scan on OpenBSD, which lists all access points, BSSID, signal strength etc.
There's an airport utility buried that you'll want to use. Create a symbolic link in /usr/bin to the utility for quick access with this command:
Now, you should be able to run
If you hold the option key while opening the WiFi networks in the Menu Bar, you can also see the BSSIDs one at a time, although it seems like you wanted the CLI-like version from OpenBSD.