Skip to main content

portcheck

Check what's using a port and optionally kill it.

Simple, fast, with JSON output for automation.

Installation

pip install portcheck-cli

Usage

Check a specific port

# See what's on port 8080
portcheck check 8080

# Kill whatever's using port 8080
portcheck check 8080 --kill

# Force kill without confirmation
portcheck check 8080 --kill -f -y

# Check UDP port
portcheck check 53 --udp

# Get JSON output
portcheck check 8080 --json

Scan a range of ports

# Scan ports 8000-9000
portcheck scan 8000 9000

# Get JSON output
portcheck scan 3000 3100 --json

List all listening ports

portcheck list

# JSON output
portcheck list --json

Kill a process by PID

portcheck kill 12345
portcheck kill 12345 -f -y  # Force, no confirm

JSON Output

All commands support --json for machine-readable output:

[
  {
    "port": 8080,
    "protocol": "TCP",
    "status": "LISTEN",
    "pid": 12345,
    "local_address": "127.0.0.1:8080",
    "name": "python",
    "cmdline": "python -m http.server 8080",
    "user": "ape"
  }
]

For AI Agents

See SKILL.md for agent-optimized documentation.

License

MIT

Release files for portcheck-cli 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for portcheck-cli 0.1.0
File Size Uploaded
portcheck_cli-0.1.0.tar.gz 6.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for portcheck-cli 0.1.0
File Interpreter ABI Platform
portcheck_cli-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.7 kB

Release files / portcheck_cli-0.1.0.tar.gz

Download URL portcheck_cli-0.1.0.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a42b19d29d87a1cb4a6d0e188ef8a7501164ebc96dc8dbf4edfa53cb8a18ee85
BLAKE2b-256 checksum
How to use checksums
56f12b9cbba8d5038626abadad16cf7d6c741422d93af106c4cca74be9fb98f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / portcheck_cli-0.1.0-py3-none-any.whl

Download URL portcheck_cli-0.1.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1be52330adbce476061a5886212d8cf499a5f7cb62d9c78f0f66404c717422a7
BLAKE2b-256 checksum
How to use checksums
f8137fbc78e32e97eff20a9058004794595852fe91b1cfc059f2834b2825ede9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page