@rusky/port-killer
v1.0.1
Published
Find and kill processes using a port
Readme
@rusky/port-killer
A simple 2.8 kB CLI tool for finding and killing processes using a specific port.
Installation
Run it directly with npx:
npx @rusky/port-killer --port 3000Or install it globally:
npm install -g @rusky/port-killerUsage
Check a port
port-killer --port 3000If a process is using the port:
Port 3000 is being used by:
PID: 18472
Process: node
Kill process? (y/N)Automatically kill the process
Use --yes or -y to skip confirmation:
port-killer --port 3000 --yesport-killer --port 3000 -yOutput:
Port 3000 is being used by:
PID: 18472
Process: node
Killing process 18472...
✓ Process 18472 killed
✓ Port 3000 is now availableAvailable options
| Option | Description |
| --------------- | ------------------------------------- |
| --port <port> | Port to inspect |
| -y, --yes | Kill the process without confirmation |
| -h, --help | Show help |
| -V, --version | Show version |
Supported Platforms
- Linux
- Windows
Development
Clone the repository and install dependencies:
git clone https://github.com/ruskydev/port-killer.git
cd port-killer
npm installRun in development:
npm run dev -- --port 3000Build:
npm run buildRun the compiled version:
npm start -- --port 3000