This is a collection of cli tools to use on Polkadot and Substrate chains.
The repo is split up into a number of internal packages -
- @polkadot/api-cli A cli tool to allow you to make API calls to any running node
- @polkadot/monitor-rpc A simple monitoring interface that checks the health of a remote node via RPC
You can install the packages globally via npm, i.e.
# api-cli or monitor-rpc npm install -g @polkadot/api-cli
And then you can execute it via
polkadot-js-api [...options] or `polkadot-js-monitor [...options]
Alternatively a docker image is provided as well (or you can build your own from this repo). Usage is as follow -
docker run jacogr/polkadot-js-tools <api|monitor> [...options]
With docker, if you are connecting to a local node for the API or monitor, and use the (default)
127.0.0.1 host, you would need to pass
--network=host as a flag, i.e.
docker run --network=host ... and pass the appropriate flags to the node to allow connections for docker.
Contributions are welcome!