# `NPM.Node.Exec`
[🔗](https://github.com/elixir-volt/npm_ex/blob/v0.7.4/lib/npm/node/exec.ex#L1)

npx-style execution — resolve and run binaries from installed packages.

Looks up binaries in `node_modules/.bin/` or resolves from package
bin fields to find the right executable.

# `available`

```elixir
@spec available(String.t()) :: [String.t()]
```

Lists all available binaries from installed packages.

# `available?`

```elixir
@spec available?(String.t(), String.t()) :: boolean()
```

Checks if a command is available in node_modules.

# `env`

```elixir
@spec env(String.t()) :: [{String.t(), String.t()}]
```

Builds the execution environment with node_modules/.bin in PATH.

# `package_for`

```elixir
@spec package_for(String.t(), String.t()) :: {:ok, String.t()} | {:error, :not_found}
```

Resolves a package name from a command by checking bin fields.

# `which`

```elixir
@spec which(String.t(), String.t()) :: {:ok, String.t()} | {:error, :not_found}
```

Finds the path to a binary command in node_modules/.bin/.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
