Newer Version Available

This content describes an older version of this product. View Latest

Salesforce CLI Plug-ins

Salesforce CLI consists of an npm package called sfdx-cli and multiple plug-ins—also npm packages—that contain commands. Most of the core functionality that Salesforce CLI provides comes from plug-ins.

Some plug-ins are automatically installed when you install the CLI. These plug-ins contain commands that support source-driven development, such as creating and managing scratch orgs, synchronizing source code, creating second-generation packaging, and more. These commands are in the force namespace, such as force:project:create. Other core plug-ins contain commands that make it easier to use the CLI and are in their own namespace. For example, commands for setting configuration values (config) or aliases (alias) and authorizing orgs (auth).

See the Salesforce CLI Status page for a list of all the core CLI plug-ins, their GitHub repos, and their status.

You can install more plug-ins, such as Tableau CRM, to incorporate other Salesforce features into your development environment. You can also develop your own plug-in to add your custom functionality to Salesforce CLI. See Salesforce CLI Plug-In Developer Guide.

By default, the latest versions of the core plug-ins are installed when you install Salesforce CLI for the first time. Similarly, when you update the CLI to the latest version, the core plug-ins are also updated.

To determine the versions of the plug-ins currently installed in your CLI, run:

If a plug-in has (core) next to its name, it’s the version bundled with the CLI. If you install a specific version of the plug-in, its version number or tag is displayed instead.

Install Other Versions of Salesforce CLI Plug-ins

Sometimes you want to use a specific version of a plug-in. For example, let’s say Salesforce fixed a bug in the alias plug-in but we haven’t yet released the fix in the current CLI. But you want to test the bug fix in your local development environment. Follow these steps to install the version of the plug-in that has the fix.
  1. To find a specific version of a plug-in, first find it on the Salesforce CLI Status page. Then navigate to its GitHub repo, such as salesforcecli/plugin-alias, which lists all the releases and tags.
  2. Install the version that contains the bug fix. For example, to install version 1.1.10 of the alias plug-in, run this command:

    The preceding example uses the plug-in’s short name, which is shown in the output of sfdx plugins --core. You can also use the plug-in’s long name, which is the name property in the plug-in’s package.json file.

  3. When you’re finished testing, go back to using the current version of the plug-in by uninstalling the tagged version.

    When you install a specific plug-in version using a tag, such as 1.1.10, you stay with that tag until you uninstall it.

    Important