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
Metadata
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| portcheck_cli-0.1.0.tar.gz | 6.0 kB | Without provenance | Details for portcheck_cli-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| portcheck_cli-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for portcheck_cli-0.1.0-py3-none-any.whl |
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
|
Security for portcheck-cli 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.