Salesforce CLI Plugins
Some plugins are automatically installed when you install Salesforce CLI. These core plugins contain commands that support source-driven development, such as:
- Create and manage scratch orgs and sandboxes: The plugin-org plugin contains commands such as org create scratch and org delete sandbox
- Deploy and retrieve metadata between the org and your local project: The plugin-deploy-retrieve plugin contains commands such as project deploy start and project retrieve preview.
- Authorize orgs: The plugin-auth plugin contains commands such as org login web and org logout.
- Create and manage scratch org users: The plugin-user plugin contains commands such as org create user and org generate password.
Some plugins are installed just when you need them, rather than being included automatically in a Salesforce CLI installation. When you run a command in a "just-in-time" (JIT) plugin for the first time, Salesforce CLI installs the latest released version of the plugin and then runs the command. The plugin installation happens automatically, although we display a little message so you know what's going on. From then on, run any of the commands contained in the plugin as usual. When you next update Salesforce CLI with sf update, if the JIT plugin has released a new version, then it's also updated. These JIT plugins contain specialized commands that aren’t typically used by most CLI users, such as:
- Create and manage custom metadata types: The plugin-custom-metadata contains commands such as cmdt generate object and cmdt generate records.
- Create and manage scratch org snapshots and shapes: The plugin-signups contains commands such as org create shape and org delete snapshot.
- Create and manage Experience Cloud sites: The plugin-community plugin contains commands such as community create and community publish.
To determine whether a plugin is core or JIT, check the package.json file of the aggregator @salesforce/cli plugin:
- Core plugins are listed in the oclif:plugins section.
- JIT plugins are listed in the oclif:jitPlugins section.
See the Salesforce CLI Status page for the full list of core and JIT plugins, their GitHub repositories, and their status.
You can also install more plugins, such as CRM Analytics, to incorporate other Salesforce features into your development environment. You can also develop your own plugin to add your custom functionality to Salesforce CLI. See Salesforce CLI Plugin Developer Guide.
By default, the latest versions of the core plugins are installed when you install Salesforce CLI for the first time. Similarly, when you update the CLI to the latest version, the core plugins are also updated, as well as any JIT plugins that were subsequently installed.
To determine the versions of the plugins currently installed in your CLI, run:
sf plugins --core
The command displays information such as this sample output.
@oclif/plugin-autocomplete 3.2.26 (core)
@oclif/plugin-commands 4.1.22 (core)
@oclif/plugin-help 6.2.27 (core)
@oclif/plugin-not-found 3.2.48 (core)
@oclif/plugin-plugins 5.4.36 (core)
@oclif/plugin-search 1.2.23 (core)
@oclif/plugin-update 4.6.36 (core)
@oclif/plugin-version 2.2.27 (core)
@oclif/plugin-warn-if-update-available 3.1.38 (core)
@oclif/plugin-which 3.2.34 (core)
apex 3.6.11 (core)
api 1.3.3 (core)
auth 3.6.108 (core)
data 4.0.24 (core)
deploy-retrieve 3.21.2 (core)
info 3.4.51 (core)
limits 3.3.51 (core)
marketplace 1.3.7 (core)
org 5.5.7 (core)
packaging 2.12.3 (core)
schema 3.3.58 (core)
settings 2.4.22 (core)
sobject 1.4.53 (core)
telemetry 3.6.37 (core)
templates 56.3.43 (core)
trust 3.7.78 (core)
user 3.6.16 (core)
Uninstalled JIT Plugins:
code-analyzer 5.0.0-beta.3
community 3.3.18
custom-metadata 3.3.48
dev 2.5.1
devops-center 1.2.27
signups 2.6.19
@salesforce/sfdx-plugin-lwc-test 1.2.1
@salesforce/sfdx-scanner 4.11.0
As shown in the sample output, if a plugin has (core) next to its name, it’s the version bundled with the CLI. If you install a specific version of the plugin, or it was automatically installed as a JIT plugin, its version number or tag is displayed instead. For example, the package commands are contained in the JIT packaging plugin and the sample output indicates that version 1.27.1 is installed.
The end of the plugins --core output also displays the available JIT plugins that haven’t yet been installed.