Skip to content

Repository files navigation

lilnet icon

lilnet

A tiny macOS menu bar app that shows which local ports are listening.

Every localhost dev server, database, and stray background tool — in one click.

Download macOS 14+ Swift 6


lilnet popover listing listening ports with process names and pids

What it does

  • Live list of listening TCP ports — refreshed every few seconds.
  • Knows what's running — shows the owning process, its pid, and the page title for local web servers.
  • One click to open — hover a row to launch http://localhost:<port>, or copy the address.
  • Stop a runaway process — graceful SIGTERM to the validated owner, after you confirm.
  • Network-exposed warning — a 🌐 marks ports bound to *, reachable beyond loopback.
  • Noise filter — system and background services are hidden behind a toggle.

Install

Download (recommended)

  1. Grab lilnet.app.zip from the latest release.
  2. Unzip and drag lilnet.app to /Applications.
  3. The build is unsigned, so the first launch needs: right-click → Open → Open.

The icon appears in the menu bar — there is no Dock icon and no main window.

Build from source

git clone https://github.com/adeoh/lilnet.git
cd lilnet
make bundle     # produces lilnet.app
open lilnet.app

make run builds and launches in one step for development.

Requires macOS 14 (Sonoma) or later and a Swift 6 toolchain.

Launch at login

System Settings → General → Login Items → add lilnet.app.

How it works

PortScanner polls lsof -nP -iTCP -sTCP:LISTEN -F pcPnt, parses the field-formatted output, and publishes a deduplicated list of ListeningPort values. PortTerminator re-validates the pid/port pair immediately before signalling, so a recycled pid never gets killed by mistake. The UI is pure SwiftUI (MenuBarExtra) running as a menu-bar accessory.

No daemons, no network calls, no telemetry. Just lsof.

Project layout

File Purpose
Sources/lilnet/lilnetApp.swift App entry point + menu bar label
Sources/lilnet/MenuContentView.swift Pop-over UI and port rows
Sources/lilnet/PortScanner.swift lsof polling + parsing
Sources/lilnet/ListeningPort.swift Model for one listening port
Sources/lilnet/PortTerminator.swift Listener validation + graceful termination
swift test      # run the test suite

Ideas / next steps

  • Remember a friendly name per port (e.g. "web", "api")
  • Notifications when a new port opens

License

MIT — see LICENSE.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages