Resources

Resources are the qualifying noun that the action acts upon. Resources are optional and used only when necessary. For example, in the command sf apex generate class, the resource class qualifies what the command apex generate generates. In the command sf org login jwt, the resource jwt is the qualifying type of login that takes place.

In many of the core Salesforce CLI commands, if a required resource is missing, the command prompts for it. For example:

1$ sf org login
2$ Which of these commands do you mean (Use arrow keys)
3 org login access-token     Authorize an org using an existing Salesforce access token.
4  org login device           Authorize an org using a device code.
5  org login jwt              Log in to a Salesforce org using a JSON web token (JWT).
6  org login sfdx-url         Authorize an org using a Salesforce DX authorization URL stored in a file.
7  org login web              Log in to a Salesforce org using the web server flow.

Guidelines 

  • Resources are optional.
  • Resources are nouns.

Good Examples 

  • sf org create sandbox (sandbox is the resource)
  • sf org login jwt (jwt is the resource)
  • sf apex generate class (class is the resource)
  • sf cmdt create record (record is the resource)