JSPM

port-checker-cli

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q20699F
  • License MIT

๐Ÿ” Developer-friendly CLI tool to check open ports, detect protocols, and manage bound processes.

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.

Version Platform License Made with Node.js


๐Ÿš€ 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-cli

Or 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), use sudo:

    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:

  • lsof or sudo lsof to inspect port bindings
  • net.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