kagami
v0.0.1
Published
Simple terminal mirroring for Node.js
Downloads
7
Readme
#Kagami - Simple terminal mirroring for Node.js ##Contents
##Install
npm install kagami
Kagami allows you to run an emulated terminal within an existing Node.js process.
node server.js
Listening for connections at http://localhost:3000
kagami
===========================
= kagami terminal started =
===========================
kagami:~ pachet$ pwd
/home/pachet/examples/kagami
kagami:~ pachet$ echo nifty!
nifty!
kagami:~ pachet$ exit
===========================
= closing kagami terminal =
===========================
Now when you run the application, you can type 'kagami' or 'kg' in the terminal to start Kagami. Run whatever commands you want, then type 'exit' in the terminal to close the Kagami session.
You can also add an optional command for Kagami to run on startup, eg:
kagami pwd && ls
===========================
= kagami terminal started =
===========================
kagami:~ pachet$ pwd && ls
/home/pachet/examples/kagami
README.md index.js package.json
var kagami = require('kagami');
kagami.start();
//===========================
//= kagami terminal started =
//===========================
//
//kagami:~ pachet$
var kagami = require('kagami');
kagami.start();
//===========================
//= kagami terminal started =
//===========================
//
//kagami:~ pachet$
kagami.stop();
//===========================
//= closing kagami terminal =
//===========================
Kagami is MIT licensed. You can read the license here.