# @sndrs/ok

> Run `npm-scripts` in the correct environment without further installation or config.

Latest version **0.3.5** (published 2021-06-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @sndrs/ok
pnpm add @sndrs/ok
yarn add @sndrs/ok
bun add @sndrs/ok
```

Provides the command `ok`.

## 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.3.5 |
| Published | 2021-06-11 |
| First published | 2020-03-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.17.0 <13.10.0 \|\| >=13.11.0 |
| Dependencies | 9 |
| Unpacked size | 8.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Alex Sanders |
| Maintainers | sndrs |

## Links

- npm: https://www.npmjs.com/package/@sndrs/ok
- Repository: https://github.com/sndrs/ok
- Homepage: https://github.com/sndrs/ok#readme
- Issues: https://github.com/sndrs/ok/issues
- npm.io page: https://npm.io/package/@sndrs/ok

## Dependencies (9)

- [ora](https://npm.io/package/ora.md) ^5.2.0
- [yarn](https://npm.io/package/yarn.md) 1.22.10
- [chalk](https://npm.io/package/chalk.md) ^4.1.0
- [semver](https://npm.io/package/semver.md) ^7.3.4
- [nvexeca](https://npm.io/package/nvexeca.md) 6.0.1
- [get-node](https://npm.io/package/get-node.md) ^11.0.2
- [read-pkg-up](https://npm.io/package/read-pkg-up.md) ^7.0.1
- [preferred-pm](https://npm.io/package/preferred-pm.md) ^3.0.2
- [update-notifier](https://npm.io/package/update-notifier.md) 5.0.1

## Recent versions

- 0.3.5 (latest) — 2021-06-11
- 0.3.4 — 2021-05-11
- 0.3.3 — 2021-01-11
- 0.3.2 — 2021-01-11
- 0.3.1 — 2021-01-11
- 0.3.0 — 2021-01-11
- 0.2.1 — 2020-11-19
- 0.2.0 — 2020-11-19
- 0.1.2 — 2020-03-18
- 0.1.1 — 2020-03-18
- 0.1.0 — 2020-03-18
- 0.0.0 — 2020-03-18

## README

# ok

> 🙇‍♂️ An obliging task runner

Run `npm-scripts` in the correct environment without further installation or config.

<img src="demo.gif" width="455">

## Install

<a href="https://npmjs.org/package/@sndrs/ok" title="View this project on NPM"><img src="https://img.shields.io/npm/v/@sndrs/ok.svg" alt="NPM version" /></a>

```bash
$ yarn global add @sndrs/ok
```

or

```bash
$ npm install -g @sndrs/ok
```

Then use it to run your `npm-scripts`:

```bash
$ ok test # etc...
```

### Changes the host env as little as possible

`ok` uses [nvexeca](https://github.com/ehmicky/nvexeca) behind the scenes. This means:

-   it does not need to make changes to `$PATH`
-   it does not affect existing Node versions
-   it does not affect `NVM`, `fnm` etc

### Follows project conventions

-   uses correct Node version, observing [`.nvmrc`, `engines` and more](https://github.com/ehmicky/preferred-node-version/blob/main/README.md)
-   uses the correct package manager for the project ([`yarn`, `npm` or `pnpm`](https://github.com/zkochan/packages/tree/master/preferred-pm))
    -   observes `engines.npm` if present (unlike npm)
-   always run tasks with up-to-date dependencies

### No further dependencies

-   uses its own copy of `yarn` if it cannot find one
-   no `nvm`/`n`/`fnm` etc needed

### Experience

-   All task output is shown – no magic
-   All available scripts in current context are discoverable by running without args (`> ok`)
-   Notifies you if you're using out-of-date version

## See also

-   [`nvexeca`](https://github.com/ehmicky/nvexeca): `nvm` + `execa`

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