~
The ports TUI listing 21 listening ports in a table of port, PID, process, protocol, address, type and service, with the nginx row on port 80 selected and a footer showing refresh time and sort order.
back to projects

oss project

Project status: stable

ports

Keyboard-driven TUI for exploring listening ports on macOS and Linux.

install

$ brew install shahadulhaider/tap/ports
Go
github.com/shahadulhaider/ports
Homebrew
shahadulhaider/tap/ports
fig. 02
Typing into the filter prompt narrows the port table in real time, matching on both port number and process name.
The / prompt, mid-query — the table below is already narrowed.
fig. 03
Cycling the sort column through port, PID and process, then merging duplicate IPv4 and IPv6 rows for the same listener into one.
Sorted by process, with IPv4/IPv6 duplicates merged into one row.
fig. 04
Selecting a process and pressing k sends SIGTERM, then SIGKILL when the process does not exit; the row disappears from the table.
The k confirmation on the selected holder — SIGTERM first, SIGKILL if it clings on.
fig. 05
Diff mode marking which ports opened and which closed since the snapshot was taken.
Diff mode shows what opened and closed since the snapshot.

What it does

ports

A Bubble Tea TUI listing every listening port with the process holding it. Vim-style keybindings to filter, sort, and operate on rows:

  • / to filter by port or process name
  • k to kill a process (graceful, then forceful)
  • o to open the port in the default browser (http://localhost:PORT)
  • t to toggle TCP/UDP view
  • live auto-refresh

Useful when you have five dev servers running and need to find the one hogging 3000.

brew install shahadulhaider/tap/ports