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.3.tar.gz (7.3 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.3-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wifi_priority_tui-0.2.3.tar.gz
  • Upload date:
  • Size: 7.3 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.3.tar.gz
Algorithm Hash digest
SHA256 73425e41066d7999d9021b8f1fd139abcae250f04c46709eedf9e999d1e5ec4d
MD5 3aa9aa12e577f222426acca783f856dd
BLAKE2b-256 d7fc0f468f20a7e25cf7e81b96a5d04a263f3cda7707fcd21122395285723361

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wifi_priority_tui-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 345a277fffb730eb43aa8dcf9b28c0f84d44abfc815098f061d54b538b1a765d
MD5 619a951df2aee770189c61dd14aaee15
BLAKE2b-256 bce042209c879ae1d83b9d568f65848b6eacfcb6dacfecd2bdc970099721c320

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