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

kill-the-port

v0.1.3

Published

Kill processes on specified ports - fast, native, cross-platform. Supports multi-port, ranges, TCP/UDP.

Readme

kill-the-port

Kill processes on specified ports - fast, native, cross-platform.

A native Rust binary distributed via npm. No lsof, no netstat, no shell commands. Uses OS-level APIs directly for maximum speed.

Why

Existing port killers (kill-port, fkill) shell out to lsof/netstat which is slow and fragile. kill-the-port uses native APIs:

  • Linux: Reads /proc/net/tcp directly
  • macOS: Uses libproc syscalls
  • Windows: Calls GetExtendedTcpTable Win32 API

Install

# Use directly
npx kill-the-port 3000

# Or install globally
npm install -g kill-the-port

CLI Usage

# Kill single port
kill-the-port 3000

# Kill multiple ports
kill-the-port 3000 8080 9090

# Kill port range
kill-the-port 3000-3010

# Comma-separated
kill-the-port 3000,3001,3002

# Mix and match
kill-the-port 3000 4000-4005 5000,5001

# UDP instead of TCP
kill-the-port 3000 --protocol udp

# Graceful kill (SIGTERM instead of SIGKILL, unix only)
kill-the-port 3000 --graceful

# Dry run - see what would be killed
kill-the-port 3000 --dry-run

# JSON output
kill-the-port 3000 --json

Programmatic API

import { killPort, killPortRange } from 'kill-the-port';

// Kill single port
await killPort({ port: 3000 });

// Kill multiple ports
await killPort({ port: [3000, 8080, 9090] });

// Kill port range
await killPortRange({ from: 3000, to: 3010 });

// With options
await killPort({
  port: 3000,
  protocol: 'udp',
  graceful: true,
  dryRun: true,
});

Options

| Option | CLI Flag | Default | Description | |--------|----------|---------|-------------| | protocol | -p, --protocol | tcp | Protocol to target (tcp or udp) | | graceful | --graceful | false | Send SIGTERM instead of SIGKILL (unix only) | | dryRun | --dry-run | false | Show what would be killed without killing | | json | -j, --json | false | Output as JSON (CLI only) |

How It Works

kill-the-port ships precompiled Rust binaries for each platform via npm's optionalDependencies. When you install it, npm downloads only the binary for your OS/architecture. No Rust toolchain needed.

The binary uses native OS APIs - no subprocess spawning, no lsof, no netstat. Faster than alternatives that shell out to system commands.

Supported Platforms

| Platform | Architecture | |----------|-------------| | macOS | ARM64 (Apple Silicon) | | macOS | x64 (Intel) | | Linux | x64 | | Linux | ARM64 | | Windows | x64 |

License

MIT


Built with commandcode by @saqibameen