Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alex1990/anyport
A command line tool to get a list of available ports
https://github.com/alex1990/anyport
Last synced: about 12 hours ago
JSON representation
A command line tool to get a list of available ports
- Host: GitHub
- URL: https://github.com/alex1990/anyport
- Owner: Alex1990
- License: mit
- Created: 2017-01-11T15:04:00.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-11T15:34:43.000Z (almost 8 years ago)
- Last Synced: 2024-10-03T18:04:08.482Z (about 1 month ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/Alex1990/anyport.svg?branch=master)](https://travis-ci.org/Alex1990/anyport)
[![Coverage Status](https://coveralls.io/repos/github/Alex1990/anyport/badge.svg?branch=master)](https://coveralls.io/github/Alex1990/anyport?branch=master)# anyport
A command line tool to get a list of available ports.
## Installation
```shell
npm i anyport
```## Usage
```shell
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.
```shell
$ anyport
8000
```With the `--num` option, you can specify how many ports you want to get. The port numbers are delimited by comma.
```shell
$ 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.
```shell
$ anyport --min 9000
9000
$ anyport --min 9000 --max 9005 --num 10
9000,9001,9002,9003,9004,9005
```## License
MIT.