11cb0ef41Sopenharmony_ci--- 21cb0ef41Sopenharmony_cititle: npm-exec 31cb0ef41Sopenharmony_cisection: 1 41cb0ef41Sopenharmony_cidescription: Run a command from a local or remote npm package 51cb0ef41Sopenharmony_ci--- 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ci### Synopsis 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ci```bash 101cb0ef41Sopenharmony_cinpm exec -- <pkg>[@<version>] [args...] 111cb0ef41Sopenharmony_cinpm exec --package=<pkg>[@<version>] -- <cmd> [args...] 121cb0ef41Sopenharmony_cinpm exec -c '<cmd> [args...]' 131cb0ef41Sopenharmony_cinpm exec --package=foo -c '<cmd> [args...]' 141cb0ef41Sopenharmony_ci 151cb0ef41Sopenharmony_cialias: x 161cb0ef41Sopenharmony_ci``` 171cb0ef41Sopenharmony_ci 181cb0ef41Sopenharmony_ci### Description 191cb0ef41Sopenharmony_ci 201cb0ef41Sopenharmony_ciThis command allows you to run an arbitrary command from an npm package 211cb0ef41Sopenharmony_ci(either one installed locally, or fetched remotely), in a similar context 221cb0ef41Sopenharmony_cias running it via `npm run`. 231cb0ef41Sopenharmony_ci 241cb0ef41Sopenharmony_ciRun without positional arguments or `--call`, this allows you to 251cb0ef41Sopenharmony_ciinteractively run commands in the same sort of shell environment that 261cb0ef41Sopenharmony_ci`package.json` scripts are run. Interactive mode is not supported in CI 271cb0ef41Sopenharmony_cienvironments when standard input is a TTY, to prevent hangs. 281cb0ef41Sopenharmony_ci 291cb0ef41Sopenharmony_ciWhatever packages are specified by the `--package` option will be 301cb0ef41Sopenharmony_ciprovided in the `PATH` of the executed command, along with any locally 311cb0ef41Sopenharmony_ciinstalled package executables. The `--package` option may be 321cb0ef41Sopenharmony_cispecified multiple times, to execute the supplied command in an environment 331cb0ef41Sopenharmony_ciwhere all specified packages are available. 341cb0ef41Sopenharmony_ci 351cb0ef41Sopenharmony_ciIf any requested packages are not present in the local project 361cb0ef41Sopenharmony_cidependencies, then a prompt is printed, which can be suppressed by 371cb0ef41Sopenharmony_ciproviding either `--yes` or `--no`. When standard input is not a TTY or a 381cb0ef41Sopenharmony_ciCI environment is detected, `--yes` is assumed. The requested packages are 391cb0ef41Sopenharmony_ciinstalled to a folder in the npm cache, which is added to the `PATH` 401cb0ef41Sopenharmony_cienvironment variable in the executed process. 411cb0ef41Sopenharmony_ci 421cb0ef41Sopenharmony_ciPackage names provided without a specifier will be matched with whatever 431cb0ef41Sopenharmony_civersion exists in the local project. Package names with a specifier will 441cb0ef41Sopenharmony_cionly be considered a match if they have the exact same name and version as 451cb0ef41Sopenharmony_cithe local dependency. 461cb0ef41Sopenharmony_ci 471cb0ef41Sopenharmony_ciIf no `-c` or `--call` option is provided, then the positional arguments 481cb0ef41Sopenharmony_ciare used to generate the command string. If no `--package` options 491cb0ef41Sopenharmony_ciare provided, then npm will attempt to determine the executable name from 501cb0ef41Sopenharmony_cithe package specifier provided as the first positional argument according 511cb0ef41Sopenharmony_cito the following heuristic: 521cb0ef41Sopenharmony_ci 531cb0ef41Sopenharmony_ci- If the package has a single entry in its `bin` field in `package.json`, 541cb0ef41Sopenharmony_ci or if all entries are aliases of the same command, then that command 551cb0ef41Sopenharmony_ci will be used. 561cb0ef41Sopenharmony_ci- If the package has multiple `bin` entries, and one of them matches the 571cb0ef41Sopenharmony_ci unscoped portion of the `name` field, then that command will be used. 581cb0ef41Sopenharmony_ci- If this does not result in exactly one option (either because there are 591cb0ef41Sopenharmony_ci no bin entries, or none of them match the `name` of the package), then 601cb0ef41Sopenharmony_ci `npm exec` exits with an error. 611cb0ef41Sopenharmony_ci 621cb0ef41Sopenharmony_ciTo run a binary _other than_ the named binary, specify one or more 631cb0ef41Sopenharmony_ci`--package` options, which will prevent npm from inferring the package from 641cb0ef41Sopenharmony_cithe first command argument. 651cb0ef41Sopenharmony_ci 661cb0ef41Sopenharmony_ci### `npx` vs `npm exec` 671cb0ef41Sopenharmony_ci 681cb0ef41Sopenharmony_ciWhen run via the `npx` binary, all flags and options *must* be set prior to 691cb0ef41Sopenharmony_ciany positional arguments. When run via `npm exec`, a double-hyphen `--` 701cb0ef41Sopenharmony_ciflag can be used to suppress npm's parsing of switches and options that 711cb0ef41Sopenharmony_cishould be sent to the executed command. 721cb0ef41Sopenharmony_ci 731cb0ef41Sopenharmony_ciFor example: 741cb0ef41Sopenharmony_ci 751cb0ef41Sopenharmony_ci``` 761cb0ef41Sopenharmony_ci$ npx foo@latest bar --package=@npmcli/foo 771cb0ef41Sopenharmony_ci``` 781cb0ef41Sopenharmony_ci 791cb0ef41Sopenharmony_ciIn this case, npm will resolve the `foo` package name, and run the 801cb0ef41Sopenharmony_cifollowing command: 811cb0ef41Sopenharmony_ci 821cb0ef41Sopenharmony_ci``` 831cb0ef41Sopenharmony_ci$ foo bar --package=@npmcli/foo 841cb0ef41Sopenharmony_ci``` 851cb0ef41Sopenharmony_ci 861cb0ef41Sopenharmony_ciSince the `--package` option comes _after_ the positional arguments, it is 871cb0ef41Sopenharmony_citreated as an argument to the executed command. 881cb0ef41Sopenharmony_ci 891cb0ef41Sopenharmony_ciIn contrast, due to npm's argument parsing logic, running this command is 901cb0ef41Sopenharmony_cidifferent: 911cb0ef41Sopenharmony_ci 921cb0ef41Sopenharmony_ci``` 931cb0ef41Sopenharmony_ci$ npm exec foo@latest bar --package=@npmcli/foo 941cb0ef41Sopenharmony_ci``` 951cb0ef41Sopenharmony_ci 961cb0ef41Sopenharmony_ciIn this case, npm will parse the `--package` option first, resolving the 971cb0ef41Sopenharmony_ci`@npmcli/foo` package. Then, it will execute the following command in that 981cb0ef41Sopenharmony_cicontext: 991cb0ef41Sopenharmony_ci 1001cb0ef41Sopenharmony_ci``` 1011cb0ef41Sopenharmony_ci$ foo@latest bar 1021cb0ef41Sopenharmony_ci``` 1031cb0ef41Sopenharmony_ci 1041cb0ef41Sopenharmony_ciThe double-hyphen character is recommended to explicitly tell npm to stop 1051cb0ef41Sopenharmony_ciparsing command line options and switches. The following command would 1061cb0ef41Sopenharmony_cithus be equivalent to the `npx` command above: 1071cb0ef41Sopenharmony_ci 1081cb0ef41Sopenharmony_ci``` 1091cb0ef41Sopenharmony_ci$ npm exec -- foo@latest bar --package=@npmcli/foo 1101cb0ef41Sopenharmony_ci``` 1111cb0ef41Sopenharmony_ci 1121cb0ef41Sopenharmony_ci### Configuration 1131cb0ef41Sopenharmony_ci 1141cb0ef41Sopenharmony_ci#### `package` 1151cb0ef41Sopenharmony_ci 1161cb0ef41Sopenharmony_ci* Default: 1171cb0ef41Sopenharmony_ci* Type: String (can be set multiple times) 1181cb0ef41Sopenharmony_ci 1191cb0ef41Sopenharmony_ciThe package or packages to install for [`npm exec`](/commands/npm-exec) 1201cb0ef41Sopenharmony_ci 1211cb0ef41Sopenharmony_ci 1221cb0ef41Sopenharmony_ci 1231cb0ef41Sopenharmony_ci#### `call` 1241cb0ef41Sopenharmony_ci 1251cb0ef41Sopenharmony_ci* Default: "" 1261cb0ef41Sopenharmony_ci* Type: String 1271cb0ef41Sopenharmony_ci 1281cb0ef41Sopenharmony_ciOptional companion option for `npm exec`, `npx` that allows for specifying a 1291cb0ef41Sopenharmony_cicustom command to be run along with the installed packages. 1301cb0ef41Sopenharmony_ci 1311cb0ef41Sopenharmony_ci```bash 1321cb0ef41Sopenharmony_cinpm exec --package yo --package generator-node --call "yo node" 1331cb0ef41Sopenharmony_ci``` 1341cb0ef41Sopenharmony_ci 1351cb0ef41Sopenharmony_ci 1361cb0ef41Sopenharmony_ci 1371cb0ef41Sopenharmony_ci#### `workspace` 1381cb0ef41Sopenharmony_ci 1391cb0ef41Sopenharmony_ci* Default: 1401cb0ef41Sopenharmony_ci* Type: String (can be set multiple times) 1411cb0ef41Sopenharmony_ci 1421cb0ef41Sopenharmony_ciEnable running a command in the context of the configured workspaces of the 1431cb0ef41Sopenharmony_cicurrent project while filtering by running only the workspaces defined by 1441cb0ef41Sopenharmony_cithis configuration option. 1451cb0ef41Sopenharmony_ci 1461cb0ef41Sopenharmony_ciValid values for the `workspace` config are either: 1471cb0ef41Sopenharmony_ci 1481cb0ef41Sopenharmony_ci* Workspace names 1491cb0ef41Sopenharmony_ci* Path to a workspace directory 1501cb0ef41Sopenharmony_ci* Path to a parent workspace directory (will result in selecting all 1511cb0ef41Sopenharmony_ci workspaces within that folder) 1521cb0ef41Sopenharmony_ci 1531cb0ef41Sopenharmony_ciWhen set for the `npm init` command, this may be set to the folder of a 1541cb0ef41Sopenharmony_ciworkspace which does not yet exist, to create the folder and set it up as a 1551cb0ef41Sopenharmony_cibrand new workspace within the project. 1561cb0ef41Sopenharmony_ci 1571cb0ef41Sopenharmony_ciThis value is not exported to the environment for child processes. 1581cb0ef41Sopenharmony_ci 1591cb0ef41Sopenharmony_ci#### `workspaces` 1601cb0ef41Sopenharmony_ci 1611cb0ef41Sopenharmony_ci* Default: null 1621cb0ef41Sopenharmony_ci* Type: null or Boolean 1631cb0ef41Sopenharmony_ci 1641cb0ef41Sopenharmony_ciSet to true to run the command in the context of **all** configured 1651cb0ef41Sopenharmony_ciworkspaces. 1661cb0ef41Sopenharmony_ci 1671cb0ef41Sopenharmony_ciExplicitly setting this to false will cause commands like `install` to 1681cb0ef41Sopenharmony_ciignore workspaces altogether. When not set explicitly: 1691cb0ef41Sopenharmony_ci 1701cb0ef41Sopenharmony_ci- Commands that operate on the `node_modules` tree (install, update, etc.) 1711cb0ef41Sopenharmony_ciwill link workspaces into the `node_modules` folder. - Commands that do 1721cb0ef41Sopenharmony_ciother things (test, exec, publish, etc.) will operate on the root project, 1731cb0ef41Sopenharmony_ci_unless_ one or more workspaces are specified in the `workspace` config. 1741cb0ef41Sopenharmony_ci 1751cb0ef41Sopenharmony_ciThis value is not exported to the environment for child processes. 1761cb0ef41Sopenharmony_ci 1771cb0ef41Sopenharmony_ci#### `include-workspace-root` 1781cb0ef41Sopenharmony_ci 1791cb0ef41Sopenharmony_ci* Default: false 1801cb0ef41Sopenharmony_ci* Type: Boolean 1811cb0ef41Sopenharmony_ci 1821cb0ef41Sopenharmony_ciInclude the workspace root when workspaces are enabled for a command. 1831cb0ef41Sopenharmony_ci 1841cb0ef41Sopenharmony_ciWhen false, specifying individual workspaces via the `workspace` config, or 1851cb0ef41Sopenharmony_ciall workspaces via the `workspaces` flag, will cause npm to operate only on 1861cb0ef41Sopenharmony_cithe specified workspaces, and not on the root project. 1871cb0ef41Sopenharmony_ci 1881cb0ef41Sopenharmony_ciThis value is not exported to the environment for child processes. 1891cb0ef41Sopenharmony_ci 1901cb0ef41Sopenharmony_ci### Examples 1911cb0ef41Sopenharmony_ci 1921cb0ef41Sopenharmony_ciRun the version of `tap` in the local dependencies, with the provided 1931cb0ef41Sopenharmony_ciarguments: 1941cb0ef41Sopenharmony_ci 1951cb0ef41Sopenharmony_ci``` 1961cb0ef41Sopenharmony_ci$ npm exec -- tap --bail test/foo.js 1971cb0ef41Sopenharmony_ci$ npx tap --bail test/foo.js 1981cb0ef41Sopenharmony_ci``` 1991cb0ef41Sopenharmony_ci 2001cb0ef41Sopenharmony_ciRun a command _other than_ the command whose name matches the package name 2011cb0ef41Sopenharmony_ciby specifying a `--package` option: 2021cb0ef41Sopenharmony_ci 2031cb0ef41Sopenharmony_ci``` 2041cb0ef41Sopenharmony_ci$ npm exec --package=foo -- bar --bar-argument 2051cb0ef41Sopenharmony_ci# ~ or ~ 2061cb0ef41Sopenharmony_ci$ npx --package=foo bar --bar-argument 2071cb0ef41Sopenharmony_ci``` 2081cb0ef41Sopenharmony_ci 2091cb0ef41Sopenharmony_ciRun an arbitrary shell script, in the context of the current project: 2101cb0ef41Sopenharmony_ci 2111cb0ef41Sopenharmony_ci``` 2121cb0ef41Sopenharmony_ci$ npm x -c 'eslint && say "hooray, lint passed"' 2131cb0ef41Sopenharmony_ci$ npx -c 'eslint && say "hooray, lint passed"' 2141cb0ef41Sopenharmony_ci``` 2151cb0ef41Sopenharmony_ci 2161cb0ef41Sopenharmony_ci### Workspaces support 2171cb0ef41Sopenharmony_ci 2181cb0ef41Sopenharmony_ciYou may use the [`workspace`](/using-npm/config#workspace) or 2191cb0ef41Sopenharmony_ci[`workspaces`](/using-npm/config#workspaces) configs in order to run an 2201cb0ef41Sopenharmony_ciarbitrary command from an npm package (either one installed locally, or fetched 2211cb0ef41Sopenharmony_ciremotely) in the context of the specified workspaces. 2221cb0ef41Sopenharmony_ciIf no positional argument or `--call` option is provided, it will open an 2231cb0ef41Sopenharmony_ciinteractive subshell in the context of each of these configured workspaces one 2241cb0ef41Sopenharmony_ciat a time. 2251cb0ef41Sopenharmony_ci 2261cb0ef41Sopenharmony_ciGiven a project with configured workspaces, e.g: 2271cb0ef41Sopenharmony_ci 2281cb0ef41Sopenharmony_ci``` 2291cb0ef41Sopenharmony_ci. 2301cb0ef41Sopenharmony_ci+-- package.json 2311cb0ef41Sopenharmony_ci`-- packages 2321cb0ef41Sopenharmony_ci +-- a 2331cb0ef41Sopenharmony_ci | `-- package.json 2341cb0ef41Sopenharmony_ci +-- b 2351cb0ef41Sopenharmony_ci | `-- package.json 2361cb0ef41Sopenharmony_ci `-- c 2371cb0ef41Sopenharmony_ci `-- package.json 2381cb0ef41Sopenharmony_ci``` 2391cb0ef41Sopenharmony_ci 2401cb0ef41Sopenharmony_ciAssuming the workspace configuration is properly set up at the root level 2411cb0ef41Sopenharmony_ci`package.json` file. e.g: 2421cb0ef41Sopenharmony_ci 2431cb0ef41Sopenharmony_ci``` 2441cb0ef41Sopenharmony_ci{ 2451cb0ef41Sopenharmony_ci "workspaces": [ "./packages/*" ] 2461cb0ef41Sopenharmony_ci} 2471cb0ef41Sopenharmony_ci``` 2481cb0ef41Sopenharmony_ci 2491cb0ef41Sopenharmony_ciYou can execute an arbitrary command from a package in the context of each of 2501cb0ef41Sopenharmony_cithe configured workspaces when using the 2511cb0ef41Sopenharmony_ci[`workspaces` config options](/using-npm/config#workspace), in this example 2521cb0ef41Sopenharmony_ciwe're using **eslint** to lint any js file found within each workspace folder: 2531cb0ef41Sopenharmony_ci 2541cb0ef41Sopenharmony_ci``` 2551cb0ef41Sopenharmony_cinpm exec --ws -- eslint ./*.js 2561cb0ef41Sopenharmony_ci``` 2571cb0ef41Sopenharmony_ci 2581cb0ef41Sopenharmony_ci#### Filtering workspaces 2591cb0ef41Sopenharmony_ci 2601cb0ef41Sopenharmony_ciIt's also possible to execute a command in a single workspace using the 2611cb0ef41Sopenharmony_ci`workspace` config along with a name or directory path: 2621cb0ef41Sopenharmony_ci 2631cb0ef41Sopenharmony_ci``` 2641cb0ef41Sopenharmony_cinpm exec --workspace=a -- eslint ./*.js 2651cb0ef41Sopenharmony_ci``` 2661cb0ef41Sopenharmony_ci 2671cb0ef41Sopenharmony_ciThe `workspace` config can also be specified multiple times in order to run a 2681cb0ef41Sopenharmony_cispecific script in the context of multiple workspaces. When defining values for 2691cb0ef41Sopenharmony_cithe `workspace` config in the command line, it also possible to use `-w` as a 2701cb0ef41Sopenharmony_cishorthand, e.g: 2711cb0ef41Sopenharmony_ci 2721cb0ef41Sopenharmony_ci``` 2731cb0ef41Sopenharmony_cinpm exec -w a -w b -- eslint ./*.js 2741cb0ef41Sopenharmony_ci``` 2751cb0ef41Sopenharmony_ci 2761cb0ef41Sopenharmony_ciThis last command will run the `eslint` command in both `./packages/a` and 2771cb0ef41Sopenharmony_ci`./packages/b` folders. 2781cb0ef41Sopenharmony_ci 2791cb0ef41Sopenharmony_ci### Compatibility with Older npx Versions 2801cb0ef41Sopenharmony_ci 2811cb0ef41Sopenharmony_ciThe `npx` binary was rewritten in npm v7.0.0, and the standalone `npx` 2821cb0ef41Sopenharmony_cipackage deprecated at that time. `npx` uses the `npm exec` 2831cb0ef41Sopenharmony_cicommand instead of a separate argument parser and install process, with 2841cb0ef41Sopenharmony_cisome affordances to maintain backwards compatibility with the arguments it 2851cb0ef41Sopenharmony_ciaccepted in previous versions. 2861cb0ef41Sopenharmony_ci 2871cb0ef41Sopenharmony_ciThis resulted in some shifts in its functionality: 2881cb0ef41Sopenharmony_ci 2891cb0ef41Sopenharmony_ci- Any `npm` config value may be provided. 2901cb0ef41Sopenharmony_ci- To prevent security and user-experience problems from mistyping package 2911cb0ef41Sopenharmony_ci names, `npx` prompts before installing anything. Suppress this 2921cb0ef41Sopenharmony_ci prompt with the `-y` or `--yes` option. 2931cb0ef41Sopenharmony_ci- The `--no-install` option is deprecated, and will be converted to `--no`. 2941cb0ef41Sopenharmony_ci- Shell fallback functionality is removed, as it is not advisable. 2951cb0ef41Sopenharmony_ci- The `-p` argument is a shorthand for `--parseable` in npm, but shorthand 2961cb0ef41Sopenharmony_ci for `--package` in npx. This is maintained, but only for the `npx` 2971cb0ef41Sopenharmony_ci executable. 2981cb0ef41Sopenharmony_ci- The `--ignore-existing` option is removed. Locally installed bins are 2991cb0ef41Sopenharmony_ci always present in the executed process `PATH`. 3001cb0ef41Sopenharmony_ci- The `--npm` option is removed. `npx` will always use the `npm` it ships 3011cb0ef41Sopenharmony_ci with. 3021cb0ef41Sopenharmony_ci- The `--node-arg` and `-n` options are removed. 3031cb0ef41Sopenharmony_ci- The `--always-spawn` option is redundant, and thus removed. 3041cb0ef41Sopenharmony_ci- The `--shell` option is replaced with `--script-shell`, but maintained 3051cb0ef41Sopenharmony_ci in the `npx` executable for backwards compatibility. 3061cb0ef41Sopenharmony_ci 3071cb0ef41Sopenharmony_ci### A note on caching 3081cb0ef41Sopenharmony_ci 3091cb0ef41Sopenharmony_ciThe npm cli utilizes its internal package cache when using the package 3101cb0ef41Sopenharmony_ciname specified. You can use the following to change how and when the 3111cb0ef41Sopenharmony_cicli uses this cache. See [`npm cache`](/commands/npm-cache) for more on 3121cb0ef41Sopenharmony_cihow the cache works. 3131cb0ef41Sopenharmony_ci 3141cb0ef41Sopenharmony_ci#### prefer-online 3151cb0ef41Sopenharmony_ci 3161cb0ef41Sopenharmony_ciForces staleness checks for packages, making the cli look for updates 3171cb0ef41Sopenharmony_ciimmediately even if the package is already in the cache. 3181cb0ef41Sopenharmony_ci 3191cb0ef41Sopenharmony_ci#### prefer-offline 3201cb0ef41Sopenharmony_ci 3211cb0ef41Sopenharmony_ciBypasses staleness checks for packages. Missing data will still be 3221cb0ef41Sopenharmony_cirequested from the server. To force full offline mode, use `offline`. 3231cb0ef41Sopenharmony_ci 3241cb0ef41Sopenharmony_ci#### offline 3251cb0ef41Sopenharmony_ci 3261cb0ef41Sopenharmony_ciForces full offline mode. Any packages not locally cached will result in 3271cb0ef41Sopenharmony_cian error. 3281cb0ef41Sopenharmony_ci 3291cb0ef41Sopenharmony_ci#### workspace 3301cb0ef41Sopenharmony_ci 3311cb0ef41Sopenharmony_ci* Default: 3321cb0ef41Sopenharmony_ci* Type: String (can be set multiple times) 3331cb0ef41Sopenharmony_ci 3341cb0ef41Sopenharmony_ciEnable running a command in the context of the configured workspaces of the 3351cb0ef41Sopenharmony_cicurrent project while filtering by running only the workspaces defined by 3361cb0ef41Sopenharmony_cithis configuration option. 3371cb0ef41Sopenharmony_ci 3381cb0ef41Sopenharmony_ciValid values for the `workspace` config are either: 3391cb0ef41Sopenharmony_ci 3401cb0ef41Sopenharmony_ci* Workspace names 3411cb0ef41Sopenharmony_ci* Path to a workspace directory 3421cb0ef41Sopenharmony_ci* Path to a parent workspace directory (will result to selecting all of the 3431cb0ef41Sopenharmony_ci nested workspaces) 3441cb0ef41Sopenharmony_ci 3451cb0ef41Sopenharmony_ciThis value is not exported to the environment for child processes. 3461cb0ef41Sopenharmony_ci 3471cb0ef41Sopenharmony_ci#### workspaces 3481cb0ef41Sopenharmony_ci 3491cb0ef41Sopenharmony_ci* Alias: `--ws` 3501cb0ef41Sopenharmony_ci* Type: Boolean 3511cb0ef41Sopenharmony_ci* Default: `false` 3521cb0ef41Sopenharmony_ci 3531cb0ef41Sopenharmony_ciRun scripts in the context of all configured workspaces for the current 3541cb0ef41Sopenharmony_ciproject. 3551cb0ef41Sopenharmony_ci 3561cb0ef41Sopenharmony_ci### See Also 3571cb0ef41Sopenharmony_ci 3581cb0ef41Sopenharmony_ci* [npm run-script](/commands/npm-run-script) 3591cb0ef41Sopenharmony_ci* [npm scripts](/using-npm/scripts) 3601cb0ef41Sopenharmony_ci* [npm test](/commands/npm-test) 3611cb0ef41Sopenharmony_ci* [npm start](/commands/npm-start) 3621cb0ef41Sopenharmony_ci* [npm restart](/commands/npm-restart) 3631cb0ef41Sopenharmony_ci* [npm stop](/commands/npm-stop) 3641cb0ef41Sopenharmony_ci* [npm config](/commands/npm-config) 3651cb0ef41Sopenharmony_ci* [npm workspaces](/using-npm/workspaces) 3661cb0ef41Sopenharmony_ci* [npx](/commands/npx) 367