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:
$ sf org login
$ Which of these commands do you mean (Use arrow keys)
→ org login access-token Authorize an org using an existing Salesforce access token.
org login device Authorize an org using a device code.
org login jwt Log in to a Salesforce org using a JSON web token (JWT).
org login sfdx-url Authorize an org using a Salesforce DX authorization URL stored in a file.
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(sandboxis the resource)sf org login jwt(jwtis the resource)sf apex generate class(classis the resource)sf cmdt create record(recordis the resource)