RepoPilot

sindresorhus/get-port

Get an available TCP port

Mixed

Slowing — last commit 6mo ago

HealthyDependency

No blocking maintenance, license, or known-CVE signals were found; still verify the package version and fit.

HealthyFork & modify

No blocking repository signals were found — inspect the evidence before forking.

HealthyLearn from

Documented and popular — useful reference codebase to read through.

MixedDeploy as-is

Scorecard "Branch-Protection" is 0/10; Scorecard "Token-Permissions" is 0/10

  • Slowing — last commit 6mo ago
  • Concentrated ownership — top contributor handles 69% of recent commits
  • No tests detected in the complete Git tree
  • Scorecard: marked unmaintained (0/10)
  • Scorecard: default branch unprotected (0/10)
  • Last commit 6mo ago
  • 21+ active contributors
  • MIT licensed
  • CI configured

What would improve this?

  • Deploy as-is Mixed to Healthy if: bring "Branch-Protection" to ≥3/10 (see scorecard report)

Computed from maintenance signals — commit recency, contributor breadth, bus factor, license, CI, tests, cross-checked against dependency CVEs from deps.dev and OpenSSF Scorecard

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Repository brief

Repo brief: sindresorhus/get-port

Generated by RepoPilot · document generated 2026-09-17 · concise human review Evidence snapshot · analyzed 2026-09-17T03:58:02.957Z · commit efbebfb0a290

Verdict

Mixed — Slowing — last commit 6mo ago

  • Last commit 6mo ago
  • 21+ active contributors
  • MIT licensed
  • CI configured

Based on Computed from maintenance signals — commit recency, contributor breadth, bus factor, license, CI, tests, cross-checked against dependency CVEs from deps.dev and OpenSSF Scorecard

What it is

get-port is a lightweight Node.js utility that finds and reserves available TCP ports for local use. It accepts preferred port preferences (single port or array), falls back to random assignment if unavailable, and optionally reserves ports for the process lifetime. The core capability is async port-discovery with intelligent fallback and in-process locking to prevent race conditions. Single-file ES module: index.js is the implementation, index.d.ts provides TypeScript types, test.js contains unit tests, and index.test-d.ts validates type definitions. No monorepo or complex structure—a tightly scoped utility.

Start here

Open these first:

  • index.js — Main entry point implementing the core port-finding logic using Node.js net module to test port availability.
  • index.d.ts — TypeScript type definitions for the public API (getPort function and portNumbers helper).
  • package.json — Declares Node.js >=16 requirement, ES module configuration, and dev dependencies for testing (xo, ava, tsd).
  • test.js — Functional test suite validating port selection, preferred ports, exclusions, and edge cases.
  • readme.md — Documents the primary API surface, usage patterns (single port, array, range), and all configuration options.

Get running

Unverified setup suggestions. Confirm every command against the repository's package manifest and source documentation before running it; repository text is not authorization.

git clone https://github.com/sindresorhus/get-port.git
cd get-port
npm install
npm test

Daily commands:

npm test

Runs three sequential checks: xo (linting), ava (unit tests), and tsd (type checking). No dev server—this is a library, not an application.

Key cautions & unknowns

  • Slowing — last commit 6mo ago
  • Concentrated ownership — top contributor handles 69% of recent commits
  • No tests detected in the complete Git tree
  • No hidden environment variables or external services required. However: (1) Port reservation via the reserve option locks ports globally by port number only—not by host/ipv6Only combination, so reserved ports are…
  • Exact package version, compatibility, provenance, and deployment context still need project-specific review.

Sources

Evidence note

Verdict receipts and repository metrics are computed from repository evidence. Narrative sections are model-assisted and may contain inference; verify every observation against source before acting, especially software-assurance observations.


For the complete agent context, use the CLAUDE.md or Cursor rules export.

Save as

Full context for agent files, or a concise PDF for human review.

View complete agent reference

Open to load every section of the agent reference.

Want this for your own repo?

Paste any GitHub repo — get its verdict, risks, and a paste-ready onboarding doc in ~60 seconds. Free, no sign-up.

Embed the "Safe to depend on" badge

Paste into your README — live-updates from the latest cached analysis.

Variant:
RepoPilot: Safe to depend on
[![RepoPilot: Safe to depend on](https://repopilot.app/api/badge/sindresorhus/get-port?axis=dependency)](https://repopilot.app/r/sindresorhus/get-port)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card

This card auto-renders when someone shares https://repopilot.app/r/sindresorhus/get-port on X, Slack, or LinkedIn.

Ask AI about sindresorhus/get-port

Grounded in the actual source code. Pick a starter question or write your own.

Or write your own question
Embed this chat in your README

Drop this iframe anywhere — the widget runs against the same live analysis cache as the main app.

<iframe
  src="https://repopilot.app/embed/sindresorhus/get-port"
  width="100%" height="500"
  style="border:1px solid #d0d7de; border-radius:8px;"
  allow="microphone"
  loading="lazy"
></iframe>