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.
Action | Description | Example |
---|---|---|
assign | Associate something with the user. | sf org assign permset |
create | Create a new resource on a remote server. | sf org create sandbox |
delete | Delete a resource from a remote server. | sf org delete scratch |
deploy | Deploy local source code to an environment. | sf project deploy start |
describe | Get information that describes a resource, such as metadata about a standard object. | sf sobject describe |
display | Output more extensive information, such as multiple tables and long text. | sf org display |
export | Export data from an org or data store to one or more local files. | sf data export tree |
generate | Generate files on the local computer for scaffolding new code, such as Apex classes. | sf apex generate class |
get | Get and show a single record. | sf data get record |
import | Import data into an org and or data store. | sf data import tree |
insert | Insert a piece of data, such as a record. | sf cmdt insert record |
install | Add an external resource, such as a plugin, to a local Salesforce CLI installation. | sf plugins install |
link | Link a resource, such as plugin, into a local Salesforce CLI for development. | sf plugins link |
list | Output a single column of data or name-value pairs. | sf org list |
log | Log output for an environment. | sf env log |
login | Log in to an environment. | sf org login web |
logout | Log out of an environment. | sf org logout |
open | Open an environment in a web browser. | sf org open |
promote | Advance a resource in a release or workflow pipeline. | sf package version promote |
publish | Publish something, such as an Experience Builder site, to make it live. | sf community publish |
query | Execute a data store query. | sf data query |
report | Check the status of an operation, such as a deployment. | sf project deploy report |
resume | Continue a job that was previously started. All resumable jobs are given an ID. | sf project deploy resume |
retrieve | Retrieve local source code from an environment. | sf project retrieve start |
run | Execute code or tests, such as Apex classes. | sf apex run |
set | Set local or global configuration variables. | sf alias set |
tail | Stream log output. | sf apex tail log |
unset | Unset local or global configuration variables. | sf alias unset |
uninstall | Remove external resource from a local Salesforce CLI installation. | sf plugins uninstall |
unlink | Unlink a resource from a local Salesforce CLI installation. | sf plugins unlink |
update | Get the most recent version of a resource. | sf plugins update |
upsert | Update existing data if exists, and insert a new one if doesn't. | sf data upsert bulk |
validate | Validate something, such as a deployment or retrieval, without executing it. | sf project deploy validate |
which | Show which resource, such as a plugin, another resource, such as a command, belongs to. | sf which |