# find-exec

> Finds first available shell command from a list.

Latest version **1.0.3** (published 2023-08-24) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2023-08-24 |
| First published | 2014-09-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/find-exec) |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Hrvoje Simic |
| Maintainers | shime |
| Keywords | find, executable, shell, minimalistic, command, line |

## Links

- npm: https://www.npmjs.com/package/find-exec
- Repository: https://github.com/shime/find-exec
- Issues: https://github.com/shime/find-exec/issues
- npm.io page: https://npm.io/package/find-exec

## Dependencies (1)

- [shell-quote](https://npm.io/package/shell-quote.md) ^1.8.1

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2023-08-24
- 1.0.2 — 2022-01-04
- 1.0.1 — 2018-12-18
- 1.0.0 — 2016-10-24
- 0.0.8 — 2015-10-11
- 0.0.7 — 2015-03-16
- 0.0.6 — 2015-01-13
- 0.0.5 — 2015-01-12
- 0.0.4 — 2014-09-15
- 0.0.3 — 2014-09-12
- 0.0.2 — 2014-09-11
- 0.0.1 — 2014-09-11

## README

# find-exec

[![Downloads](https://img.shields.io/npm/dt/find-exec.svg)](https://npmjs.org/package/find-exec)

Takes a list of shell commands and returns the first available. Works synchronously to respect the order.

Returns `null` if none of the listed commands were found.

## Examples

    $ which mplayer
    which: no mplayer

    $ which afplay
    /usr/bin/afplay

```javascript
var command = require('find-exec')(["mplayer", "afplay", "cvlc"])
console.log(command) // afplay
```

```javascript
var command = require('find-exec')(["mplayer"])
console.log(command) // null
```

## Installation

    npm install find-exec

## License

MIT

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