port-checker-cli
v1.0.1
Published
π Developer-friendly CLI tool to check open ports, detect protocols, and manage bound processes.
Maintainers
Readme
π Port Checker CLI
A powerful, developer-friendly CLI tool to inspect local TCP ports, detect protocols, and manage processes β all with elegant output and zero setup.
π Features
- β Detect if a TCP port is open
- π Auto-detect HTTP, HTTPS, MySQL, AMQP & more
- π§© Show the bound process (with optional kill prompt)
- π§ Protocol guessing using banner grabbing
- β¨ Developer-friendly, color-coded output
- π§ͺ Lightweight and zero-dependency install (except
chalk)
π¦ Installation
npm install -g port-checker-cliOr run directly with
npx(no install):
npx port-checker-cli 8080β‘ Usage
port-checker <port>Example:
port-checker 3306$ port-checker 8243
βββββββββββββββββββββββββββββββββββββββ
β β
Port 8243 is OPEN β
βββββββββββββββββββββββββββββββββββββββ
π HTTP(S) Response:
Protocol: HTTPS (handshake failed)
π§© Bound Process:
java (pid: 35916)
Command: Listening on (LISTEN)
β οΈ Do you want to kill process 35916? (y/n): y
β
Process 35916 terminated.
π Summary:
Port: 8243
Protocol: HTTPS (handshake failed)
PID: 35916
Status: Open
π Developer Notes
If you're checking ports owned by root/system services (like
mysqld), usesudo:sudo port-checker 3306Supports graceful exit, no hangs, and handles TCP timeout conditions smoothly.
Protocol detection includes:
- HTTP / HTTPS
- MySQL
- AMQP (JMS)
- Custom banners (extensible)
π Permissions & Security
This tool uses:
lsoforsudo lsofto inspect port bindingsnet.Socket()for low-level TCP probing- No external APIs or telemetry
You're in full control. No internet required.
π¨βπ» Author
Charith Jayasanka
Senior Software Engineer | Dev Tool Enthusiast
GitHub β’ LinkedIn
π License
MIT Β© 2025 Charith Jayasanka
