# kagami

> Simple terminal mirroring for Node.js

Latest version **0.0.1** (published 2013-04-01) · 0 weekly downloads

## Install

```sh
npm install kagami
pnpm add kagami
yarn add kagami
bun add kagami
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2013-04-01 |
| First published | 2013-04-01 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | pachet |
| Maintainers | pachet |

## Links

- npm: https://www.npmjs.com/package/kagami
- npm.io page: https://npm.io/package/kagami

## Recent versions

- 0.0.1 (latest) — 2013-04-01

## README

#Kagami - Simple terminal mirroring for Node.js
##Contents

1. [Install](#install)
2. [Introduction](#introduction)
3. [API](#api)
	* [General Usage](#general-usage)
	* [kagami.start](#kagamistart)
	* [kagami.stop](#kagamistart)
5. [License](#license)


<br />

##Install

`````text
npm install kagami
`````

<br />
##Introduction

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 =
===========================
`````

<br />
##API

<br />
###General Usage
To enable Kagami in your Node application, just require it:
`````javascript
var kagami = require('kagami');
`````

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

`````

<br />
###kagami.start()
If you have assigned Kagami to a variable within your Node application, you can programmatically start a Kagami session by calling `kagami.start()`:

`````javascript
var kagami = require('kagami');
kagami.start();
//===========================
//= kagami terminal started =
//===========================
//
//kagami:~ pachet$
`````

<br />
###kagami.stop()
You can also kill the current Kagami session by calling `kagami.stop()`:

`````javascript
var kagami = require('kagami');
kagami.start();
//===========================
//= kagami terminal started =
//===========================
//
//kagami:~ pachet$

kagami.stop();
//===========================
//= closing kagami terminal =
//===========================

`````


<br />
##License

Kagami is MIT licensed. You can read the license [here](https://raw.github.com/pachet/kagami/master/license).

---
_Source: https://npm.io/package/kagami · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
