Getting Started

portrm is a fast, open-source CLI for fixing port conflicts, killing zombie processes, and managing dev servers. Built in Rust, it is a ~1.2MB binary with zero dependencies.

Quick Start

Try portrm without installing:

npx portrm scan

This scans all listening ports and shows what is running on each one.

Install

Pick your preferred package manager:

# npm (recommended for Node.js users)
npm install -g portrm

# Homebrew (macOS / Linux)
brew install abhishekayu/tap/portrm

# pip (Python users)
pip install portrm

# Cargo (Rust users)
cargo install portrm

# Shell script
curl -fsSL https://raw.githubusercontent.com/abhishekayu/portrm/main/install.sh | sh

Verify the installation:

ptrm --version

Your First Commands

1. Scan all ports

See everything that is listening on your machine:

ptrm scan

You will see a table with port numbers, process names, PIDs, service types, memory usage, and uptime.

2. Inspect a specific port

ptrm 3000

Shows detailed information about what is using port 3000, including the service type (Node.js, Python, Docker, etc.) and whether it is safe to kill.

3. Fix a port conflict

ptrm fix 3000

portrm will identify the process, check safety, and kill it gracefully. Add -y to skip confirmation.

4. Fix and restart

ptrm fix 3000 --run "npm run dev"

Clears the port and starts your dev server in one step.

What is Next?

Project Config (Optional)

For teams and complex projects, create a .ptrm.toml config:

ptrm init

This generates a config file where you define your services, ports, and run commands. Then use:

ptrm up      # start all services
ptrm down    # stop all services
ptrm status  # check service health

Learn more in the examples guide.