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