---
schema_version: "1"
id: a6ebef0e71858c02701bef03134c8024e448c01d6f3cf4317d0084c0e78bed19
title: Actions
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforcedx/sfcliplugin/guides/design/actions.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-cli-plugin/guide/actions.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 312fd828831da12010c3a5cbb499302ef900676c80bcacc3c9c6d301622fec73
products:
  - Salesforce CLI Plugin Developer Guide
  - salesforcedx
---
# 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](https://developer.salesforce.com/docs/platform/salesforce-cli-plugin/guide/common-actions.md).

## Guidelines

- 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`

## 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
