Skip to main content

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 networksetup command)
  • Python 3.8+
  • WiFi adapter (typically en0)

How It Works

The app:

  1. Reads your current WiFi network priority list from macOS
  2. Displays them in an interactive TUI
  3. Lets you reorder them with keyboard shortcuts
  4. Applies changes using sudo networksetup commands

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

Contributing

Issues and pull requests welcome!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wifi_priority_tui-0.3.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wifi_priority_tui-0.3.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file wifi_priority_tui-0.3.0.tar.gz.

File metadata

  • Download URL: wifi_priority_tui-0.3.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for wifi_priority_tui-0.3.0.tar.gz
Algorithm Hash digest
SHA256 18cb12415b47373328d510f3ccc3a7fed7ccf5852035297327ac9ecfce2c5676
MD5 2ceec555c3b896615ce2026c7809f6fc
BLAKE2b-256 874ed6fabd750b4c1fb1f05f0a9ee7ad0730d7c49a008f27c393345c2b327bc9

See more details on using hashes here.

File details

Details for the file wifi_priority_tui-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for wifi_priority_tui-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aadfc490d731b1804248ad3065dc6d3e484db1f253b016ef395af4609a884606
MD5 5be4eecd73c06f6a9b9f222c9274510a
BLAKE2b-256 4af3a83e7493bfbe332710550c9021fa17091fe0d9d4bee5cabd7f603e6d72ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page