pxc-cli v1.0.7
pxc-cli
Overview
This repository centralizes scripts to do repetitive tasks using pxc-api. See npm page: https://www.npmjs.com/package/pxc-cli
Install
npm i -g pxc-cli
Run
pxc-cli
or
npm run start
Install (for development purpose)
git clone git@gitlab.com:proxyclick/flow/js-libs/cli.git
cd cli
npm install
npm run build
npm link
Hint for development
Just extend the Script abstract class and provide script description, name and arguments definitions through constructor. Override the 'execute' method. Feel free to inspire from one of the existing implementation in 'src/scripts/impl'. The documentation is automatically generated (a pre-commit hook is set up) via the args definition you provide in your script.
Do not forget to bump package version and publish it (npm publish) once you're done (so that everyone could enjoy your modifications).
Scripts documentation :
The following documentation has been generated automatically.
copy-rr-settings
Copy remote registration settings from one location to a list of locations.
pxc-cli copy-rr-settings [<args>]
or
pxc-cli copy-rr-settings -f path-to-config.json
Options
Argument | Alias | Type | Description |
---|---|---|---|
origin | o | string | The origin company id to copy settings from |
destinations | d | string[] | The destination (company ids) for the settings to be copied to |
configFile | f | string | Optional - The json file to get these options from (instead of using command args) |
baseUrl | b | string | The Proyclick API base url (ex: https://api.proxyclick-local.com) |
clientId | i | string | The Proyclick API client id |
clientSecret | s | string | The Proyclick API client secret |
help | h | boolean | Optional - Prints this usage guide |
user-info
Get a user information.
pxc-cli user-info [<args>]
or
pxc-cli user-info -f path-to-config.json
Options
Argument | Alias | Type | Description |
---|---|---|---|
companyId | c | string | The company id of the user |
userId | u | string | The user id |
configFile | f | string | Optional - The json file to get these options from (instead of using command args) |
baseUrl | b | string | The Proyclick API base url (ex: https://api.proxyclick-local.com) |
clientId | i | string | The Proyclick API client id |
clientSecret | s | string | The Proyclick API client secret |
help | h | boolean | Optional - Prints this usage guide |