Stop guessing
what's running on your
machine.
Fix port conflicts
instantly.
Kill processes on any port safely with one command. Portrm detects services, prevents data loss, auto-restarts your dev server, and manages your entire stack.
You've seen this before.
A crashed dev server. A zombie process. Something unknown squatting on port 3000.
Everything lsof never told you.
From a single port fix to managing your entire dev stack with profiles, CI mode, and VS Code integration.
Instant Detection
Identifies Next.js, Vite, Django, PostgreSQL, Redis, Docker and 13+ services with confidence scoring. Know exactly what's running before you kill it.
3-Tier Safety System
BLOCKS system processes, WARNS about databases with data-loss risk, APPROVES dev servers. Never accidentally kill PostgreSQL again.
Auto-Restart
ptrm fix 3000 --run 'npm run dev' clears the port
and restarts your server in one command. Graceful SIGTERM first,
force only if needed.
Project Config
Run ptrm init to generate a
.ptrm.toml in your repo. Define every service,
port, run command, env vars, and readiness checks. Your entire
stack, version-controlled.
Dev Stack Orchestration
ptrm up starts all services from
.ptrm.toml with preflight checks.
ptrm down stops everything cleanly.
ptrm restart frontend targets one service.
Profiles
ptrm use staging switches your entire stack to
staging ports and env vars defined in .ptrm.toml.
One command to switch between dev, staging, and production.
Doctor Mode
Scans for zombie processes, idle servers, and port conflicts
automatically. ptrm doctor -y auto-fixes everything
safe to clean up.
Watch & Auto-Recover
ptrm watch 3000 monitors your server continuously.
When it crashes, portrm detects the reason and auto-restarts
using your config.
Interactive TUI
ptrm ui launches a full terminal UI. Browse all
ports, inspect processes, kill or restart - all without
memorizing commands.
Preflight Checks
ptrm preflight 3000 8080 verifies ports are free
before you start anything. Reads from
.ptrm.toml automatically if no ports given.
CI/CD Mode
ptrm ci runs config validation, registry check,
preflight, and doctor in sequence. Exits 1 on failure. Full JSON
output for pipelines.
Port Grouping
ptrm group --dev organizes ports by role: frontend,
backend, database, cache, infra. See your entire stack at a
glance instead of a flat list.
Log Streaming
ptrm log 3000 streams live logs from whatever
process is on that port. Works with containers and local
processes. No more guessing which terminal has it.
History & Analytics
ptrm history --stats shows what you've killed,
restarted, and fixed. Track patterns, spot recurring conflicts,
and see which ports cause the most trouble.
VS Code Extension
Full sidebar dashboard in VS Code. One-click start, stop, fix, doctor, preflight. Manage your entire dev stack without leaving the editor.
Built in Rust
~1.2MB native binary. Zero runtime dependencies. No Node.js, no Python. 40x smaller than kill-port. Instant startup, every time.
Your dev stack, defined in one file.
Run ptrm init to scaffold it. Every service gets a
port, a start command, env vars, and a readiness check. Commit
it to your repo - your whole team gets the same setup.
# Generated by `ptrm init` [project] name = "my-app" [services.frontend] port = 3000 run = "npm run dev" cwd = "./frontend or ." [services.api] port = 8080 run = "cargo run" cwd = "./backend or ." [services.db] port = 5432 run = "pg_ctl start" cwd = "./db or ." [profiles.staging] frontend = { port = 3100 } api = { port = 8180 }
Manage ports without leaving the editor.
Full sidebar dashboard. One-click start, stop, fix, doctor, preflight. Switch between dev/staging/production profiles. Auto-installs the portrm CLI binary.
Browse, kill, and restart - without memorizing commands.
Run ptrm ui to launch a full-screen terminal dashboard. Select any port to inspect it.
One tool. Every scenario.
Portrm vs the alternatives.
kill-port and fkill are blunt instruments. Portrm is a process classification engine.
| Feature | lsof + kill | kill-port | fkill | Portrm |
|---|---|---|---|---|
| Service identification | ✗ | ✗ | Name only | Full + confidence score |
| Safety checks | ✗ | ✗ | ✗ | 3-tier system |
| Graceful shutdown | ✗ | ✗ | ✗ | SIGTERM → escalate |
| Auto-restart | ✗ | ✗ | ✗ | --run flag |
| Dev stack up/down | ✗ | ✗ | ✗ | ptrm up / down |
| Watch & auto-recover | ✗ | ✗ | ✗ | ptrm watch |
| Doctor / diagnostics | ✗ | ✗ | ✗ | ptrm doctor |
| VS Code extension | ✗ | ✗ | ✗ | Marketplace |
| CI/CD mode | ✗ | ✗ | ✗ | ptrm ci |
| Profiles (dev/staging) | ✗ | ✗ | ✗ | ptrm use staging |
| Interactive TUI | ✗ | ✗ | ✓ | ✓ |
| Project config file | ✗ | ✗ | ✗ | .ptrm.toml |
| Binary size | Built-in | ~50MB | ~50MB | ~1.2MB |
| Runtime required | - | Node.js | Node.js | None |
Get started in seconds.
Native binary. No Node.js. No runtime. Just run.
npx portrm scan
npm install -g portrm
pip install portrm
cargo install portrm
brew install abhishekayu/tap/portrm
curl -fsSL
https://raw.githubusercontent.com/abhishekayu/portrm/main/install.sh
| sh
Frequently asked questions.
Everything developers ask about port management and portrm.
How do I fix "EADDRINUSE: address already in use" error?
Run ptrm fix 3000 (replace 3000 with your port
number). portrm will detect what process is using the port,
check if it's safe to kill, terminate it gracefully with
SIGTERM first, and suggest the restart command. Add
-y to skip confirmation or
--run "npm run dev" to auto-restart your dev
server immediately.
What is portrm and how is it different from kill-port or
fkill?
portrm is an open-source Rust CLI for intelligent port
management. Unlike kill-port or fkill which blindly kill
processes, portrm identifies services (Next.js, Docker,
PostgreSQL, etc.), has a 3-tier safety system that blocks
killing system processes and warns about databases, performs
graceful shutdown, auto-restarts, and can manage your entire
dev stack via a .ptrm.toml config file. It's a
~1.2MB native binary with zero runtime dependencies.
How do I find what process is using a port on macOS, Linux, or
Windows?
Run ptrm 3000 to inspect any port. It shows the
process name, PID, service type, memory usage, uptime, project
directory, and whether it's safe to kill. For all listening
ports, use ptrm scan. This replaces the
hard-to-read output of lsof -i :3000 or
netstat with clean, human-readable information.
How do I install portrm?
Choose your preferred method:
brew install abhishekayu/tap/portrm (Homebrew),
npm install -g portrm (npm),
pip install portrm (pip),
cargo install portrm (Cargo), or try instantly
without installing via npx portrm scan. portrm
supports macOS (Intel + Apple Silicon), Linux (x86_64 +
ARM64), and Windows.
How do I kill a process running on a specific port?
Use ptrm fix <port> to safely kill a
process. For example, ptrm fix 3000 identifies
the process, checks safety (blocks system processes, warns
about databases), sends SIGTERM first, waits for clean exit,
and only escalates to SIGKILL if needed. Use
ptrm fix 3000 8080 -y to fix multiple ports at
once without confirmation.
Can portrm manage my entire dev stack (frontend, backend,
database)?
Yes. Run ptrm init to generate a
.ptrm.toml config file, define your services with
ports, run commands, and environment variables, then use
ptrm up to start everything and
ptrm down to stop. It supports profiles for
switching between development, staging, and production
environments, preflight checks, crash monitoring with
auto-restart via ptrm watch, and CI/CD mode.
Is there a VS Code extension for portrm?
Yes. The
portrm VS Code extension
provides a sidebar dashboard showing all listening ports,
one-click start/stop/fix/doctor actions, profile switching,
and smart terminal integration. Search "portrm" in VS Code
extensions or run
code --install-extension abhishekayu.portrm-cli.
Common Port Problems portrm Solves
EADDRINUSE: address already in use
The most common Node.js port error. It means another process is already listening on the port your app needs. portrm finds the process, shows you what it is, and kills it safely with ptrm fix <port>. Works with Express, Next.js, Vite, NestJS, and any framework that binds to a TCP port.
Port 3000 already in use
Port 3000 is the default for React (Create React App), Next.js, and Express. When a dev server crashes without cleanup, the port stays occupied. Instead of memorizing lsof -ti :3000 | xargs kill -9, run ptrm fix 3000.
Port 5000 in use on macOS
Since macOS Monterey, Apple's AirPlay Receiver occupies port 5000. Flask, ASP.NET Core, and other frameworks that default to port 5000 cannot start. portrm detects system services like ControlCenter and tells you exactly what to do.
Learn more →Docker port already allocated
When Docker cannot bind a container port, you get "port is already allocated." The conflict can be another container or a host process. portrm scans both Docker containers and host processes in one unified view with ptrm scan.
Kill process on any port
Developers waste time memorizing different commands for each OS. lsof on macOS, ss or fuser on Linux, netstat on Windows. portrm is one command that works everywhere: ptrm fix <port>.
List all listening ports
See every port in use on your machine with process names, PIDs, and commands. No flags to memorize. Just ptrm scan. Works identically on macOS, Linux, and Windows.