2.0.4 • Published 2 years ago

@florentinth/ws-cli v2.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

ws-cli

platform node License snyk build GitHub Release

This CLI allows you to record data from a provided list of WebSocket servers.

Authors

Installation

Simple

  1. Install or update node to 16 or greater if not already done.

  2. Install the project :

$ npm install -g @florentinth/ws-cli

Manual

  1. Install or update node to 16 or greater if not already done.

  2. Clone this repo:

$ git clone https://github.com/FlorentinTh/ws-cli.git

# or

$ git clone git@github.com:FlorentinTh/ws-cli.git

# or

$ gh repo clone FlorentinTh/ws-cli
  1. Install the project:
$ cd ws-cli/
$ npm i
  1. Run the program locally:
$ node ./bin/ws-cli.js

# or

$ npm run start
  1. Run the program globally:
$ npm run link

You should now have access to the ws-cli command from anywhere in your favorite terminal appication.

Usage

Usage:
  $ ws-cli [options]

Options:
  -c, -C, --conf     Path of the YAML configuration file containing the list of
                     the WebSocket servers   [string] [default: "./servers.yml"]

  -h, -H, --help     Show help                                         [boolean]

  -l, -L, --label    Label output folder according to the user entry instead of
                     a timestamp by default and add the provided label to the
                     data                             [boolean] [default: false]

  -v, -V, --version  Show version number                               [boolean]

Example of YAML Configuration File

- name: 'WebSocket Server 1'
  host: 127.0.0.1
  port: 5001
  secured: false

- name: 'WebSocket Server 2'
  host: 127.0.0.1
  port: 5002
  secured: true

- name: 'WebSocket Server 3'
  host: 127.0.0.1
  port: 5003
  endpoint: 'data'
  secured: false

License

This project is licensed under the MIT License - see the LICENSE file for details.