No description
  • Python 98.5%
  • PowerShell 1.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Sašo Domadenik dca7dac47a
All checks were successful
Build exe / build (push) Successful in 1m13s
TUI: leave the mouse to the terminal by default, add --mouse
Textual's mouse tracking stops Windows Terminal's own text selection and
right-click copy from working. It is now off unless --mouse is passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 15:26:54 +01:00
.forgejo/workflows CI: run the exe build on the linux-amd64 runner label 2026-12-03 15:06:38 +01:00
.gitignore mDNS service browser: TUI, CLI scanner and Windows exe build 2026-12-03 15:00:25 +01:00
build.ps1 Build the exe on a Linux runner with Windows Python under Wine 2026-12-03 15:04:48 +01:00
build.py Build the exe on a Linux runner with Windows Python under Wine 2026-12-03 15:04:48 +01:00
mdns.py mDNS service browser: TUI, CLI scanner and Windows exe build 2026-12-03 15:00:25 +01:00
mdns_scan.py mDNS service browser: TUI, CLI scanner and Windows exe build 2026-12-03 15:00:25 +01:00
mdns_tui.py TUI: leave the mouse to the terminal by default, add --mouse 2026-12-03 15:26:54 +01:00
README.md TUI: leave the mouse to the terminal by default, add --mouse 2026-12-03 15:26:54 +01:00
requirements-build.txt mDNS service browser: TUI, CLI scanner and Windows exe build 2026-12-03 15:00:25 +01:00
requirements.txt mDNS service browser: TUI, CLI scanner and Windows exe build 2026-12-03 15:00:25 +01:00

mdns

Discover mDNS / DNS-SD (Bonjour, Avahi) services on the local network. It comes as an interactive terminal UI and a one-shot command-line scanner, both packaged as a single Windows exe.

Usage

mdns.exe                      # live table of services, grouped by type
mdns.exe -s _http._tcp        # only browse one service type
mdns.exe scan -t 10 -v        # one-shot scan for 10 s, with TXT records
mdns.exe scan --list-types    # list advertised service types
mdns.exe scan --watch --json  # stream add/remove events as JSON Lines

TUI keys: arrows move · Enter/Space expand or collapse a group · / filter · Esc clear filter · e/c expand/collapse all · r rescan · s save JSON · q quit.

The TUI leaves the mouse to the terminal by default, so you can select text and right-click to copy as usual. Run mdns.exe --mouse to let the app handle clicks and scrolling instead.

The first time it runs, Windows Firewall asks whether to allow mdns.exe. Allow it, otherwise incoming mDNS replies are blocked and no services show up.

Running from source

python -m venv .venv
.\.venv\Scripts\pip install -r requirements.txt
.\.venv\Scripts\python mdns_tui.py        # TUI
.\.venv\Scripts\python mdns_scan.py -v    # CLI

Building the exe

.\.venv\Scripts\pip install -r requirements-build.txt
.\build.ps1                               # -> dist\mdns.exe

All PyInstaller options live in build.py; build.ps1 just runs it from the venv.

The Forgejo Actions workflow in .forgejo/workflows/build.yml builds the exe on a Linux runner (label linux-amd64) inside tobix/pywine, running Windows Python under Wine (wine python build.py), and uploads mdns.exe as a build artifact.

Files

File Purpose
mdns_scan.py Scanner core and the one-shot CLI
mdns_tui.py Textual TUI
mdns.py Exe entry point: scan runs the CLI, anything else the TUI
build.py PyInstaller build (single file, trimmed); runs on Windows or under Wine
build.ps1 Windows convenience wrapper for build.py