Scan, browse, and connect to Wi-Fi networks without leaving Raycast.
- Scan for nearby networks with live signal strength and security type
- See the currently connected network at a glance
- One-keystroke connect to open and previously joined networks
- Password prompt for new secured networks
- Toggle the Wi-Fi radio on and off (
⌘⇧W)
macOS with a Wi-Fi interface. On first run, macOS asks Raycast for Location Services access — CoreWLAN requires it to report network names. Without it, scanning still works but the connected network cannot be identified.
Grant it under System Settings → Privacy & Security → Location Services → Raycast.
| Concern | Implementation |
|---|---|
| Scanning | assets/wifi-scan.swift, run interpreted via /usr/bin/swift so CoreWLAN inherits Raycast's Location Services authorisation |
| Connecting | networksetup -setairportnetwork, invoked with an argument vector (no shell) |
| Known networks | networksetup -listpreferredwirelessnetworks |
| Disconnecting | Power cycling the interface — macOS exposes no supported "leave network" API |
src/
├── scan-wifi.tsx Command entry point (view composition only)
├── types.ts Domain types
├── hooks/use-wifi.ts Scan state + all mutating actions
├── lib/
│ ├── wifi.ts networksetup / scan process invocation
│ ├── parse.ts Scan and networksetup output parsing
│ ├── signal.ts RSSI → icon, colour, label
│ └── toast.ts withToast() progress-toast wrapper
└── components/ Presentational list item, form, shared actions
assets/wifi-scan.swift CoreWLAN scanner
npm install
npm run dev # Raycast dev mode with hot reload
npm run lint # ESLint + Prettier
npm run typecheck # tsc --noEmit
npm run build