# commandland

> terminal emulator with record & playback

Latest version **0.1.3** (published 2018-05-15) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2018-05-15 |
| First published | 2017-11-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 8.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Winton Welsh |
| Maintainers | winton |
| Keywords | nodejs, process |

## Links

- npm: https://www.npmjs.com/package/commandland
- Repository: https://github.com/winton/commandland
- Homepage: https://github.com/winton/commandland#readme
- Issues: https://github.com/winton/commandland/issues
- npm.io page: https://npm.io/package/commandland

## Dependencies (1)

- [node-pty](https://npm.io/package/node-pty.md) ^0.7.4

## Recent versions

- 0.1.3 (latest) — 2018-05-15
- 0.1.2 — 2018-01-31
- 0.1.1 — 2018-01-31
- 0.1.0 — 2018-01-31
- 0.0.8 — 2017-12-09
- 0.0.7 — 2017-11-29
- 0.0.6 — 2017-11-28
- 0.0.5 — 2017-11-28
- 0.0.4 — 2017-11-27
- 0.0.3 — 2017-11-26
- 0.0.2 — 2017-11-25
- 0.0.1 — 2017-11-25

## README

# commandland

I make executing commands look good.

![Nah](http://www.reactiongifs.com/r/ws.gif)

| Feature |
| --- |
| Live stdout with ASCII colors |
| Live stdin |
| (Or keep live stdout/stdin silent) |
| Capture output as string |
| Exit code and signal capture |
| [Session record & playback](#replay-a-session) |

## Run a command

```js
import { run } from "commandland"
let { code, out } = await run("ls", ["/"])
```

## Execution options

| Option | Example | Purpose |
| --- | --- | --- |
| args | `["/"]` | Command arguments |
| command | `"ls"` | Command to execute |
| cols, rows | `100`, `100` | Column and rows for pty |
| cwd | `process.env.HOME` | Working directory for pty |
| env | `process.env` | Environment for pty |
| onData | `()=>{}` | Pty data callback |
| record | `false` | Record the session |
| silent | `false` | Execute without stdout |
| stdin | `false` | Allow stdin input |

## Replay a session

```js
import { run, replay } from "commandland"
let { session } = await run("ls", ["/"], { record: true })
await replay(session)
```

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