Common Actions

We recommend that you use these core Salesforce CLI actions whenever possible. Consistent vocabulary creates a consistent user experience and reduces the cognitive load for Salesforce CLI users.

ActionDescriptionExample
assignAssociate something with the user.sf org assign permset
createCreate a new resource on a remote server.sf org create sandbox
deleteDelete a resource from a remote server.sf org delete scratch
deployDeploy local source code to an environment.sf project deploy start
describeGet information that describes a resource, such as metadata about a standard object.sf sobject describe
displayOutput more extensive information, such as multiple tables and long text.sf org display
exportExport data from an org or data store to one or more local files.sf data export tree
generateGenerate files on the local computer for scaffolding new code, such as Apex classes.sf apex generate class
getGet and show a single record.sf data get record
importImport data into an org and or data store.sf data import tree
insertInsert a piece of data, such as a record.sf cmdt insert record
installAdd an external resource, such as a plugin, to a local Salesforce CLI installation.sf plugins install
linkLink a resource, such as plugin, into a local Salesforce CLI for development.sf plugins link
listOutput a single column of data or name-value pairs.sf org list
logLog output for an environment.sf env log
loginLog in to an environment.sf org login web
logoutLog out of an environment.sf org logout
openOpen an environment in a web browser.sf org open
promoteAdvance a resource in a release or workflow pipeline.sf package version promote
publishPublish something, such as an Experience Builder site, to make it live.sf community publish
queryExecute a data store query.sf data query
reportCheck the status of an operation, such as a deployment.sf project deploy report
resumeContinue a job that was previously started. All resumable jobs are given an ID.sf project deploy resume
retrieveRetrieve local source code from an environment.sf project retrieve start
runExecute code or tests, such as Apex classes.sf apex run
setSet local or global configuration variables.sf alias set
tailStream log output.sf apex tail log
unsetUnset local or global configuration variables.sf alias unset
uninstallRemove external resource from a local Salesforce CLI installation.sf plugins uninstall
unlinkUnlink a resource from a local Salesforce CLI installation.sf plugins unlink
updateGet the most recent version of a resource.sf plugins update
upsertUpdate existing data if exists, and insert a new one if doesn't.sf data upsert bulk
validateValidate something, such as a deployment or retrieval, without executing it.sf project deploy validate
whichShow which resource, such as a plugin, another resource, such as a command, belongs to.sf which