Metadata-Version: 2.4
Name: portcheck-cli
Version: 0.1.0
Summary: Check what's using a port and optionally kill it
Author-email: Marcus <marcus.builds.things@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/marcusbuildsthings-droid/portcheck
Project-URL: Repository, https://github.com/marcusbuildsthings-droid/portcheck
Keywords: port,network,cli,process,kill,lsof
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Networking
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.0
Requires-Dist: psutil>=5.9
Dynamic: license-file

# portcheck

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

Simple, fast, with JSON output for automation.

## Installation

```bash
pip install portcheck-cli
```

## Usage

### Check a specific port

```bash
# 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

```bash
# Scan ports 8000-9000
portcheck scan 8000 9000

# Get JSON output
portcheck scan 3000 3100 --json
```

### List all listening ports

```bash
portcheck list

# JSON output
portcheck list --json
```

### Kill a process by PID

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

## JSON Output

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

```json
[
  {
    "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](SKILL.md) for agent-optimized documentation.

## License

MIT
