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

@darksol/portguard

v1.0.1

Published

Dev-friendly CLI to monitor and manage localhost ports.

Readme

portguard

Dev-friendly CLI and API to monitor localhost ports, detect conflicts, and clear zombie processes.

Install

  • npx portguard
  • npm i -g portguard

CLI Commands

  • npx portguard - dashboard view of all listening ports
  • npx portguard scan - alias for dashboard view
  • npx portguard kill <port> - kill process on a specific port with confirmation
  • npx portguard kill <port> --force - kill without confirmation
  • npx portguard free <port> - check if a port is free, or show what is using it
  • npx portguard watch - live monitor mode, refreshes every 2s and shows changes
  • npx portguard find <name> - find ports by process name (node, python, etc.)
  • npx portguard range <start>-<end> - scan specific port range
  • npx portguard --json - JSON output mode for scripting

Examples

npx portguard
npx portguard kill 3000
npx portguard kill 3000 --force
npx portguard free 5432
npx portguard watch
npx portguard find node
npx portguard range 3000-3999
npx portguard scan --json

Programmatic API

import { scan, isPortFree, killPort, findByName } from 'portguard';

const ports = await scan();
const free = await isPortFree(3000);
await killPort(3000);
const matches = await findByName('node');

Types

interface PortInfo {
  port: number;
  pid: number;
  processName: string;
  protocol: 'tcp' | 'udp';
  state: string;
  uptime: string;
  localAddress: string;
}

Cross-Platform Support

  • Windows: netstat + PowerShell process metadata
  • Linux: ss (fallback to netstat) + ps
  • macOS: lsof + ps

Output Preview

PORT   PID     PROCESS               PROTO   STATE         UPTIME
3000   12544   node                  TCP     LISTEN        2h 11m
5432   1880    postgres              TCP     LISTEN        1d 4h
6379   4120    redis-server          TCP     LISTEN        6h 5m
[11:22:08 AM] 4 listening ports | +1 new | -1 dropped

PORT   PID     PROCESS               PROTO   STATE         UPTIME
5173   9024    node                  TCP     LISTEN        14m

Contributing

  1. Fork the repo.
  2. Create a feature branch.
  3. Run npm test before opening a PR.
  4. Keep runtime dependencies at zero.

License

MIT