WiFi Priority TUI
Interactive terminal UI for reordering macOS WiFi network priorities.
Also available: Native SwiftUI macOS app in the WiFiPrioritySwiftUI/ directory!
Features
- 🎨 Beautiful terminal interface using Textual
- ⌨️ Keyboard-driven navigation (vim-style keys supported)
- 🔄 Real-time reordering with visual feedback
- 💾 Applies changes directly to macOS network preferences
- 🛡️ Safe: shows unsaved changes before exit
Installation
Using Homebrew (recommended for macOS)
brew install dhruv-anand-aintech/tap/wifi-priority-tui
Using uv
uv pip install wifi-priority-tui
Using pip
pip install wifi-priority-tui
From source
git clone https://github.com/dhruv-anand-aintech/wifi-priority-tui
cd wifi-priority-tui
uv pip install -e .
Usage
Important: This app requires administrator privileges to modify network settings.
sudo wifi-priority
If you try to run without sudo, the app will exit with instructions.
Keyboard Controls
- ↑/↓ or k/j - Navigate through networks
- Ctrl+↑ or Ctrl+k - Move selected network up (higher priority)
- Ctrl+↓ or Ctrl+j - Move selected network down (lower priority)
- s - Save changes and exit
- q - Quit without saving
Requirements
- macOS (uses
networksetupcommand) - Python 3.8+
- WiFi adapter (typically
en0)
How It Works
The app:
- Reads your current WiFi network priority list from macOS
- Displays them in an interactive TUI
- Lets you reorder them with keyboard shortcuts
- Applies changes using
sudo networksetupcommands
Networks at the top of the list have higher priority. macOS will automatically connect to the highest priority network available.
Two Versions Available
🖥️ TUI (Terminal) - This Package
Python-based terminal interface with keyboard-driven navigation. Perfect for terminal enthusiasts and SSH sessions.
Install via pip:
pip install wifi-priority-tui
sudo wifi-priority
🎨 SwiftUI (Native macOS)
Native macOS app with drag-and-drop interface.
Install via Homebrew:
brew install --cask dhruv-anand-aintech/tap/wifi-priority
First Launch - Gatekeeper Warning: When launching for the first time, macOS may show a warning about the app not being verified. This is normal for ad-hoc signed apps. Remove the quarantine flag:
xattr -d com.apple.quarantine /Applications/WiFi\ Priority.app
Then launch the app normally - no warning on subsequent launches.
Or build from source - see WiFiPrioritySwiftUI/ for details.
Why?
macOS System Settings lets you reorder WiFi networks, but it's buried deep in menus and requires lots of clicking. These tools make it quick and easy.
TUI version is perfect for users who:
- Switch between multiple WiFi networks frequently
- Want to prioritize work/home networks
- Need to prevent auto-connecting to certain networks
- Prefer terminal interfaces
- Work primarily in SSH sessions
SwiftUI version is great for users who:
- Prefer native macOS apps
- Like drag-and-drop interfaces
- Want a visual representation
- Use macOS GUI primarily
Screenshots
╭──────────────────────────────────────────────────────────╮
│ 🛜 WiFi Network Priority Manager │
├──────────────────────────────────────────────────────────┤
│ 📋 Drag networks to change priority (higher = preferred) │
│ Use ↑↓ or k/j to select, Ctrl+↑↓ to move, 's' to save│
├──────────────────────────────────────────────────────────┤
│ ┏━ WiFi Networks (Priority Order) ━━━━━━━━━━━━━━━━━━━━┓ │
│ ┃ Home Network 5G ┃ │
│ ┃ ▶ Office WiFi ┃ │
│ ┃ Coffee Shop Guest ┃ │
│ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ │
│ ⚠️ Changes not saved! Press 's' to save or 'q' to quit │
╰──────────────────────────────────────────────────────────╯
License
MIT License - see LICENSE file for details
Related Projects
- wifi-failover-utility - Automatic WiFi failover to Android hotspot
Contributing
Issues and pull requests welcome!
Metadata
Release files for wifi-priority-tui 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wifi_priority_tui-0.5.1.tar.gz | 12.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wifi_priority_tui-0.5.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.6 kB
Release files / wifi_priority_tui-0.5.1.tar.gz
| Download URL | wifi_priority_tui-0.5.1.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ecc74dc8cc0174646d7c10b4460efc9ee2dbd1577b38a863bcb9b3702bbad6b
|
|
BLAKE2b-256 checksum How to use checksums |
3f21195e5c74ab9b197bc63ec46da0b61b79754a7abbfc98e2e7841623152a6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / wifi_priority_tui-0.5.1-py3-none-any.whl
| Download URL | wifi_priority_tui-0.5.1-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
25294687a26e5710ca441f032289eb19266c1b83cb617ef511ff10ccdf0b41b4
|
|
BLAKE2b-256 checksum How to use checksums |
e8d46d417522229e9c6b2ed0c83555db54b2ff726c6fdf53e381c10f28926e7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|