Blog Blog Posts Business Management Process Analysis

What is Salesforce CLI? Guide to Install Command Line Interface

What is Salesforce CLI?

Salesforce CLI helps simplify build automation and development within a Salesforce organization. It accumulates various Salesforce APIs. It can run through the terminal and can be easily scripted, facilitating automation in turn. Users can manage tokens and move source data as well as metadata across various environments, with the help of Salesforce CLI.

Watch this Salesforce Tutorial for beginners:

Salesforce CLI is based on an open-source framework used in building a command-line interface in Node.js, called Oclif.


The Salesforce CLI commands help scratch org while also supporting statements for the management and creation of the org. The SFDX platform helps in controlling the process of importing and exporting data. It also helps by supporting the systems of executing of installation and testing of the packages.

The Salesforce CLI is mostly associated with Salesforce Developer Experience or SFDX. Hence, it is often referred to as SFDX CLI. While dealing with SFDX commands, users come across various situations where they need to include references. The reference statements contain the Salesforce parameter information, within the org.

Salesforce CLI is enabled by SDFX, followed by a command which can be found from a list of commands.

SFDX CLI Installation Packages

The Salesforce DX CLI installation packages are mentioned below:

Master Salesforce Administration, App Builder, and SFDC! Check out our Salesforce Training Course!

Uses of Salesforce CLI

Some of the main uses of Salesforce CLI are as follows:

Data Loader in Salesforce

Data Loader is a client application that is used to import and export data in bulk. It can be used to update, import, export, or delete records from Salesforce. While importing data, Data Loader loads, extracts, and reads data from .csv files or a database. While exporting data, Data Loader gives .csv files as output.

You can use Data Loader in two different ways:

Data Loader CLI

Data Loader CLI proves useful when a user has to load data repeatedly at a specified time. But, the Data Loader CLI is only available on Windows hosts.

You can follow the steps below to use the Data Loader CLI on a Windows system:

Prepare for Salesforce job interviews with these Salesforce Interview Questions and Answers!

Salesforce CLI Download

The procedure for downloading Salesforce CLI depends on the host system’s operating system.

System Requirements for Salesforce CLI

Before downloading the Salesforce CLI on your system, you should review the following system requirements.

Operating Systems

Salesforce CLI supports the following operating systems:

Code Editor or IDE

Users can use any code editor, even Salesforce Extensions for VS Code. It is a set of Visual Studio Code extensions designed for developments carried out on the Salesforce platform.

Version Control System

Users can use any Version Control System or VCS. Salesforce recommends GitHub as it contains samples in the Salesforce GitHub repository.


Every Salesforce CLI installer contains Node.js which is updated as new Node.js releases are out.

You can follow the steps below to download and install Salesforce CLI on your system.

Salesforce CLI Installation on macOS

The Salesforce CLI installation on macOS is done using a .pkg file.

Salesforce CLI Installation on Windows

The Salesforce CLI Installation on Windows is done using a .exe file.

Salesforce CLI Installation on Linux

The Salesforce CLI Installation on Linux is done using a TAR file.

You can use the following table to identify the unversioned TAR file for your system. The manifest URLs display the versioned URLs for the file.

Operating System TAR Files Manifest
Linux sfdx-linux-arm.tar.gz sfdx-linux-arm-buildmanifest
sfdx-linux-x64.tar.gz sfdx-linux-x64-buildmanifest

You can use the following commands to find out the version installed on your system:

Command Display
sfdx – version The version of CLI installed
sfdx plugins The version of SFDX plugins installed
sfdx force – version The version of the Salesforce API used by CLI

Learn Salesforce from scratch in this Salesforce tutorial!

Salesforce CLI List of Commands

