Salesforce CLI v45 Release Notes

Here are the new and changed features in recent updates of Salesforce CLI and the salesforcedx plug-in.

Run sfdx version to display the version of Salesforce CLI installed on your computer. Run sfdx plugins --core to display the version of the installed salesforcedx plug-in.

Run sfdx update to update both the CLI and the salesforcedx plug-in to the latest available version.

Note: As a beta feature, second-generation managed packages and non-source-tracked org commands are a preview and aren't part of the "Services" under your master subscription agreement with Salesforce. Use these features at your sole discretion, and make your purchase decisions only on the basis of generally available products and features. Salesforce doesn't guarantee general availability of these features within any particular time frame or at all, and we can discontinue them at any time. These features are for evaluation purposes only, not for production use. They're offered as is and aren't supported, and Salesforce has no liability for any harm or damage arising out of or in connection with them. All restrictions, Salesforce reservation of rights, obligations concerning the Services, and terms for related Non-Salesforce Applications and Content apply equally to your use of these features. You can provide feedback and suggestions for second-generation managed packages in the Packaging 2 Beta group in the Trailblazer Community. You can provide feedback and suggestions for non-source-tracked org commands in the Salesforce DX group in the Trailblazer Community.

Note: We provide Scratch Org Snapshot to selected customers through a pilot program that requires agreement to specific terms and conditions. To be nominated to participate in the program, contact Salesforce. Pilot programs are subject to change, and we can't guarantee acceptance. Scratch Org Snapshot isn't generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can't guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. For information on enabling this feature in your org, contact Salesforce.

Click here for the v44 release notes.

June 6, 2019

We aren't releasing a Salesforce CLI patch this week.

45.17.0 (May 30, 2019)

We aren't releasing a Salesforce CLI patch this week.

If you're attending TrailheaDX, stop by and see us at the Salesforce DX booths! If you can't make it in person, watch the live stream of the Salesforce <3 DX session at 3:00 PM PST on Wednesday (May 29) to hear all about what we've been building: https://www.salesforce.com/video/5646657/.

45.16.0 (May 23, 2019)

45.15.6 (May 16, 2019)

45.14.1 (May 9, 2019)

45.13.0 (May 2, 2019)

45.12.0 (April 25, 2019)

45.11.1 (April 18, 2019)

Install the Pre-Release Version of the CLI

Would you like to get a preview of and start trying out the changes we'll be releasing in June? Install the pre-release version of salesforcedx v46. We'll update the Summer '19 Salesforce CLI release notes (available on April 22, 2019) as we add new and changed commands and parameters.

sfdx plugins:install salesforcedx@pre-release

Make sure that you have the pre-release version.

sfdx plugins --core
salesforcedx 46.0.1-xx

When we officially release v46 on June 15, 2019, uninstall the pre-release, then update the CLI.

sfdx plugins:uninstall salesforcedx
sfdx update

Other CLI Changes

45.10.1 (April 11, 2019)

45.9.0 (April 4, 2019)

45.8.2 (March 28, 2019)

Salesforce CLI (sfdx-cli) v7 is bundled with the salesforcedx plug-in. Run sfdx update to install the new version. Use sfdx plugins:install only when installing a specific salesforcedx plug-in version.

If you see the error, Error: Cannot find module '@oclif/config', uninstall the salesforcedx plug-in.

sfdx plugins:uninstall salesforcedx

45.8.1 (March 28, 2019)

We have migrated Salesforce CLI to Heroku's Open CLI Framework (oclif). This framework fixes several long-standing issues with CLI updates, provides better CLI load times, and prepares us to incorporate important features in the future, like custom execution hooks and built-in autocompletion.

Install a Previous Version of Salesforce CLI

By default, the latest version of the salesforcedx plug-in is installed when you install Salesforce CLI for the first time. You can install a previous version of the salesforcedx plug-in if your specific situation requires it.

Using npm:

npm install sfdx-cli@6 --global

Using the installer:

Other CLI Changes

45.7.0 (March 21, 2019)

We aren't releasing a patch this week. See 45.5.0 (March 7, 2019) for information about the migration to oclif.

45.6.0 (March 14, 2019)

We aren't releasing a patch this week. See 45.5.0 (March 7, 2019) for information about the migration to oclif.

45.5.0 (March 7, 2019)

We are migrating the cli-engine framework over to Heroku's Open CLI Framework (oclif) in the coming weeks. This migration is a major update for Salesforce CLI and our core plug-ins. To allow time for testing and to facilitate a smooth transition, we will not be releasing updates for the next 3 weeks. We plan to release our next update, v45.8.x of the salesforcedx aggregate plug-in and and v7.x.x of sfdx-cli, on Thursday, March 28, 2019.

We expect this change to improve the performance and reliability of Salesforce CLI and to help us add new functionality more quickly. Migrating Salesforce CLI to oclif will not change the way you interact with the CLI, and the force commands will work as they did before. However, Salesforce CLI will NOT be backwards compatible with plug-ins built on the original CLI engine. If the plug-in was created using Salesforce Plug-In Generator (sfdx plugins:generate), it will still work, because the generator already uses oclif. To learn more about oclif, you can visit their website.

45.4.1 (February 28, 2019)

45.3.1 (February 21, 2019)

45.2.0 (February 14, 2019)

45.1.2 (February 9, 2019)

Welcome to the first release of version 45 of the salesforcedx plug-in for Salesforce CLI in Spring '19. Here's what's changed.

Uninstall the Pre-Release Version of the salesforcedx CLI Plug-In

If you installed the pre-release version 45 of the salesforcedx plug-in, uninstall it, then run the update command.

sfdx plugins:uninstall salesforcedx
sfdx update

Build Your Own Salesforce CLI Plug-In with Open-Source Tools

Plug-ins add functionality to Salesforce CLI. Salesforce includes several plug-ins when you install the CLI that provide commands and functionality to meet common needs that customers and partners have. You can also choose to install other plug-ins built by Salesforce and others. But when you have requirements that existing plug-ins don't meet, Salesforce Plug-In Generator simplifies building your own using Node.js. Salesforce Plug-In Generator and the CLI @salesforce/core and @salesforce/command libraries are open source.

Changes to Salesforce Plug-In Generator are released regularly. For information about weekly releases, see the change log.

For information about using Salesforce Plug-In Generator to create your own plug-in, check out the Salesforce CLI Plug-In Developer Guide. For useful resources, such as the open-source repositories for the plug-in generator and its dependencies, see the guide's Resources for Salesforce CLI Plug-In Development.

New Commands

These new commands are available in salesforcedx v45.

force:mdapi:deploy:cancel: Cancels an in-progress metadata deployment.

New Parameters

This command has a new parameter in salesforcedx v45.

force:lightning:component:create --type: Specifies whether to create an Aura component (--type aura, the default) or a Lightning web component (--type lwc).