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.2.2.tar.gz (7.2 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.2.2-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wifi_priority_tui-0.2.2.tar.gz
  • Upload date:
  • Size: 7.2 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.2.2.tar.gz
Algorithm Hash digest
SHA256 a5000c1b23a7e4853bc78f82017de1a89fcaf814dfedc05d7f8ecea25614c33f
MD5 fc92e457373427067fd0288983fffbbf
BLAKE2b-256 0d089e3ed991cacac253970d1c7b10c5be73fc85a94ee19dc19fe947e5b0e521

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wifi_priority_tui-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4857fb6e1a376d026e543a6a0344fbbd1a2063c3265c903bc544b6b12bee9a1c
MD5 535c2356ca4725ec6391960fd395d071
BLAKE2b-256 fea0508dd0ec256a47e5684d9348ba6ec17c0f2b377757583f6b8262e516bb85

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