Socket
Socket
Sign inDemoInstall

anyport

Package Overview
Dependencies
3
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    anyport

A command line tool to get a list of available ports


Version published
Weekly downloads
1
Maintainers
1
Install size
2.00 MB
Created
Weekly downloads
 

Readme

Source

Build Status Coverage Status

anyport

A command line tool to get a list of available ports.

Installation

npm i anyport

Usage


  Usage: anyport [options]

  Options:

    -h, --help     output usage information
    -V, --version  output the version number
    --min [n]      The minimum port number, default: 8000
    --max [n]      The maximum port number, at most 65535
    --num [n]      The number of the available ports, default: 1

By default, it will print one available port.

$ anyport
8000

With the --num option, you can specify how many ports you want to get. The port numbers are delimited by comma.

$ anyport --num 10
8000,8001,8002,8003,8004,8005,8006,8007,8008,8009

Also, you can specify the range of the generated ports with the --min and --max options.

$ anyport --min 9000
9000
$ anyport --min 9000 --max 9005 --num 10
9000,9001,9002,9003,9004,9005

License

MIT.

Keywords

FAQs

Last updated on 11 Jan 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc