Port Scanner

List ports, kill processes, expose tunnels, and inspect webhook requests — all from your browser.

Why This Package

If you juggle multiple projects at once, you know the pain. Dev servers pile up, ports collide, and something you forgot to stop three hours ago is still hogging port 3000.

I got tired of the ritual: run lsof, squint at the output, find the PID, kill it. And when I needed to test a webhook? Open another terminal, run ngrok, copy the URL. Every single time.

Port Scanner puts it all in one dashboard. See your ports, kill what you don't need, expose a tunnel, and watch incoming requests without touching the terminal.

Features

List Ports

See every open port on your system with process name and PID. Filter by protocol, state, or process.

Kill Processes

One click to terminate any process. No more hunting for PIDs in the terminal.

Expose Tunnels

Turn any local port into a public URL via Cloudflare Tunnels. Click "Expose", get a URL, paste it as your webhook endpoint.

Request Logs

Every request hitting your tunnel is logged with method, path, status, headers, and body. Click to expand details.

Installation

Global (Recommended)

Install globally to use the ports command anywhere.

# npm
npm install -g port-scanner-cli

# pnpm
pnpm add -g port-scanner-cli

# yarn
yarn global add port-scanner-cli

Local

Add to your project as a dependency.

# npm
npm install port-scanner-cli

# pnpm
pnpm add port-scanner-cli

# yarn
yarn add port-scanner-cli

Usage

List ports

Scan all open ports. Add filters to narrow results.

ports list
ports list --protocol tcp --state LISTEN
ports list --process node --json

Web dashboard

Launch the dashboard to manage ports, expose tunnels, and view request logs.

ports web
ports web --port 8080

Install Cloudflared

Required for the tunnel/expose feature. Skip this if you only need port listing and killing.

Linux / WSL

curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb -o /tmp/cloudflared.deb && sudo dpkg -i /tmp/cloudflared.deb

macOS

brew install cloudflared

Windows (PowerShell)

winget install Cloudflare.cloudflared

Requirements

Node.js >= 18 Linux: ss or netstat macOS: lsof or netstat Windows: netstat cloudflared (for tunnels)