Installation
Install, upgrade and remove ports — one static binary, no runtime.
Install
curl
curl -fsSL https://ports.tools/install | shThe script downloads the latest release for your OS and CPU (macOS or Linux, amd64 or arm64), checks it against the release's checksums, and installs one binary to /usr/local/bin, or ~/.local/bin when that isn't writable. It puts the man pages on your MANPATH when it can. PORTS_BIN picks another directory.
npm
npm i -g @pyjeebz/portsThe same binary on macOS, Linux and Windows. npm installs only the package for your platform (@pyjeebz/ports-<os>-<arch>, an optional dependency) and runs it through a small launcher; there's no postinstall script, so it works with --ignore-scripts. To run it without installing: npx @pyjeebz/ports here.
Otherwise
Download an archive from the releases and put ports (ports.exe on Windows) on your PATH. With Go, go install github.com/pyjeebz/ports@latest builds it anywhere.
$ ports --version
ports <version>Nothing else to set up: run ports and it lists what's listening. For names, start the router once:
ports proxy startMan pages
Every release archive carries man(1) pages for the whole command tree — ports.1, ports-proxy.1 and friends — generated from the commands the release was built with, so they can't drift from its flags. Out of an archive they read directly with man -l ports.1.
Upgrade
Run the install script again, or npm i -g @pyjeebz/ports@latest. The background router runs the ports on your PATH, so it picks up the new binary when it next starts:
ports proxy stop && ports proxy startOn Linux, an upgrade replaces the file and with it the capability that lets the router use port 80. ports proxy start offers it again; until then the router runs on 8480.
Remove
ports proxy stop # stop the router, and remove its login service
ports hosts clean # take ports's names out of the hosts fileThen delete the binary, and the state directory if you like — it holds names, aliases and nothing else you'd miss. See where it keeps state.