Install Other Versions of Salesforce CLI Plugins
Sometimes you want to use a specific version of a plugin. For example, let’s say Salesforce fixed a bug in the apex run command. The fix has been released in the associated plugin, but Salesforce hasn’t yet included that plugin release in the current Salesforce CLI. But you want to test the bug fix in your local development environment. Follow these steps to install the version of the plugin that has the fix.
-
Determine the plugin that contains the command by running the
whichcommand. This example shows that theapex runcommand is in theplugin-apexplugin. -
Find the plugin’s repository with the Salesforce CLI Status page. Then navigate to its GitHub repo, such as @salesforce/plugin-apex, which lists all the releases and tags.
-
Install the version that contains the bug fix. For example, to install version
2.2.22of theapexplugin, run this command:When you now run
sf plugins --core, theapexplugin entry shows the newly installed version rather than(core). -
When you finish testing, go back to using the current version of the plugin by uninstalling the tagged version.
When you install a specific plugin version using a tag, such as
2.2.22, you stay with that tag until you explicitly uninstall it.