# shell-exec

> A tiny cross-platform promise based wrapper around child_process.spawn.

Latest version **1.1.2** (published 2022-05-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install shell-exec
pnpm add shell-exec
yarn add shell-exec
bun add shell-exec
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2022-05-17 |
| First published | 2017-06-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=12 |
| Dependencies | 0 |
| Unpacked size | 10.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 24 |
| Author | Tiaan du Plessis |
| Maintainers | tiaanduplessis |
| Keywords | shell-exec, shell, sh, exec |

## Links

- npm: https://www.npmjs.com/package/shell-exec
- Repository: https://github.com/tiaanduplessis/shell-exec
- Homepage: https://github.com/tiaanduplessis/shell-exec#readme
- Issues: https://github.com/tiaanduplessis/shell-exec/issues
- npm.io page: https://npm.io/package/shell-exec

## Alternatives

- [csv-to-markdown-table](https://npm.io/package/csv-to-markdown-table.md) — 47.0K weekly downloads
- [@sapphire/ratelimits](https://npm.io/package/@sapphire/ratelimits.md) — 4.4K weekly downloads
- [js-csvparser](https://npm.io/package/js-csvparser.md) — 2.0K weekly downloads
- [@adadapted/js-sdk](https://npm.io/package/@adadapted/js-sdk.md) — 251 weekly downloads
- [@grapecity/spread-sheets-sparklines](https://npm.io/package/@grapecity/spread-sheets-sparklines.md) — 103 weekly downloads

## Recent versions

- 1.1.2 (latest) — 2022-05-17
- 1.1.1 — 2022-05-17
- 1.1.0 — 2022-05-17
- 1.0.2 — 2018-09-11
- 1.0.1 — 2018-05-14
- 1.0.0 — 2017-06-26

## README

# 🐚 shell-exec
[![package version](https://img.shields.io/npm/v/shell-exec.svg?style=flat-square)](https://npmjs.org/package/shell-exec)
[![package downloads](https://img.shields.io/npm/dm/shell-exec.svg?style=flat-square)](https://npmjs.org/package/shell-exec)
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
[![package license](https://img.shields.io/npm/l/shell-exec.svg?style=flat-square)](https://npmjs.org/package/shell-exec)
[![make a pull request](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)

A tiny cross-platform promise based wrapper around child_process.spawn.

## Table of Contents

- [🐚 shell-exec](#-shell-exec)
  - [Table of Contents](#table-of-contents)
  - [⚙️ Install](#️-install)
  - [📖 Usage](#-usage)
  - [📚 API](#-api)
    - [`shellExec(command, options)`](#shellexeccommand-options)
  - [💬 Contributing](#-contributing)
  - [🪪 License](#-license)

## ⚙️ Install

Install the package locally within you project folder with your package manager:

With `npm`:
```sh
npm install shell-exec
```

With `yarn`:
```sh
yarn add shell-exec
```

With `pnpm`:
```sh
pnpm add shell-exec
```

## 📖 Usage

```ts
import shellExec from 'shell-exec'
shellExec('echo Hi!').then(console.log).catch(console.log)
```

## 📚 API

### `shellExec(command, options)`

**Parameters:**

- *`command`* {String | Array} - String or Array of commands to run
- *`options`* {Object} - Options object passed to [`child_process.spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options)

The function then returns a `Promise`.

See the hosted docs [here](https://paka.dev/npm/shell-exec@1.1.0/api).

## 💬 Contributing

Got an idea for a new feature? Found a bug? Contributions are welcome! Please [open up an issue](https://github.com/tiaanduplessis/shell-exec/issues) or [make a pull request](https://makeapullrequest.com/).

## 🪪 License

[MIT © Tiaan du Plessis](./LICENSE)

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