Command Line Interface for ubibot.
Currently alpha code
npm install @numical/ubibot-channel-cli
A channel package that provides a Command Line Interface (CLI) to a single-user implementation of ubibot.
This is not a standalone library.
It must be used as a dependency in an application such as @numical/echobot:
const { startCLI } = require("@numical/ubibot-channel-cli");
const { config } = require("an ubibot domain package");
startCLI(config);
This will result in:
This also offers a test runner for the CLI channel:
const { testCLI } = require("@numical/ubibot-channel-cli");
const { config } = require("an ubibot domain package");
const scriptsDir = path.resolve(...);
testCLI("My Domain Tests", config, scriptDir);
See @numical/ubibot-test for more on using this test runner.
This module exports 2 functions:
###startCLI(config)
- instantiates a single-user ubibot and starts a command line interface
arguments
- config (Object) : configuration object created by a domain package; returns
undefined - but a side effect is a spawned repl process
###testCLI(config)
- instantiates a single-user ubibot and runs a test runner for use with @numical/ubibot-test
arguments
- name (String): display name for the test
- config (Object) : configuration object created by a domain package; - scriptsDir (String) : the fully resolved path of the scripts directory. returns
undefined