paipctl
v1.0.6
Published
A cli for interacting with PAIP services
Downloads
5
Maintainers
Readme
PAIPCTL
PAIPCTL is a cli tool to interact with PAIP services
At the moment the only available command is invoke used to invoke a remote method exposed over nats.
INSTALLATION
You can install it as a global npm package by running: npm i -g paipctl
USAGE
INVOKE
You can invoke a remote method by pushing a local yaml file:
paipctl invoke -f test.yaml
test.yaml
subject: login
args:
- [email protected]
- password123
You can also pass required parameters directly via command line:
paipctl invoke --subject login --args [email protected] password123
TODO: implement global options to override default nats settings
OBSERVE
You can observe a paip notice message:
paipctl observe --subejct login
OPTIONS
Below the accepted command line options:
Parameter Name | Type | Required | Default | Description
-------- | -------- | ----------- | -------- | ------- |
--nats
| String | false | {} | this is the node-nats client connect option object https://github.com/nats-io/node-nats
--timeout
| number | false | 25000 | this is the milliseconds paip wait before declaring a request timed out
Environment Variables
All options are also configurable through environment variables:
Option Name | ENV Key Name |
-------- | -------- |
nats | PAIP_CLI_NATS
|
timeout | PAIP_CLI_TIMEOUT
|
Environment variables options have precedence and will overwrite the value passed via command line
Note PAIP_NATS and --nats should be stringified