versioned_docs_archived/version-5.x/pnpm-cli.md
Unlike npm, pnpm validates all options. For example, pnpm install --foo will
fail as --foo is not a valid option for pnpm install.
However, some dependencies may use the npm_config_ environment variable, which
is populated from the CLI options. In this case, you have the following options:
npm_config_foo=true pnpm install--config.: pnpm install --config.foo=trueRun as if pnpm was started in <path> instead of the current working directory.
Added in: v5.6.0
Run as if pnpm was started in the root of the workspace instead of the current working directory.
For more information, see the documentation for individual CLI commands. Here is a list of handy npm equivalents to get you started:
| npm command | pnpm equivalent |
|---|---|
npm install | pnpm install |
npm i <pkg> | pnpm add <pkg> |
npm run <cmd> | pnpm <cmd> |