Current Wi-Fi network
Uses networksetup -getairportnetwork en0 and extracts the SSID after the colon.
macOS Wi-Fi Credential Utility
Wi-Fi Info reads the currently connected Wi-Fi SSID and asks macOS Keychain for the matching saved network password, then displays and saves the result locally.
Installation
Copy and paste this command into Terminal to install the Melding Software Mac scripts.
After reopening Terminal, type MeldingSoftware anytime to load the list.
curl -fsSL https://raw.githubusercontent.com/MeldingSoftware/Scripts/main/Mac/install.sh | bash
Because this command downloads and immediately runs a shell installer, you can review install.sh in the GitHub repository before executing it. Individual scripts may also request permissions, administrator access, Keychain authorization, Full Disk Access, or other macOS approvals depending on what the selected tool needs.
Documentation
Uses networksetup -getairportnetwork en0 and extracts the SSID after the colon.
The current script assumes the Wi-Fi interface is en0. Macs with a different Wi-Fi interface assignment may not return the expected SSID.
Documentation
Uses the macOS security command with the current SSID to locate the matching generic-password item.
macOS Keychain may prompt the user to allow access before a saved password is revealed.
When retrieved, the password is printed in the Terminal.
Documentation
Writes Wi-Fi_Info.txt in the same directory as the shell script.
The text file contains a Wi-Fi SSID line and a Wi-Fi Password line.
The current script contains no network upload or API logic.
FAQ
No. The current version targets the currently connected SSID.
From the Mac's local Keychain through the security command.
Keychain protects saved credentials and can require authorization before revealing them.
Beside the Wi-Fi Info script as Wi-Fi_Info.txt.