How to install Salesforce Cli

What is Salesforce CLI?

CLI stands for Command Line Interface, Salesforce developed a free and open-source tool that helps simplify and automate tasks across the salesforce platform. we can do many things without opening the salesforce org, just using salesforce cli commands. Using this SF CLI, we can automate many tasks using shell script. 

download-salesforce-cli
we can install salesforce cli in two ways.

Install Salesforce CLI using executables. 

  • Download executable file from this link, with respective to your operating system.
  • Once the file is downloaded, then you can install on your machine. 
  • once its successfully installed, restart your cli application.
  • Now run the sf --version command to check the installed version. 
salesforce-cli-version

Install Salesforce CLI using NPM

If you don't have admin access to install salesforce cli, then you can install with npm. 
  • Run this command to check you have installed node LTS.
    node --version
  • Then, run this command to install salesforce cli executables. 
    npm install @salesforce/cli --global

Source:
https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm#sfdx_setup_install_cli_macos
https://developer.salesforce.com/tools/sfdxcli

Labels:
Join the conversation