Newer Version Available

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

Install and Update sf

Because sf is bundled with sfdx, installing sf is easy.

Existing sfdx Users

If you've already installed Salesforce CLI and are currently using sfdx commands, you probably already have the sf executable. Update to the latest version of sfdx then start using sf.

1sfdx update
2sf help

New Salesforce CLI Users

The operating system-specific Salesforce CLI installers, such as *.pkg on macOS, include both the sfdx and sf executables. If you haven't previously installed Salesforce CLI, install it now to get both executables. See Install Salesforce CLI.

After you install, update to the latest version of sfdx then start using sf.

1sfdx update
2sf help

Release Candidate

Similar to the sfdx executable, we publish a release candidate of the sf executable each week. The release candidate contains changes that we plan to include in the final weekly version.

To install the sf release candidate, update the sfdx executable to its release candidate:

1sfdx update stable-rc

To return to the stable version for both executables:

1sfdx update stable

Update to a Different Version

It's easy to update sf to any available version by specifying the --version flag of the update command.
1sf update --version 1.14.0
To get a list of all available versions, use the --available flag.
1sf update --available
The output also includes the location of the version, either local—because you've previously installed it—or remote. The update command downloads the remote version if necessary. Use the --interactive flag to choose a version from a list using your cursor.

These update options are available only if you installed sf using its specific installer. The options aren't available if you installed sf with the sfdx installer or used npm.

Note

Troubleshooting

If you run into issues installing sf as part of an sfdx installation, try uninstalling sfdx and then installing sf on its own using one of these methods:

  • npm: Run npm install @salesforce/cli --global
  • macOS installer: Download and install sf.pkg.
  • Windows installer: Download and install sf-x86.exe.