# executing-npm-path

> A path of the currently executed npm CLI

Latest version **1.0.0** (published 2018-06-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install executing-npm-path
pnpm add executing-npm-path
yarn add executing-npm-path
bun add executing-npm-path
```

## 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 | 2018-06-18 |
| First published | 2018-06-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Shinnosuke Watanabe |
| Maintainers | shinnn |
| Keywords | npm, npm-scripts, cli, path, location, env, executable, resolve, detect |

## Links

- npm: https://www.npmjs.com/package/executing-npm-path
- Repository: https://github.com/shinnn/executing-npm-path
- Homepage: https://github.com/shinnn/executing-npm-path#readme
- Issues: https://github.com/shinnn/executing-npm-path/issues
- npm.io page: https://npm.io/package/executing-npm-path

## Alternatives

- [replicas-cli](https://npm.io/package/replicas-cli.md) — 3.0K weekly downloads
- [env-contract](https://npm.io/package/env-contract.md) — 133 weekly downloads
- [@openveo/api](https://npm.io/package/@openveo/api.md) — 61 weekly downloads
- [@ryniaubenpm2/cumque-error-reiciendis](https://npm.io/package/@ryniaubenpm2/cumque-error-reiciendis.md) — 54 weekly downloads
- [ts-global-type-extra](https://npm.io/package/ts-global-type-extra.md) — 11 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2018-06-18
- 0.1.0 — 2018-06-14
- 0.0.0 — 2018-06-12

## README

# executing-npm-path

[![npm version](https://img.shields.io/npm/v/executing-npm-path.svg)](https://www.npmjs.com/package/executing-npm-path)
[![Build Status](https://travis-ci.com/shinnn/executing-npm-path.svg?branch=master)](https://travis-ci.com/shinnn/executing-npm-path)
[![Build status](https://ci.appveyor.com/api/projects/status/mx900j0cj5qfv62a/branch/master?svg=true)](https://ci.appveyor.com/project/ShinnosukeWatanabe/executing-npm-path/branch/master)
[![Coverage Status](https://img.shields.io/coveralls/shinnn/executing-npm-path.svg)](https://coveralls.io/github/shinnn/executing-npm-path?branch=master)

A path of the currently executed [npm CLI](https://github.com/npm/npm)

```javascript
require('executing-npm-path'); //=> /usr/local/lib/node_modules/npm/bin/npm-cli.js
```

## Installation

[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/getting-started/what-is-npm).

```
npm install executing-npm-path
```

## API

```javascript
const executingNpmPath = require('executing-npm-path');
```

### executingNpmPath

Type: `string` or `null`

If the program is executed by an [npm script](https://docs.npmjs.com/misc/scripts), it exposes a path of [`npm-cli.js`](https://github.com/npm/npm/blob/v6.1.0/bin/npm-cli.js), an entry point of npm CLI.

If the program is not executed by any package managers or executed by a non-npm package manager, for example [Yarn](https://github.com/yarnpkg/yarn), it exposes `null`.

## License

[ISC License](./LICENSE) © 2018 Shinnosuke Watanabe

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