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

@dragonpeti53/portkill

v0.1.0

Published

Dependency-free CLI for freeing ports by terminating processes using them.

Readme

portkill

Dependency-free Node.js CLI for freeing ports by terminating the processes using them.

Install

npm install -g @dragonpeti53/portkill

Run without installing:

npx @dragonpeti53/portkill 3000

Usage

portkill <port...> [--yes | --force]
pk <port...> [--yes | --force]

Examples:

portkill 3000
portkill 3000 5173 --yes
pk 8080 --force

By default, portkill prints the matching process table and asks before terminating anything. Use --yes or -y to skip confirmation and terminate gracefully. Use --force or -f to skip confirmation, try graceful termination first, then hard-kill any remaining process after 2 seconds.

portkill targets TCP listeners and UDP-bound processes. Established TCP client connections, port ranges, duplicate ports, and non-integer values are not supported.

Flags

  • -y, --yes: skip confirmation and gracefully terminate matching processes.
  • -f, --force: skip confirmation, terminate gracefully, then hard-kill survivors after 2 seconds.
  • -h, --help: show help.
  • -v, --version: print the package version.

Platform Notes

macOS and Linux use lsof when available, then fall back to ss or netstat where practical. Windows uses built-in netstat.exe, tasklist.exe, and taskkill.exe.

Permission errors can occur when the matching process belongs to another user or is elevated. Re-run from a shell with the appropriate permissions.

If no process is found using a requested port, portkill prints a success-style message and exits zero unless another requested port fails.

Exit Codes

  • 0: success, including requested ports with no matching process.
  • 1: runtime failure, permission failure, user cancellation, non-interactive confirmation failure, or failed termination.
  • 2: invalid command-line input.

Troubleshooting

  • Confirmation is required: stdin is not interactive. Use --yes or --force.
  • No supported port discovery command found: install lsof, ss, or netstat.
  • permission denied or EPERM: the process likely requires elevated permissions to terminate.

License

MIT