{"id":49552294,"url":"https://github.com/jaisonerick/macwifi-cli","last_synced_at":"2026-05-02T23:44:29.520Z","repository":{"id":353171817,"uuid":"1218269754","full_name":"jaisonerick/macwifi-cli","owner":"jaisonerick","description":"A drop-in airport replacement for macOS 13+. Scan Wi-Fi networks, inspect the current connection, and read saved Keychain passwords from the terminal.","archived":false,"fork":false,"pushed_at":"2026-04-22T18:30:42.000Z","size":16,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-02T23:44:23.158Z","etag":null,"topics":["airport","bssid","cli","corewlan","golang","homebrew","macos","sequoia","sonoma","terminal","wifi"],"latest_commit_sha":null,"homepage":"https://jaisonerick.github.io/macwifi","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaisonerick.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-22T17:50:31.000Z","updated_at":"2026-04-28T01:57:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jaisonerick/macwifi-cli","commit_stats":null,"previous_names":["jaisonerick/macwifi-cli"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jaisonerick/macwifi-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaisonerick%2Fmacwifi-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaisonerick%2Fmacwifi-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaisonerick%2Fmacwifi-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaisonerick%2Fmacwifi-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaisonerick","download_url":"https://codeload.github.com/jaisonerick/macwifi-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaisonerick%2Fmacwifi-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32553690,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T22:28:24.418Z","status":"ssl_error","status_checked_at":"2026-05-02T22:28:14.225Z","response_time":132,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["airport","bssid","cli","corewlan","golang","homebrew","macos","sequoia","sonoma","terminal","wifi"],"created_at":"2026-05-02T23:44:28.173Z","updated_at":"2026-05-02T23:44:29.511Z","avatar_url":"https://github.com/jaisonerick.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# macwifi-cli\n\n[![CI](https://github.com/jaisonerick/macwifi-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/jaisonerick/macwifi-cli/actions/workflows/ci.yml)\n\nA command-line replacement for the parts of `airport` most people\nused: scan nearby Wi-Fi networks, inspect the current connection,\nand read saved Keychain passwords. Works on macOS 13+, returns real\nBSSIDs, no `sudo` required.\n\n```sh\nbrew install jaisonerick/tap/macwifi-cli\n\nmacwifi-cli scan\nmacwifi-cli info\nmacwifi-cli password \"MyHomeWiFi\"\n```\n\n## Why this exists\n\nmacOS 14.4 removed `/usr/libexec/airport`. `wdutil info` returns\n`BSSID : \u003credacted\u003e` even with `sudo`. `networksetup` doesn't list\nnearby networks. The Apple-recommended path (CoreWLAN's\n`scanForNetworks`) only returns real BSSIDs to apps signed with a\nstable Developer ID that have Location Services permission — which\nshell scripts and unsigned CLIs can't get\n([Apple DTS forum thread][apple-dts]).\n\n`macwifi-cli` is a thin wrapper around the\n[`macwifi`](https://github.com/jaisonerick/macwifi) Go library, which\nembeds a Developer-ID-signed and notarized helper bundle to satisfy\nmacOS Location Services. The first scan you run will pop the system\nLocation Services prompt; after that, `macwifi-cli scan` returns\nreal data.\n\n[apple-dts]: https://developer.apple.com/forums/thread/718331\n\n## Install\n\n### Homebrew (recommended)\n\n```sh\nbrew install jaisonerick/tap/macwifi-cli\n```\n\nThis pulls a pre-built `darwin/arm64` binary from the\n[`jaisonerick/homebrew-tap`](https://github.com/jaisonerick/homebrew-tap)\nformula and drops it into `/opt/homebrew/bin`. Upgrade with\n`brew upgrade macwifi-cli`.\n\n### `go install`\n\nIf you have a Go toolchain and would rather build from source:\n\n```sh\ngo install github.com/jaisonerick/macwifi-cli@latest\n```\n\nThe binary lands in `$(go env GOBIN)` (or `$GOPATH/bin`). Make sure\nthat directory is on your `$PATH`.\n\n### Pre-built binaries\n\nTarballs for tagged releases are attached to each\n[GitHub Release](https://github.com/jaisonerick/macwifi-cli/releases).\nDownload, extract, drop the binary somewhere on your `$PATH`.\n\nRequires macOS 13+ on Apple Silicon. Intel Macs are not supported.\n\n## Usage\n\n```text\nmacwifi-cli — Wi-Fi inspection for macOS 13+\n\nUsage:\n  macwifi-cli \u003ccommand\u003e [flags] [args]\n\nCommands:\n  scan              List nearby Wi-Fi networks.\n  info              Show the network the Mac is currently connected to.\n  password \u003cssid\u003e   Print the saved Keychain password for an SSID.\n  help              Show this message.\n  version           Print version information.\n\nGlobal flags:\n  --json            Emit JSON instead of a human-readable table.\n  --no-prompt-hint  Suppress the \"macOS may prompt...\" stderr hint.\n```\n\n### `scan`\n\n```sh\nmacwifi-cli scan\n```\n\n```text\nSSID                 BSSID              RSSI  CH   BAND   WIDTH  SEC   FLAGS\nOffice WiFi          aa:bb:cc:dd:ee:ff  -52   149  5GHz   80     WPA2  CS\nGuest                11:22:33:44:55:66  -71   36   5GHz   80     WPA2\nConference Room      77:88:99:aa:bb:cc  -58   100  5GHz   160    WPA3\nMyHomeWiFi           00:11:22:33:44:55  0     0    unknown 0     WPA2  S\n```\n\nThe `FLAGS` column carries `C` (currently connected) and `S` (saved\nin the preferred-networks list). Saved-but-not-visible networks show\nup with `RSSI 0` and channel fields zeroed.\n\nFor machine-readable output:\n\n```sh\nmacwifi-cli scan --json | jq '.[] | select(.rssi \u003e -65)'\n```\n\n### `info`\n\nShow only the currently connected network:\n\n```sh\nmacwifi-cli info\n```\n\n```text\nSSID         BSSID              RSSI  CH   BAND   WIDTH  SEC   FLAGS\nOffice WiFi  aa:bb:cc:dd:ee:ff  -52   149  5GHz   80     WPA2  CS\n```\n\n`macwifi-cli info --json` emits a single network object, or\n`{\"connected\": false}` if the Mac isn't on Wi-Fi.\n\n### `password`\n\nPrint the saved Keychain password for an SSID. macOS will pop its\nKeychain access dialog the first time you run this for a given\nSSID — the legacy *Always Allow* button is no longer available, so\nthe prompt fires every time.\n\n```sh\nmacwifi-cli password \"MyHomeWiFi\"\n```\n\nExit codes:\n\n- `0` — password printed to stdout.\n- `1` — error.\n- `2` — no saved entry for that SSID.\n\nJSON output:\n\n```sh\n$ macwifi-cli password \"MyHomeWiFi\" --json\n{\n  \"ssid\": \"MyHomeWiFi\",\n  \"found\": true,\n  \"password\": \"...\"\n}\n```\n\nIf you're scripting around this, use `--no-prompt-hint` to suppress\nthe friendly \"macOS may prompt\" message that goes to stderr.\n\n## First run — Location Services prompt\n\nThe first time `macwifi-cli` runs `scan` or `info`, the embedded\nhelper bundle (`WifiScanner.app`) launches and macOS shows its\nstandard Location Services dialog:\n\n\u003e **WifiScanner** wants to use your location.\n\nApprove it. From then on, scans return real BSSIDs without further\nprompts. You can revoke the permission any time from\n**System Settings → Privacy \u0026 Security → Location Services**.\n\nIf approval was missed and BSSIDs are coming back empty, open the\nhelper bundle once manually:\n\n```sh\nopen \"$TMPDIR\"/macwifi-*/WifiScanner.app\n```\n\n## Limitations\n\n- macOS 13+ on Apple Silicon. Intel Macs are not supported.\n- Doesn't work from a system-wide `launchd` daemon — CoreWLAN's\n  Location Services check is per-user-session.\n- Not a packet capture tool; for sniffing use Wireshark or the\n  Wireless Diagnostics app.\n- Doesn't connect / disconnect / change networks. This is a\n  read-only inspection tool.\n\n## How it works\n\n`macwifi-cli` calls into the [`macwifi`](https://github.com/jaisonerick/macwifi)\nGo library, which embeds a Developer-ID-signed and notarized Swift\nhelper bundle. On first use, the helper is extracted to `$TMPDIR`\nand launched via `open -W`; it dials back into the CLI on a\nloopback socket and proxies CoreWLAN scans and Keychain reads back\nto Go. See the [project documentation](https://jaisonerick.github.io/macwifi/how-it-works)\nfor the architecture in depth.\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaisonerick%2Fmacwifi-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaisonerick%2Fmacwifi-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaisonerick%2Fmacwifi-cli/lists"}