ws-cli
This CLI allows you to record data from a provided list of WebSocket servers.
Authors
- Florentin Thullier - 2021
Installation
Simple
-
Install or update node to 16 or greater if not already done.
-
Install the project :
$ npm install -g @florentinth/ws-cli
Manual
-
Install or update node to 16 or greater if not already done.
-
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
- Install the project:
$ cd ws-cli/
$ npm i
- Run the program locally:
$ node ./bin/ws-cli.js
# or
$ npm run start
- 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.