Actions

Actions define tasks in the developer workflow. They act on either a topic or a subtopic. Design actions to 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 can change, but the command structure is the same.

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

  • Actions are verbs.
  • Keep actions as short and precise as possible.
  • Every Salesforce CLI command must have a primary action.
  • Commands can have secondary clarifying actions.
    • Example: sf project deploy start
    • Example: sf org alias set
  • 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