subsh

0.1.0 • Public • Published

Subshell

Interactive Polkadot.js REPL for Your Substrate Node.

NPM version NPM downloads Subshell Discussion

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.

Package Sidebar

Install

npm i subsh

Weekly Downloads

9

Version

0.1.0

License

MIT

Unpacked Size

454 kB

Total Files

67

Last publish

Collaborators

  • btwiuse