It is possible to install Salesforce cli through command line?

It is possible to install Salesforce cli through command line?

You can use normal SFDX CLI installer:

If you use Chocolatey and choco install sfdx-cli throws you some errors – usually the info what to do about the error is right there in the message.

Error –
hashes do not match. Actual value was
ERROR: Checksum for
did not meet
9C33344AED91F6CC2CF97A64A69D99CBAD9EBBF4A28920B8160CDFCE83772326 for
checksum type sha256. Consider passing the actual checksums through
with –checksum –checksum64 once you validate the checksums are
appropriate. A less secure option is to pass –ignore-checksums if
The install of sfdx-cli was NOT successful.

choco install sfdx-cli --ignore-checksums should work OK.

Next error you might get will be about typos in the install script (author of choco package didnt escape spaces properly and it dies on C:Program Files, at least on my machine):

C:Program is not recognized as an internal or external command,
operable program or batch file. ERROR: Running [cmd /C C:Program
Filessfdxbinsfdx.exe update] was not successful. Exit code was
1. See log for possible error

We can have a look at whats in the install script, failed installations typically are copied to lib-bad: C:ProgramDatachocolateylib-badsfdx-clitools

Im not a PowerShell guru but by the look of it it just tries to run sfdx update at the end of installation. I can skip the script and run it manually.

choco install sfdx-cli --ignore-checksums -n works OK
and then close the console (to reload the PATH variables). Open new console and
sfdx update will work too.

sfdx-cli: Updating CLI… already on latest version: 7.54.4-8ff9ba9cc5

Try to download Node.js via chocolatey:

cinst nodejs.install

and then use npm (gets installed with Node.js) to download the Salesforce-CLI:

npm install --global sfdx-cli

It is possible to install Salesforce cli through command line?

Install Node JS

curl -sL | bash –
yum -y install nodejs
npm install -g npm

Install latest sfdx cli

npm install –global sfdx-cli

Install specific version of sfdx cli

npm install –global sfdx-cli@[version]


npm uninstall –global sfdx-cli

Related posts

Leave a Reply

Your email address will not be published. Required fields are marked *