Newer Version Available
Install the CLI with npm
If you've installed Node.js on your computer, you can use npm to install the Salesforce CLI. This method lets you install
the Salesforce CLI from the command line and can be especially useful for continuous integration
(CI) use cases.
-
Ensure that Node v8.6.0 or later is installed on your computer. For example, on macOS or
Linux:
1$ node --version 2v8.6.0 -
Run this command.
1$ npm install sfdx-cli --globalIf you receive a permission error when installing the CLI using npm, we recommend not using sudo. See Fixing npm permissions.