Skip to content

Design Guidelines Actions

Matt Graham edited this page Apr 28, 2023 · 1 revision

Actions define tasks in the developer workflow. They act on either a topic or a subtopic. Actions should be as consistent as possible, even across topics.

For example, sf apex generate class and sf lightning generate app follow the same pattern, even though they generate different things. Another example is sf project deploy start and sf slack-app deploy start. In these examples, the topic and flags may change, but the command structure is the same.

Where appropriate, use these standard action names: sf command common actions.

Guidelines

  • Actions are verbs.
  • Keep actions as short and precise as possible.
  • Every Salesforce CLI command is required to have a primary action.
  • Commands may have secondary clarifying actions.
    • Example: sf project deploy start
    • Example: sf org alias set

Good Examples

  • sf apex generate class
  • sf apex run test
  • sf org login web
  • sf project deploy start
    • sub-action of start clarifies the primary action category
  • sf org alias set my-scratch-org=test-sadbiytjsupn@example.com
    • sub-action of set clarifies the primary action category
Clone this wiki locally