The SfCommand abstract class extends @oclif/core's Command class for examples of how to build a definition.
) class and adds useful extensions to ease the development of commands for use in the Salesforce Unified CLI.
SfCommand takes a generic type that defines the success JSON result
Enable the json flag support by default
Provides functions that help place success messages, warnings and errors into the correct location in JSON results
Enables additional help sections to the standard oclif command help output
Provides access to the cli-ux cli actions. This avoids having to import that interface from cli-ux and manually handling the --json flag.
Provides simple, stubbable prompts for confirmation and secrets