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

@gkucmierz/dport

v1.4.2

Published

Deterministic local port generator based on project name

Downloads

901

Readme

🎯 @gkucmierz/dport

Deterministic local port generator based on your project name.

Tired of port collisions (EADDRINUSE) or trying to remember which project runs on 3000, 8080, or 5173? dport replaces chaotic local development port assignments with stable, predictable, and mathematically calculated ports.

Why deterministic ports?

  • Zero Collisions: Every project gets a unique, stable port based on its name.
  • PWA & Service Worker Isolation: Using localhost:3000 everywhere shares LocalStorage, IndexedDB, and active Service Workers between multiple unrelated projects, causing bizarre and hard-to-track bugs. Deterministic ports guarantee 100% strict origin isolation.
  • Microservice Harmony: Your backend (45612), frontend (51425), and proxy can securely talk to each other without port mapping spreadsheets.

📖 Read the full philosophy: Dive deep into why monolithic ports are hurting your development flow in my dedicated Tech Blog article: Porty deterministyczne: Lekarstwo na piekło dewelopera


📦 Installation

npm install -g @gkucmierz/dport

🚀 Usage

1. Calculate Port (Auto-detect)

Run inside any Node.js project directory. It automatically reads the name from package.json and calculates your port:

dport
# or
dport calc

2. Fast Custom Calculation

Pass any string directly to generate its specific deterministic port:

dport talk-app-backend

3. Shell Autocomplete

Never type the full command again. dport comes with native autocomplete hook for Zsh & Bash!

# Inject the auto-complete hook into your ~/.zshrc or ~/.bashrc
dport setup

4. Open in Browser

Calculate the port and instantly launch your default browser at http://localhost:<port>:

dport open
dport open tech-blog

No more manual copy-pasting of localhost URLs from the terminal!

5. Auto-Fix your package.json

Scans your scripts block (e.g. dev, serve, preview) and automatically replaces common default development ports (3000, 8080, 5173, 8000, 4000, 4200) with your uniquely calculated deterministic port.

dport fix

🧠 How it Works (Under the hood)

It takes the provided string, reduces it to a stable numeric hash, boundaries it carefully using modulo arithmetic against the ephemeral networking limits, and binds it safely to the 40000 - 65000 port range. The string tech-blog will always generate 51425 — across any machine, operating system, or environment.


Crafted carefully as part of the 7u.pl Tech Ecosystem under strict "The Vault" architectural guidelines. Engineering & Visual Excellence.