- Python 98.5%
- PowerShell 1.5%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
Build exe / build (push) Successful in 1m13s
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> |
||
| .forgejo/workflows | ||
| .gitignore | ||
| build.ps1 | ||
| build.py | ||
| mdns.py | ||
| mdns_scan.py | ||
| mdns_tui.py | ||
| README.md | ||
| requirements-build.txt | ||
| requirements.txt | ||
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 |