https://github.com/tuladhar/macos-wifi-cli
A command-line tool for managing Wi-Fi in macOS
https://github.com/tuladhar/macos-wifi-cli
hacktoberfest macos wifi wifi-cli wireless
Last synced: about 1 year ago
JSON representation
A command-line tool for managing Wi-Fi in macOS
- Host: GitHub
- URL: https://github.com/tuladhar/macos-wifi-cli
- Owner: tuladhar
- License: mit
- Created: 2016-04-19T10:45:28.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2020-10-05T12:49:17.000Z (over 5 years ago)
- Last Synced: 2025-04-01T03:42:10.865Z (about 1 year ago)
- Topics: hacktoberfest, macos, wifi, wifi-cli, wireless
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 11
- Watchers: 4
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wifi-cli
A command-line tool for managing Wi-Fi in macOS
```
usage: wifi-cli [-h] [-v] [-i INTERFACE]
{history,preferred,showpass,scan,join,disconnect,status,info,mac,power}
...
A command-line tool for managing Wi-Fi in macOS
positional arguments:
{history,preferred,showpass,scan,join,disconnect,status,info,mac,power}
available commands
history list joined wireless networks history
preferred list preferred wireless networks
showpass show wireless network password stored in keychain
scan scan for wireless networks
join join a wireless network
disconnect disconnect from a wireless network (requires root)
status show currently connected wireless network
info show info about currently connected wireless network
mac show Wi-Fi device hardware (MAC) address
power control Wi-Fi device power state
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-i INTERFACE If an interface is not specified, wifi-cli will use
the first Wi-Fi interface on the system.
```
## Install
```
git clone https://github.com/tuladhar/wifi-cli
cd wifi-cli
make install
```
## Uninstall
```
cd wifi-cli
make uninstall
```
## Scan for wireless networks
```
$ wifi-cli scan
```
## List joined wireless networks history
```
$ wifi-cli history
```
## Join an open wireless network
```
$ wifi-cli join -h
usage: wifi-cli join [-h] network password
positional arguments:
network network name
password network password
optional arguments:
-h, --help show this help message and exit
```
```
$ wifi-cli join "insecure-network" ""
```
## Join a protected wireless network
```
$ wifi-cli join "protected-network" "secret-password"
```
## Disconnect from a wireless network (requires root)
```
$ sudo wifi-cli disconnect
```
## Control Wi-Fi Power
```
$ wifi-cli power status
Wi-Fi device en1 is currently powered on
```
```
$ wifi-cli power off
Wi-Fi device en1 powered off
```
```
$ wifi-cli power on
Wi-Fi device en1 powered on
```
# Authors
* Puru Tuladhar