Skip to content

About

A floating network report for Rex. Press one key and the whole LAN story lands beside your work — Wi-Fi signal, IPv4/IPv6, gateway, DNS, DHCP lease, tunnels, interfaces, LAN neighbours, and who is listening on which port. Press it again for fresh data.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rex-netinfo

A floating network report for Rex. Press one key and the whole LAN story lands beside your work — Wi-Fi signal, IPv4/IPv6, gateway, DNS, DHCP lease, tunnels, interfaces, LAN neighbours, and who is listening on which port. Press it again for fresh data.

Rex with the Network Info pane open in tabs mode, Adapters tab: Wi-Fi (en1) and Ethernet (en0) groups with signal, channel, PHY, TX rate, media and MAC

What it is

The report opens as one floating pane with tabs inside it: Adapters, IPv4, IPv6, Public, Interfaces, LAN neighbours, Listening ports. Switch tabs with ←/→ or 1–9, or click one; close with q; drag-select copies text to the clipboard. Wi-Fi cards show SSID, channel, PHY generation, TX rate and RSSI with a plain-words verdict; tunnels are named (utun16 [tunnel · Tailscale]); bridges keep their networksetup labels. Everything is gathered from the system's own tools (ifconfig, route, scutil, arp, networksetup, system_profiler, lsof) through rex.exec — nothing to install, nothing runs between presses.

Features

  • Adapters tab — every real card grouped as Wi-Fi · en1 / Ethernet · en0: SSID, security, PHY generation (Wi-Fi 4/5/6/6E), channel, band, width, TX rate, RSSI + noise with a plain-words verdict, Ethernet link/media/duplex/MAC. AirDrop's awdl0/llw0 are kept out.
  • IPv4 / IPv6 tabs — gateway first, then every real port with all its addresses, DNS (first non-supplemental resolver), search domain, and DHCP lease in plain units. IPv6 marks (link) vs (global) where a port has several.
  • Public tab — your public IPv4 and IPv6 via ipify.org; pass public = false to stay fully local.
  • Named tunnels — Tailscale's utun is recognised by its route or ULA prefix and reads utun16 [tunnel · Tailscale]; others read [tunnel].
  • Named bridges — bridges get their networksetup label and member ports (bridge0 → Thunderbolt Bridge · members en2·en3·en4); VM and Docker bridges get [vm-net] / [docker] tags.
  • LAN neighbours — the ARP table, deduplicated per ip+mac, sorted numerically, capped.
  • Listening ports — one lsof pass, no sudo, naming every process serving on this machine: full process name, PID, address family, protocol, (host):port in port order. Every row shows; the tab scrolls with j/k.
  • Copyable pane — click a tab to jump; drag-select copies the text to the clipboard while the drag settles, replacing the terminal's own selection with no toggle.
  • Quick to open — the slow commands start on keypress while a placeholder pane is already up, so the wait is the slowest command, not their sum.
  • Three entry points — netinfo_show, netinfo_json (structured data for scripts and agents), netinfo_copy.

Install

git clone https://github.com/aancw/rex-netinfo.git
ln -sf "$(pwd)/rex-netinfo/netinfo.lua" ~/.config/rex/netinfo.lua

In ~/.config/rex/init.lua:

dofile(os.getenv("HOME") .. "/.config/rex/netinfo.lua").setup{ key = "cmd+alt+n" }

Reload your Rex config; ⌘⌥N opens the report. The actions are also in the command palette as Network Info: ….

Use

Key Action
⌘⌥N (configurable) open, or refresh, the report
←/→, 1–9 change tab
j/k, pgup/pgdn, mouse wheel scroll inside a tab
q close

From the shell:

rex do netinfo_show     # open the tabbed report
rex do netinfo_json     # structured data, for scripts and agents
rex do netinfo_copy     # copy the report to the clipboard

A rex do run with no Rex client attached returns the text instead of opening a pane (also saved to /tmp/rex-netinfo.txt):

rex do netinfo_show | jq -r .report

Options

Option Default What it does
key "cmd+alt+n" keyboard shortcut; false for none (palette actions stay)
public_ip true include one IPv4 + one IPv6 public lookup (ipify.org)
style "tabs" "float" or "split": the whole report in one fixed pane instead of tabs
fit true size the pane to its content; false keeps a fixed half-window pane
width 0.5 the split's share of the space
arp_limit 24 neighbour rows before an … N more tail. Listening ports are never capped — the tab scrolls

Good to know

  • The neighbour table is an ARP cache, not a scan. You see the devices your Mac has actually resolved recently.
  • Listening ports are yours only. lsof without root sees your user's processes.
  • Sudo is never needed for anything the report gathers.
  • Tabs need an attached Rex client and a python3 with curses; otherwise the report falls back to a plain one-pane text report automatically.
  • macOS only; needs Rex with Lua scripting.

License

MIT

About

A floating network report for Rex. Press one key and the whole LAN story lands beside your work — Wi-Fi signal, IPv4/IPv6, gateway, DNS, DHCP lease, tunnels, interfaces, LAN neighbours, and who is listening on which port. Press it again for fresh data.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages