Code Your Plugin

This section provides reference information for customizing your plugin.

To get started, we provide several commands in the plugin-dev plugin to generate your own plugin, commands, flags, and more. See the Get Started section for examples. The plugin-dev plugin is "just in time" (JIT), which means that Salesforce CLI installs it the first time you run one of its commands.

Here are some useful commands:

  • dev generate plugin: Generate the files for a plugin. Includes a sample hello world command.
  • dev generate command: Generate the initial files for a new command.
  • dev generate flag: Update existing command files with code for a new flag.
  • dev audit messages : Audit messages in a plugin's messages directory to locate unused messages and missing messages that have references in source code.
  • dev convert messages : Convert a .json messages file into Markdown.

Run sf plugins inspect dev to get detailed information about the plugin, including all its commands. Run a particular command with --help to see more information.