Specify Topics and Commands in Any Order

When you type a command at a terminal or command prompt, you can enter the topics and commands in any order. Salesforce CLI determines which command you mean and automatically runs it without errors.

For example, let's say you want to log into an org using JWT but you forgot the exact command. All of these commands work without returning a Command not found error:

1sf login org jwt <flags>
2sf org login jwt <flags>
3sf jwt org login <flags>

If you remember only parts of a command, run the partial command anyway to see a list of all the commands that contain the parts. Use arrows to highlight the one you want, then press return to choose it.

For example, when you type sf list, you see this dialogue where you can choose the command you want:

1sf list
2? Which of these commands do you mean (Use arrow keys)
3❯ community list template         Retrieve the list of templates available in your org. 
4  env list                        List the environments you’ve created or logged into. 
5  env logdrain list               List log drains connected to a specified environment. 
6  env var list                    List your environment's config vars in a table. 
7  org list shape                  List all org shapes you’ve created. 
8  org list snapshot               List scratch org snapshots. 
9  package installed list          List the org’s installed packages.

To narrow down a long list of possible commands, provide a flag. For example, if you run sf list --all, it displays only the env list and org list commands because they’re the only ones that have the --all flag.

Each command still has a canonical signature, which we use in the --help examples and to organize the Salesforce CLI Command Reference.