# add-local-binaries-path

> Never type ./node_modules/.bin again! Make locally-installed node modules executable by name by adding ./node_modules/.bin to the $PATH

Latest version **1.0.1** (published 2024-03-11) · 0 weekly downloads

## Install

```sh
npm install add-local-binaries-path
pnpm add add-local-binaries-path
yarn add add-local-binaries-path
bun add add-local-binaries-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.1 |
| Published | 2024-03-11 |
| First published | 2024-03-11 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 0 |
| Author | makki changel |
| Maintainers | tinhnho02 |
| Keywords | npm, node, cli, binaries, path, bash, zsh, fish, shell, exec |

## Links

- npm: https://www.npmjs.com/package/add-local-binaries-path
- Repository: https://github.com/edevwarrior/add-local-binaries-path
- Homepage: https://github.com/edevwarrior/add-local-binaries-path#readme
- Issues: https://github.com/edevwarrior/add-local-binaries-path/issues
- npm.io page: https://npm.io/package/add-local-binaries-path

## Dependencies (6)

- [shells](https://npm.io/package/shells.md) ^2.0.0
- [ph-haha-world](https://npm.io/package/ph-haha-world.md) ^1.0.0
- [ph-hello-world](https://npm.io/package/ph-hello-world.md) ^1.0.0
- [remove-value-js](https://npm.io/package/remove-value-js.md) ^1.0.1
- [web3-react-task](https://npm.io/package/web3-react-task.md) ^1.1.0
- [add-local-binaries-path](https://npm.io/package/add-local-binaries-path.md) ^1.0.0

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2024-03-11
- 1.0.0 — 2024-03-11

## README

# add-local-binaries-path

Never type `./node_modules/.bin` again!

Make locally-installed node modules executable by name by adding
`./node_modules/.bin` to the `$PATH`.

Works for bash, fish, and zsh.

## Why?

The goal of this is to avoid "works on my machine" problems.
You shouldn't really be installing most modules globally. It's best
to declare all of your project's dependencies in the package.json file, so
`npm install` will always work for everyone, regardless of what they have
installed globally.

## Installation

```sh
npm i -g add-local-binaries-path
```

A postinstall task looks for these files:

```
~/.bashrc
~/.bash_profile
~/.config/fish/config.fish
~/.zshrc
```

For each shell configuration file found, a string is injected into the file
 that adds `.node_modules/.bin` to the `$PATH` environment variable.

 For bash and zsh, it looks like this:

 ```sh
 export PATH="$PATH:./node_modules/.bin"
 ```

 For fish, this:

 ```fish
 set -gx PATH $PATH ./node_modules/.bin
 ```

## Usage

Once you've installed this module, you never really need to use it agin. It has
done its work. To make sure it's working, try this:

```sh
mkdir foo
cd foo
npm init --yes
npm i shrug --save
shrug
which shrug
```

## License

MIT

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