Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Smart port manager - kill by port, find alternatives, never fight with lsof again

License

Notifications You must be signed in to change notification settings

strabo231/portman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test PortMan

PortMan - Smart Port Manager

Stop fumbling with netstat, lsof, and grep! PortMan makes port management simple and intuitive.

Why PortMan?

The Problem: Managing ports is a pain:

# The old way (TERRIBLE!)
sudo lsof -i :8080 | grep LISTEN | awk '{print $2}' | xargs kill -9

The Solution:

# The new way (BEAUTIFUL!)
portman kill 8080

Installation

curl -sSL https://raw.githubusercontent.com/strabo231/portman/main/install.sh | bash

Quick Start

# See all listening ports
portman list

# Check a specific port
portman check 8080

# Kill process on port
portman kill 3000

# Get alternative port suggestions
portman suggest 3000

Commands

list                     List all listening ports
check <port>             Check what's using a port  
kill <port>              Kill process on port
reserve <port> <note>    Reserve/document a port
reserved                 List reserved ports
common                   Show common port numbers
suggest <port>           Suggest alternatives
history <port>           Show port usage history

Features

🎯 Kill by port - No PID hunting!
📊 Clear display - See process, user, description
🔍 Service detection - Recognizes 30+ common services
📝 Port reservations - Document what uses what
💡 Smart suggestions - Get alternative ports
⏱️ History tracking - See port usage over time
🚀 Fast - No complex pipes or awk magic

Examples

List all ports:

portman list
PORT     PROCESS         USER       DESCRIPTION
────────────────────────────────────────────────
22       sshd            root       SSH
80       nginx           www-data   HTTP
3000     node            dev        React dev server [RESERVED]
5432     postgres        postgres   PostgreSQL

Check specific port:

portman check 8080
PORT 8080 STATUS
═══════════════════
⚠ Port 8080 is IN USE

  Process:  java
  PID:      12345
  User:     tomcat
  Command:  java -jar myapp.jar
  Service:  HTTP Alt/Tomcat
  Uptime:   2h 34m

ℹ Kill with: portman kill 8080

Kill a port (with confirmation):

portman kill 3000
⚠ About to kill:
  Port:     3000
  Process:  node (PID 5678)
  Command:  node server.js

Continue? (y/N) y
✓ Killed node (PID 5678) on port 3000

Reserve ports for documentation:

portman reserve 3000 "React dev server"
portman reserve 8080 "Backend API"
portman reserved

Get alternative suggestions:

portman suggest 3000
ℹ Port 3000 busy? Try these alternatives:

  ✓ 3001 (available)
  ✓ 3002 (available)
  ✗ 5000 (in use)
  ✓ 8000 (available)

See common ports:

portman common

Shows reference for HTTP, databases, dev servers, etc.

Use Cases

Development:

  • Kill hung dev servers instantly
  • Find free ports for new projects
  • Document team port conventions

System Administration:

  • Quickly identify what's running
  • Clean up orphaned processes
  • Audit port usage

Troubleshooting:

  • "Port already in use" errors? Fixed in seconds
  • Find what hijacked your port
  • Track port usage history

Comparison

Task Old Way PortMan
Kill port lsof | grep | awk | xargs kill portman kill 8080
Check port netstat -tulpn | grep 8080 portman check 8080
List ports ss -ltn (cryptic output) portman list (clean table)
Find alternative Manual trial and error portman suggest 3000

License

MIT License - see LICENSE

Author

Sean - @strabo231


Stop fighting with ports. Let PortMan handle it. 🚀

About

Smart port manager - kill by port, find alternatives, never fight with lsof again

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages