subsh
v0.1.0
Published
Interactive Polkadot.js REPL for Your Substrate Node.
Downloads
63
Maintainers
Readme
Subshell
Interactive Polkadot.js REPL for Your Substrate Node.
Subshell at its core is a simple cli tool wrapping the following lines of code.
#!/usr/bin/env -S node --experimental-repl-await
const { ApiPromise, WsProvider } = require(`@polkadot/api`)
const provider = new WsProvider(`wss://polkadot.api.onfinality.io/public-ws`);
const types={};
api = await ApiPromise.create({ provider, types});
...
Thanks to esbuild and vm2, it can execute snippets written in ts/mjs/js, and load dependencies from urls like what deno does.
It's still under active development, so expect breaking changes.
There is an online version hosted at https://subshell.xyz for you to play with.
Install
$ npm install -g subsh
Run
$ subsh --provider wss://rpc.polkadot.io
Features
🚧 UNDER CONSTRUCTION 🚧
For more documentation, visit doc.subshell.xyz
License
The author disclaims copyright to this source code. In place of a legal notice, here is a blessing:
May you do good and not evil.
May you find forgiveness for yourself and forgive others.
May you share freely, never taking more than you give.