A CLI tool to find an available network port, optionally checking preferred ports first.
get-port-cli is a command-line interface tool that helps developers find available network ports on their system. It solves the problem of port conflicts by automatically detecting unused ports, optionally checking user-specified preferred ports first. The tool is particularly useful when starting multiple services or servers that need unique port assignments.
Developers, DevOps engineers, and system administrators who work with networked applications and need to manage port assignments from the command line or in scripts.
It provides a simple, reliable way to avoid port conflicts without manual checking, with the flexibility to specify preferred ports and hosts. The clean output makes it easy to integrate into scripts and automation workflows.
Get an available port
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
It instantly returns an available port with minimal command, as shown in the README example `$ get-port` outputting a port like `51402` without delays.
Accepts a list of preferred ports and returns the first available one, demonstrated in `$ get-port 80` returning `9090` when port 80 is occupied.
Supports checking on specific IPv4 or IPv6 addresses using the `--host` option, as in `$ get-port --host=127.0.0.1`, allowing targeted network checks.
Outputs only the port number, making it easy to capture in scripts for automation, evident from clean examples like `$ get-port` returning a single value.
Only finds one available port per command and lacks features for scanning ranges or checking multiple ports concurrently, which can be inefficient for complex setups.
Requires Node.js and npm for installation, adding overhead compared to built-in system tools, and may not fit environments with minimal dependency policies.
Does not provide details on why ports are unavailable or which services are using them, limiting use in troubleshooting and debugging scenarios.