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 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 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.

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

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.5.1.tar.gz (12.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.5.1-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wifi_priority_tui-0.5.1.tar.gz
  • Upload date:
  • Size: 12.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.5.1.tar.gz
Algorithm Hash digest
SHA256 1ecc74dc8cc0174646d7c10b4460efc9ee2dbd1577b38a863bcb9b3702bbad6b
MD5 d6c40e556a12c6d10ed90578398f9fe1
BLAKE2b-256 3f21195e5c74ab9b197bc63ec46da0b61b79754a7abbfc98e2e7841623152a6f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wifi_priority_tui-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 25294687a26e5710ca441f032289eb19266c1b83cb617ef511ff10ccdf0b41b4
MD5 cbdfc00221f2e1b502f6302ec2f6af3c
BLAKE2b-256 e8d46d417522229e9c6b2ed0c83555db54b2ff726c6fdf53e381c10f28926e7a

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