killtask
v2.0.0
Published
Port killer CLI
Readme
killtask
CLI to kill processes running on specific ports.
Installation
npm install -g killtaskOr use without installing:
npx killtask <port>Usage
Kill a single port:
npx killtask 8080Kill multiple ports:
npx killtask 8080 3000Kill all listening ports:
npx killtask --allConfirmation Prompt
By default, killtask will ask for confirmation before killing each port.
⚠️ Kill :3000 (PID 12345)? [press Enter to confirm, any other key to cancel]- Press Enter → proceeds with the kill
- Press any other key + Enter → cancels and skips the process
To skip the confirmation entirely, use --force or -f:
npx killtask 3000 --force
npx killtask 3000 -fOptions
| Flag | Alias | Description |
|------|-------|-------------|
| --force | -f | Skip confirmation and kill immediately |
| --yes | -y | Skip all confirmation prompts |
| --all | | Kill every listening process |
| --soft | --no-force | Graceful SIGTERM before SIGKILL |
| --verbose | -v | Show signal details |
| --help | -h | Show help |
Examples
# Kill port 3000 (with confirmation prompt)
npx killtask 3000
# Kill port 3000 immediately, no prompt
npx killtask 3000 --force
# Kill multiple ports with no prompt
npx killtask 3000 8080 -f
# Kill all listening processes (asks confirmation before all)
npx killtask --all
# Kill all listening processes immediately, no prompt
npx killtask --all --force
# Graceful kill (SIGTERM first, then SIGKILL)
npx killtask 3000 --soft