v1.5.0 Released • Smart Cross-Platform Port & Process Manager

Know what you're killing.

Traditional port killers only show you a raw PID. portfind inspects the process to reveal which project it belongs to, its risk tier, command line, and whether a supervisor loop is keeping it alive.

irm https://raw.githubusercontent.com/rpratap2111/portfind/main/install.ps1 | iex
Installs both the terminal UI (portfind) and the notification-area tray icon (portfind-tray).

Project Awareness

Scans package.json, Cargo.toml, go.mod, or Git roots so you immediately know which codebase started the service.

Risk Tiers

Categorizes processes as LOW, MEDIUM, or HIGH risk. Crucial system daemons and SSH sessions are strictly protected.

Port-Fight Radar

Detects when nodemon, pm2, or container supervisors respawn a process on the same port, warning you before entering an endless kill loop.

Docker & Containers

Distinguishes containerized services from host processes. Stops the Docker container safely rather than killing the Docker proxy PID.

Live Portfind Simulator

Try out Portfind directly in your browser. Switch between the interactive Terminal TUI, the raw CLI --json stream, and the Windows Notification Tray view:

portfind v1.5.0 interactive preview
PortPIDProcessProject ContextUptimeRisk TierAction
:300014208nodeecommerce-web14mLOW
:51739812vitedashboard-ui42mLOW
:54328216postgresanalytics-backend3d 4hMEDIUM
:63794104redisdocker: redis:7-alpinecache-service5d 12hLOW
:22924sshd—18dHIGH
Process Details (: 3000)
PID 14208
Command line: node server.js --env production
Why LOW risk: Identified as a development service or web server. Safe to terminate without affecting system operations.

Why portfind?

Tools like netstat, fuser, pik, or PortSlayer only answer one question: which process is on port 3000?Portfind answers: "What exactly am I about to kill, and is it safe?"

Feature / CapabilityTypical Port Killersportfind
Port, PID, Process Name
Project Context (package.json, Cargo.toml, go.mod, Git)
Full Command Line inspection (node server.js vs just node.exe)
Process Uptime & Age calculation
Risk Tiers (LOW / MEDIUM / HIGH with safeguards)
Safe Pinning (pidfd / OS handles preventing recycled PID accidents)
Port-Fight Loop Detection (detects nodemon & supervisor respawns)
Docker container identification & graceful container stops
Persistent History (SQLite audit trail of freed ports)
Windows Notification Tray quick actions

Installation Guide

Portfind is distributed as a single standalone binary with zero dependencies. Available for 64-bit Windows and Linux.

Windows Installation

Run this in PowerShell to install both the terminal UI (portfind) and the notification tray icon (portfind-tray):

PowerShell (Run as User or Admin)
irm https://raw.githubusercontent.com/rpratap2111/portfind/main/install.ps1 | iex

macOS Installation

Universal binary for Apple Silicon (M1/M2/M3/M4) and Intel (x86_64). Automatically configures ~/.zshrc:

Terminal (Zsh / Bash)
curl -fsSL https://raw.githubusercontent.com/rpratap2111/portfind/main/install.sh | bash

Linux Installation

Requires 64-bit Linux (x86_64 or arm64); works on any distro without root:

Bash
curl -fsSL https://raw.githubusercontent.com/rpratap2111/portfind/main/install.sh | bash

Go Install (Cross-Platform)

If you have Go 1.22+ installed, you can build from the official module:

Terminal
go install github.com/rpratap2111/portfind/cmd/portfind@latest

Uninstallation

To cleanly uninstall Portfind and remove PATH entries:

Windows
irm https://raw.githubusercontent.com/rpratap2111/portfind/main/uninstall.ps1 | iex
macOS & Linux
curl -fsSL https://raw.githubusercontent.com/rpratap2111/portfind/main/uninstall.sh | bash

Risk Tiers Guide

Before stopping any process, Portfind assigns a risk rating to prevent accidental downtime and accidental machine lockouts:

LOW RISK
9 Examples

Low Risk — Safe Dev Tools

Safe to stop anytime during typical dev work.

Typical Processes:
nodevitenextpythonuvicornflaskgocargo runruby
Safety Behavior:
Terminated immediately on confirmation. Zero confirmation delay.
MEDIUM RISK
6 Examples

Medium Risk — Databases & Daemons

