npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

kp-node

v1.0.0

Published

A CLI tool to quickly identify and terminate processes running on specified ports

Readme

Port Killer CLI (kp)

A powerful Node.js CLI tool that quickly identifies and terminates processes running on specified ports. Perfect for developers and DevOps engineers who need to manage port conflicts efficiently.

Features

  • Kill processes on specific ports with a simple command
  • Support for multiple ports and port ranges
  • Interactive mode with process information
  • Watch mode for automatic port monitoring
  • Save and load port combinations as presets
  • Cross-platform support (Windows, macOS, Linux)
  • JSON output for automation
  • Colorful and informative output

Installation

npm install -g kport

Usage

Basic Commands

# Kill a process on a specific port
kp 3000

# Kill processes on multiple ports
kp 3000,3001,3002

# Kill processes in a port range
kp 3000-3010

# Force kill without confirmation
kp 3000 -f

# Show process information before killing
kp 3000 -i

# List all active ports before/after operation
kp 3000 -l

# Output in JSON format
kp 3000 -j

# Dry run (show what would be killed)
kp 3000 -d

Watch Mode

Monitor a port and automatically kill processes that start using it:

# Watch port 3000
kp watch 3000

# Watch with custom check interval (in milliseconds)
kp watch 3000 -i 5000

Port Scanning

Scan for all active ports on your system:

# List all active ports
kp scan

# Output scan results in JSON format
kp scan -j

Presets

Save and load port combinations:

# Save a preset
kp save dev 3000,3001,3002

# Load and execute a preset
kp load dev

Options

  • -f, --force: Force kill without confirmation
  • -l, --list: List all running ports before/after operation
  • -i, --info: Show detailed process information before killing
  • -j, --json: Output in JSON format
  • -v, --verbose: Show detailed logs during execution
  • -q, --quiet: Suppress all output except errors
  • -d, --dry-run: Show what would be killed without actually killing
  • -c, --config: Use custom configuration file

Configuration

The tool can be configured through:

  1. Global config file (automatically created)
  2. Project-level config (.kprc or in package.json)
  3. Environment variables (KP_DEFAULT_OPTIONS)

Security

  • Permission checks before killing system processes
  • Warning when attempting to kill critical system ports
  • Safeguards against privilege escalation

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT