The Most Frequently Used Salesforce CLI Commands

The Salesforce Command Line Interface (CLI) is a free and open-source tool that streamlines and automates processes across the Salesforce platform.to know more.

List of Salesforce CLI Commands

SF CLI Command Description
sfdx updateThe command sfdx update is used to update the Salesforce CLI to the latest version, to know more.
sfdx --versionYou can check the version of Salesforce CLI installed on your computer by running this command, to know more.
npm install @salesforce/cli --globalwe can install salesforce cli in two ways, to know more.
sf apex generate classCreate an Apex class, to know more
sf apex generate triggerCreate an Apex trigger, to know more
sf apex list logDisplay a list of IDs and general information about debug logs, to know more
sf apex get logFetch the specified log by id or get most recent logs from the org, to know more
sf apex runExecute anonymous Apex code entered on the command line or from a local file. To know more
sf apex run testInvoke Apex tests in an org, to know more

Source:
https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_unified.htm

Labels:
Join the conversation