macOS Wi-Fi Credential Utility

Wi-Fi Info

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.

Platform
macOS
Network
Current Wi-Fi
Credential source
macOS Keychain
Output
Wi-Fi_Info.txt
Important: The generated file can contain a Wi-Fi password in clear text. Use this only on a Mac and network you own or are authorized to manage, and protect or delete the output when it is no longer needed.

Installation

Using the Melding Software Mac installer

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

SSID lookup

Current Wi-Fi network

Uses networksetup -getairportnetwork en0 and extracts the SSID after the colon.

Interface assumption

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

Password lookup

Keychain query

Uses the macOS security command with the current SSID to locate the matching generic-password item.

Authorization can be requested

macOS Keychain may prompt the user to allow access before a saved password is revealed.

Clear-text display

When retrieved, the password is printed in the Terminal.

Documentation

Output

Saved beside the script

Writes Wi-Fi_Info.txt in the same directory as the shell script.

SSID and password

The text file contains a Wi-Fi SSID line and a Wi-Fi Password line.

No external transmission

The current script contains no network upload or API logic.

FAQ

Frequently asked questions

Does it show every saved network?

No. The current version targets the currently connected SSID.

Where does the password come from?

From the Mac's local Keychain through the security command.

Why might macOS prompt me?

Keychain protects saved credentials and can require authorization before revealing them.

Where is the text file?

Beside the Wi-Fi Info script as Wi-Fi_Info.txt.

← Back to Mac Scripts