Help for Salesforce CLI Commands

The -h | --help parameter shows details about Salesforce CLI topics and their commands.

For namespaces, the -h | --help parameter lists all topics in the namespace. For example, to see names and descriptions of all topics in the force namespace, run sfdx force -h.

For topics, the -h | --help parameter lists the commands and their descriptions. For example, to see all commands in the org topic, run sfdx force:org -h.

For commands, adding the -h | --help parameter shows parameters and usage information. For example, to see help for the org:create command, run sfdx force:org:create -h.

Help for commands has four parts.
  1. Usage
    The command signature on the Usage line uses the docopt format.
    • All available parameters are listed. Parameters that have short names are listed using their short names.
    • Parameters that take a value show the value’s type (for example, <string>) in angle brackets immediately after the parameter’s name.
    • Optional parameters are in square brackets ([ … ]).
    • Required parameters have no annotation.
    • Mutually exclusive options are shown in parentheses, separated by a pipe (( … | … )).

    If the command takes varargs (name-value pairs that aren’t parameters), the usage signature includes name=value....

    To see signatures for all commands in the force namespace, run sfdx force:doc:commands:list --usage.

    Tip

  2. Description

    Below the Usage line, a short description of the command is shown. For longer descriptions, see the Salesforce CLI Command Reference.

  3. Flags

    The Flags section lists all the command’s parameters, including their short name, long name, and purpose. For parameters that accept a value, the value name is written in all caps. Parameters that accept a limited list of values include the values in parentheses, with the default value indicated by an asterisk (*).

    For more information about the parameters, see the Salesforce CLI Command Reference.

  4. Help

    Usage notes and examples are below the list of parameters. This information is also available in the Salesforce CLI Command Reference.