Package Exports
- port-checker-cli
- port-checker-cli/bin/port-checker.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (port-checker-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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 3306
Supports 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