node-stream-responder
StreamResponder
is a programmable Node.js module that allows you to interact with duplex streams.
I developed it to automate command line programs using ssh.
StreamResponder
is similar to Unix's expect
.
Installation
npm install node-stream-responder --save
Usage
var StreamResponder = ; var responder = ; respondersequence // wait for `trigger` then respond writing `response` to the stream // each trigger can be a string or a regular expression // control flow; wait for `trigger3` or `trigger5` // end branch. mandatory // you can nest control structures // optional // optional // optional // optional; // optional responder;
Alternatives
These are a few alternative projects: