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

offmyport

v1.4.0

Published

Interactive CLI tool to find and kill processes by port.

Readme

offmyport 🔪

npm version License: MIT Bun

Interactive CLI tool to find and kill processes by port. No more memorizing lsof -i :8080 or netstat flags.

Installation

# Using bun (recommended)
bun install -g offmyport

# Using npm
npm install -g offmyport

# Run without installing
npx offmyport

Install from Source

git clone https://github.com/HelgeSverre/offmyport.git
cd offmyport

# Install dependencies and make it accessible globally
bun install
bun link

Usage

# List all listening ports, pick one to kill
offmyport

# Filter to a specific port
offmyport 8080

# Filter multiple ports (comma-separated)
offmyport 80,443,8080

# Filter port ranges (inclusive)
offmyport 3000-3005

# Mix and match
offmyport 80,443,3000-3005

Non-Interactive Mode

# Kill all processes on port(s) with confirmation prompt
offmyport 3000 --kill

# Skip confirmation (use with caution)
offmyport 3000 --kill --force

# Shorthand flags
offmyport 3000 -k -f

JSON Output

# Output process info as JSON (no TUI)
offmyport --json

# Filter and output as JSON
offmyport 3000-3005 --json

Features

  • Lists all TCP listening ports with process info
  • Interactive selection with arrow keys
  • Choose between SIGTERM (gentle) or SIGKILL (force)
  • Filter by single port, multiple ports, or port ranges
  • Non-interactive mode with --kill for scripting
  • JSON output with --json for scripting and piping
  • Press q to quit during selection
  • Graceful cancellation with Ctrl+C or ESC

Example

Interactive Mode

$ offmyport 3000

Found 1 listening process (q to quit)

? Select a process to kill:
❯ Port  3000 │ node            │ PID 12345 │ user

? Kill node (PID 12345) with:
❯ SIGTERM (gentle - allows cleanup)
  SIGKILL (force - immediate)

Sent SIGTERM to PID 12345 (node on port 3000)

Kill Mode

$ offmyport 3000-3005 --kill

Processes to kill (3):

  Port  3000 │ node            │ PID 12345 │ user
  Port  3001 │ python          │ PID 12346 │ user
  Port  3002 │ ruby            │ PID 12347 │ user

? Kill 3 processes? (y/N)

JSON Output

$ offmyport 3000 --json
[
  {
    "pid": 12345,
    "name": "node",
    "port": 3000,
    "protocol": "TCP",
    "user": "helge",
    "cpuPercent": 0.5,
    "memoryBytes": 46137344,
    "startTime": "2025-12-31T10:30:15.000Z",
    "path": "/usr/local/bin/node server.js",
    "cwd": "/Users/helge/projects/myapp"
  }
]

CLI Reference

| Flag | Shorthand | Description | | ----------- | --------- | ---------------------------------------------- | | --json | | Output as JSON (no TUI, for scripting) | | --kill | -k | Non-interactive mode, kills matching processes | | --force | -f | Skip confirmation prompt (use with --kill) | | --version | -v | Show version number | | --help | -h | Show help |

Requirements

  • macOS: Works out of the box (uses lsof)
  • Linux: Uses lsof or falls back to ss (from iproute2)
  • Windows: Requires PowerShell 5.0+ (uses Get-NetTCPConnection)
  • Node.js 18+ or Bun

License

This project is licensed under the MIT License - see the LICENSE.md file for details.