Interactive TUI for reordering macOS WiFi network priorities
Project description
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 uv (recommended)
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.
๐จ SwiftUI (Native macOS)
Native macOS app with drag-and-drop interface. 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!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wifi_priority_tui-0.4.0.tar.gz.
File metadata
- Download URL: wifi_priority_tui-0.4.0.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
789945c3097465e6768301295210cfe14b066562266646dfdbcc789b0f69cbf9
|
|
| MD5 |
5ac627230af90007603562c3dba201af
|
|
| BLAKE2b-256 |
4935bd09cb1edc4a28a40030279c6673ec09e03c1095e8709dde4a7bd152c51c
|
File details
Details for the file wifi_priority_tui-0.4.0-py3-none-any.whl.
File metadata
- Download URL: wifi_priority_tui-0.4.0-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4a8ba51210e68d0d5fced8ca26c636aeec34fce08e6eb66cc3e8a219a8aa3ee
|
|
| MD5 |
075cf9416f8d7b5a097d2a954b297656
|
|
| BLAKE2b-256 |
62a86e1bca267512c33765a75bd8e1d0218693bb204f87c551a6137991240333
|