# tinysh

> Tiny spawn wrapper

Latest version **1.0.0** (published 2022-06-22) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-06-22 |
| First published | 2022-06-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 75 |
| Author | Anton Medvedev |
| Maintainers | medv |
| Keywords | spawn |

## Links

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

## Recent versions

- 1.0.0 (latest) — 2022-06-22

## README

# tinysh

A tiny spawn wrapper for Node.js.

```js
const {ls, curl} = require('tinysh')

const list = ls('-la').trim().split('\n')

const resp = curl('https://medv.io')
```

## Usage

```sh
npm i tinysh
```

Import any binary you would like to call. Use it like a function.

```js
const {cat} = require('tinysh')

const content = cat('README.md')
```

To get exit code or stderr, use `.status` or `.stderr`.

```js
const {git} = require('tinysh')

console.log(git('pull').status)
```

To pass options to the [spawn], bind to an options object.

```js
const {tee} = require('tinysh')

tee.call({input: 'Hello, world!'}, 'file.txt')
```

## License

MIT

[spawn]: https://nodejs.org/api/child_process.html#child_processspawncommand-args-options

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