Local databases and background developer services.

Typical Processes:
postgresmysqldmongodredis-serverdocker-proxyCode / IDE
Safety Behavior:
Requires explicit confirmation. Displays uptime, full command line, and working directory.
HIGH RISK
7 Examples

High Risk — Core System & SSH

Critical system daemons and remote connectivity.

Typical Processes:
sshdsystemdsystemd-resolvedlsass.exewininit.execsrss.exeservices.exe
Safety Behavior:
Strictly Refused. Termination is blocked in code.

Project Awareness (Provenance)

When node is listening on port 3000, is it your documentation server, your main API, or a colleague's background task?

Portfind climbs the process's working directory tree looking for project identity files:

  • package.json → Reads the "name" field for Node / JavaScript / TypeScript apps
  • Cargo.toml → Reads the [package].name for Rust projects
  • go.mod → Resolves the Go module path
  • pyproject.toml / requirements.txt → Resolves Python project directory
  • .git repository root → Falls back to the enclosing repository folder name

Port-Fight Detection

Ever killed a process on port 3000 only to have another process immediately grab port 3000 one second later?

How it works:

Portfind keeps an in-memory sliding window of port events. If a port is killed 3 times within 15 minutes, a warning badge appears next to the search box informing you that an auto-restarting supervisor (like nodemon, pm2, or docker-compose) is active.

Docker & Container Awareness

On systems running Docker, port forwarding often creates a docker-proxy process on the host. Killing that PID can leave Docker's daemon in an inconsistent state.

When Portfind inspects a listening port, it matches the port against the Docker socket. If the port is published by a container:

  • It displays the Container Name and Image tag (e.g. postgres:16).
  • Pressing kill invokes docker stop directly on the container, gracefully letting the database or containerized service flush to disk.

Persistent History (SQLite)

Every port freed or terminated through Portfind (either via Terminal or Tray) is logged into an embedded SQLite database.

Windows Storage Path
%LOCALAPPDATA%\portfind\history.db
macOS Storage Path
~/Library/Caches/portfind/history.db
Linux Storage Path
~/.cache/portfind/history.db

Press Tab inside the terminal UI to view your history log at any time.

Scripting with --json

portfind --json prints every listening port as JSON and exits immediately with code 0, without launching any UI or history store.

Example JSON Output
{
  "ports": [
    {
      "port": 3000,
      "pid": 14208,
      "process": "node",
      "project": "my-web-app",
      "age_seconds": 840,
      "risk": "LOW",
      "command": "node server.js",
      "parent_pid": 1204,
      "parent_process": "cmd",
      "container_id": null,
      "image": null
    }
  ],
  "warnings": []
}

PowerShell & jq Recipes

Copy-pasteable one-liners to integrate Portfind into build scripts and automated workflows.

PowerShell: Find all dev servers with a project name

PowerShell
(portfind --json | ConvertFrom-Json).ports | Where-Object project | Format-Table port, process, project

Bash / jq: Filter ports by LOW risk tier

Bash + jq
portfind --json | jq '.ports[] | select(.risk == "LOW") | {port, process, project}'

PowerShell: Check if port 3000 is occupied

PowerShell
(portfind --json | ConvertFrom-Json).ports | Where-Object port -eq 3000

TUI Keybindings

Every key you type goes into the live search box, so all controls live on non-typing keys:

KeyAction
↑ / ↓Navigate listening port entries
EnterKill the highlighted process (with confirmation prompt)
TabSwitch between Active Ports and SQLite History view
Ctrl + WOpen the Warnings view (permission issues / access denied details)
EscClear search box or close subviews
Ctrl + CQuit Portfind

Platform & Limitations

Windows, macOS & Linux supported: Native cross-platform terminal UI for Windows, Linux, and macOS (universal Apple Silicon and Intel). The companion Notification Tray app is Windows-only; on macOS and Linux use the interactive Terminal UI (portfind).
Elevated processes & permissions:

On Windows, inspecting services owned by other users or elevated admins requires running Portfind as administrator. On macOS and Linux, run sudo portfind to inspect sockets owned by root or system daemons.

TCP Listeners only: UDP listeners are not displayed since UDP sockets are connectionless and do not hold exclusive binds in the same manner.

Port Troubleshooting Guides

Step-by-step fixes for "port already in use" errors, with and without portfind. All guides