@wishcore/reason-cli
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta1 • Public • Published

Reason CLI

A Command Line interface to Reason. It can also be used to programmatically access Reason.

Usage as Cli

All backend Socket API commands are available in the CLI.

Tab completion is available.

The result of each command is stored in the result variable.

Install

npm install -g https://reason.wishtech.org/reason.tgz

Run on Linux or OSX

reason-cli

Run on Windows

reason-cli

Example usage

Example usage:

documents.list()

Programmatic Usage

const { Client } = require('reason-cli');

const client = new Client('ws://localhost:8080');

client.ready().subscribe(() => {
    client.request('document.list', []).subscribe({
        next: (data) => {
            client.disconnect();
        },
        error: (error) => {
            console.log('Error in example.js:', error.toString());
            client.disconnect();
        }
    });
});

Readme

Keywords

Package Sidebar

Install

npm i @wishcore/reason-cli

Weekly Downloads

1

Version

1.0.0-beta1

License

ISC

Unpacked Size

12.7 kB

Total Files

11

Last publish

Collaborators

  • akaustel