Command Use
force:alias:list Lists usernames aliases for sfdx
force:alias:set Sets username aliases for sfdx
force:apex:class:create Creates an apex class
force:apex:execute Executes anonymous apex code
force:apex:log:get Fetches a debug log
force:apex:log:list Lists debug logs
force:apex:test:report Displays test results
force:apex:test:run Invokes apex tests
force:auth:jwt:grant Authorizes an org using the jwt flow
force:auth:sfdxurl:store Authorizes an org using an sfdx auth url
force:auth:web:login Authorizes an org using the web login flow
force:config:get Gets conifg var values for the given names
force:config:list List config vars for sfdx
force:config:set Sets config vars for sfdx
force:data:bulk:delete Bulk deletes records from a csv file
force:data:bulk:status Displays the status of a bulk data load job
force:data:bulk:upsert Bulk upserts records from a csv file
force:data:record:create Creates a record
force:data:record:delete Deletes a record
force:data:record:get Displays a record
force:data:record:update Updates a record
force:data:soql:query Executes a soql query
force:data:tree:export Exports data from an org into sObject tree format
force:data:tree:import Imports data into an org using sObject tree API
force:doc:commands:display Displays help for force commands
force:doc:commands:list Lists the force commands
force:lightning:app:create Creates a lightning app
force:lightning:component:create Creates a lightning component
force:lightning:event:create Creates a lightning event
force:lightning:interface:create Creates a lightning interface
force:lightning:lint Lints lightning components
force:lightning:test:create Creates a lightning test
force:lightning:test:run Invokes lightning components tests
force:limits:api:display Displays current org’s limits
force:mdapi:convert Convert metadata api source into the sfdx source format
force:mdapi:deploy Deploys metadata to an org using metadata api
force:mdapi:retrieve Retrieves metadata from an org using metadata api
force:org:create Creates a scratch org
force:org:delete Marks a scratch org for deletion
force:org:display Gets org description
force:org:list Lists all active orgs that you’ve created or authenticated to
force:org:open Opens an org in your browser
force:package1:version:create Creates a new package version in the release org
force:package1:version:create:get Retrieves status of the package upload request
force:package1:version:display Displays details about a package version
force:package1:version:list Lists package versions for the specified package
force:package:install Installs a package in the target org
force:package:install:get Retrieves the status of the package install request
force:project:create Creates a new SFDX project
force:project:upgrade Updates project config files to the latest format
force:schema:sobject:describe Describes an object
force:schema:sobject:list Lists all objects of a type
force:source:convert Converts SFDX source into the metadata API source format
force:source:open Edits a lightning page with a lightning app builder
force:source:pull Pulls source from the scratch org to the project
force:source:push Pushes source to an org from the project
force:source:status Lists local changes and/or changes in a scratch org
force:user:password:generate Generates a password for a scratch org
force:user:permset:assign Assigns a permission set to the admin user of an org
force:visualforce:component:create Creates a visualforce component
force:visualforce:page:create Creates a visualforce page

Develop your Salesforce skills with this free foundations course!

Salesforce CLI Tips

Here are some useful tips for using Salesforce CLI:


Salesforce CLI is useful as it is easy to use, and users don’t need to study it in-depth before using it. We have discussed how you can install it on your operating system along with the system requirements. Salesforce CLI commands are usually associated with SFDX.

The post What is Salesforce CLI? Guide to Install Command Line Interface appeared first on Intellipaat Blog.

Blog: Intellipaat - Blog

Leave a Comment

Get the BPI Web Feed

Using the HTML code below, you can display this Business Process Incubator page content with the current filter and sorting inside your web site for FREE.

Copy/Paste this code in your website html code:

<iframe src="" frameborder="0" scrolling="auto" width="100%" height="700">

Customizing your BPI Web Feed

You can click on the Get the BPI Web Feed link on any of our page to create the best possible feed for your site. Here are a few tips to customize your BPI Web Feed.

Customizing the Content Filter
On any page, you can add filter criteria using the MORE FILTERS interface:

Customizing the Content Filter

Customizing the Content Sorting
Clicking on the sorting options will also change the way your BPI Web Feed will be ordered on your site:

Get the BPI Web Feed

Some integration examples