Gitlab NPM Twitter
Kado
High Quality JavaScript Libraries

CommandServer

Introduced in 4.0.0

Stability: 2 - Stable

const CommandServer = require('kado/lib/CommandServer')

This library provides a run time for executing command line style commands either via API or actual TTY. This makes testing and programmable usage trivial.

Class: CommandServer

static CommandServer.getInstance()

CommandServer.constructor()

CommandServer.setVersion(version)

CommandServer.addCommand(module, name, command)

CommandServer.getCommand(module, name)

CommandServer.removeCommand(module, name)

CommandServer.all()

CommandServer.command(module, name, options)

This actually uses the Command library to setup the new command based on the options and is a shortcut for.

CommandSerer.addCommand('someModule','someCommand',new Command())

CommandServer.run(command)