πŸš€ Big News:Socket Has Acquired Secure Annex.Learn More β†’
Socket
Book a DemoSign in
Socket

wifi-cli-macos

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wifi-cli-macos

Wi-Fi CLI MacOS is a command line utility for managing network connections on MacOS

latest
Source
npmnpm
Version
2.3.2
Version published
Weekly downloads
13
-70.45%
Maintainers
1
Weekly downloads
Β 
Created
Source

πŸ›œ Wi-Fi CLI MacOS

Wi-Fi CLI MacOS is a command line utility for managing network connections on MacOS.

npm version CI License: MIT

Screenshot

Features

  • πŸ“‘ Scan and connect to nearby Wi-Fi networks
  • πŸ“± Detect nearby iPhone hotspots via BLE
  • πŸ”’ Manage your saved networks and retrieve passwords from keychain
  • 🌐 Configure DNS, IP, MAC, and router addresses
  • πŸ” Built-in DNS presets (Cloudflare, Google, OpenDNS, Quad9)
  • πŸ“· Generate QR codes to share your Wi-Fi
  • πŸš€ Run speed tests against Apple servers
  • 🎭 Spoof your MAC address

Commands

wifi connect (c) [network] [password]  # Connect to a Wi-Fi network
wifi disconnect (dc)                   # Disconnect from current Wi-Fi network
wifi dns [servers...]                  # Display or set DNS servers
wifi forget (f) [network]              # Forget a Wi-Fi network
wifi info (i)                          # Display current Wi-Fi connection details
wifi ip [address]                      # Display or set IP address
wifi list (ls)                         # List nearby Wi-Fi networks
wifi mac [address]                     # Display or set MAC address
wifi on                                # Turn Wi-Fi on
wifi off                               # Turn Wi-Fi off
wifi password (p) [network]            # Display Wi-Fi network password
wifi qr                                # Display a QR code to join the network
wifi reset [target]                    # Reset DNS, IP, MAC, router to defaults
wifi restart (r)                       # Turn Wi-Fi off and on again
wifi router [address]                  # Display or set router address
wifi saved (s)                         # List saved Wi-Fi networks
wifi spoof                             # Randomize MAC address
wifi test (t)                          # Test network upload/download speed

Installation

brew install stevelacey/tap/wifi-cli

Or via npm:

npm install -g wifi-cli-macos

Xcode Command Line Tools are required. If not installed, you'll be prompted on first use.

Basic usage

wifi list
Network 1  ▁▂▃▄▅▆  2.4/5GHz  WPA2
Network 2  ▁▂▃▄▅▆  5GHz      WPA2/3
Network 3  ▁▂▃▄    2.4GHz    WPA2

Running wifi connect with no arguments opens an interactive network selector:

β—†  Select a network to join
β”‚  ● Network 1 ▁▂▃▄▅▆  2.4/5GHz  WPA2
β”‚  β—‹ Network 2 ▁▂▃▄▅▆  5GHz      WPA2/3
β”‚  β—‹ Network 3 ▁▂▃▄    2.4GHz    WPA2

Or supply credentials directly:

wifi connect "Network 1" password

Connection details

wifi info
Network:  Network 1
IP:       192.168.1.100 (dhcp)
Router:   192.168.1.1
DNS:      1.1.1.1 1.0.0.1 (default: 192.168.1.1)
MAC:      a1:b2:c3:d4:e5:f6 (default: b0:be:83:12:9c:d6)

DNS

wifi dns
Current: 1.1.1.1 1.0.0.1
Default: 192.168.1.1
Presets:
  cloudflare:  1.1.1.1 1.0.0.1
  google:      8.8.8.8 8.8.4.4
  opendns:     208.67.222.222 208.67.220.220
  quad9:       9.9.9.9 149.112.112.112
wifi dns cloudflare
wifi dns 1.1.1.1 8.8.8.8
wifi reset dns

IP, router, and MAC

wifi ip 192.168.1.99
wifi router 192.168.1.254
wifi mac a1:b2:c3:d4:e5:f6
wifi spoof
wifi reset ip
wifi reset mac

QR code

wifi qr
Network:  Network 1
Password: hunter2
[QR code]

Speed test

wifi test
156.1 Mbps ↓ / 45.2 Mbps ↑ (12 ms)

Keywords

cli

FAQs

Package last updated on 16 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts