I used this command yesterday to list nearby networks but now it doesn't work today: /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport --scan. I did some looking up and some users had issues with this on Monterey, I'm on Sonoma.