2018-01-06 13:19:04 +00:00
|
|
|
# npx
|
|
|
|
|
|
|
|
> Execute binaries from `npm` packages.
|
2022-02-02 18:43:21 +00:00
|
|
|
> More information: <https://github.com/npm/npx>.
|
2018-01-06 13:19:04 +00:00
|
|
|
|
2023-04-08 13:50:02 +01:00
|
|
|
- Execute the command from a local or remote `npm` package:
|
2018-01-06 13:19:04 +00:00
|
|
|
|
2023-08-26 18:30:06 +01:00
|
|
|
`npx {{command}} {{argument1 argument2 ...}}`
|
2018-01-06 13:19:04 +00:00
|
|
|
|
2023-08-26 18:30:06 +01:00
|
|
|
- In case multiple commands with the same name exist, it is possible to explicitly specify the package:
|
2018-01-06 13:19:04 +00:00
|
|
|
|
2023-08-26 18:30:06 +01:00
|
|
|
`npx --package {{package}} {{command}}`
|
2018-01-06 13:19:04 +00:00
|
|
|
|
2022-09-09 02:33:18 +01:00
|
|
|
- Run a command if it exists in the current path or in `node_modules/.bin`:
|
2022-02-18 11:51:42 +00:00
|
|
|
|
2023-08-26 18:30:06 +01:00
|
|
|
`npx --no-install {{command}} {{argument1 argument2 ...}}`
|
2022-02-18 11:51:42 +00:00
|
|
|
|
2023-04-08 13:50:02 +01:00
|
|
|
- Execute a specific command suppressing any output from `npx` itself:
|
2022-02-18 11:51:42 +00:00
|
|
|
|
2023-08-26 18:30:06 +01:00
|
|
|
`npx --quiet {{command}} {{argument1 argument2 ...}}`
|
2022-02-18 11:51:42 +00:00
|
|
|
|
|
|
|
- Display help:
|
2018-01-06 13:19:04 +00:00
|
|
|
|
|
|
|
`npx --help`
|