Newer Version Available
Install the Salesforce CLI and Plug-Ins
Install the CLI on macOS
- Download the .pkg file.
- Double-click the .pkg file.
Install the CLI on Windows
Install the CLI on Linux
Find the download URL for your tarball from this manifest file. The downloads section lists unversioned URLs for the latest installers, which are especially useful for CI use cases. Select the URL based on your target platform.
-
Download or wget one of these tarballs.
-
Create an sfdx directory.
-
Unpack the contents for your tarball version:
-C unpacks the contents in the sfdx directory, while --strip-components 1 removes the root path component.
-
Run the install script.
The Salesforce CLI is installed in /usr/local/bin/sfdx. The installers are designed to provide appropriate permissions to the installation directories. If you receive permission or access errors that you can’t address by using sudo or chmod, try installing the CLI using npm.
Install the CLI with npm
This installation method is a good option if you don’t have administrator permissions on your workstation, or if group policy blocks CLI installation and updates. Installing the CLI with npm doesn’t require root permissions.
-
Ensure that the long-term support (Active LTS) version of Node.js is installed on your
computer. To install the LTS version, go to https://nodejs.org/en/download/. To check
your version number, run:
-
Run this command.
If you receive a permission error when installing the CLI using npm, we recommend not using sudo. See Fixing npm permissions.
Verify Your Installation
Run this command to verify the salesforcedx plug-in version:
This command returns a list of the other plug-ins installed in the CLI:
The core salesforcedx plug-in is not included in the preceding list unless you installed a newer version with the sfdx plugins:install command.
Run this command to return a list of the command families (topics) in the force namespace:
Run this command to view all available Salesforce CLI commands:
Install a Specific Version of the salesforcedx Plug-In
To determine which Salesforce CLI (sfdx-cli) and salesforcedx versions you have installed, run:
The output includes all installed plug-ins. 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.
Run this command to install a specific version of the plug-in, such as 49.14.0:
During sandbox preview, we provide a pre-release of the salesforcedx plug-in that contains updates that work only with the new features in the preview. Run this command to install the pre-release:
To install the early release candidate of the weekly salesforcedx plug-in release, run this command:
Discover Salesforce Plug-Ins
- ISV Technical Enablement Plug-In
- The ISVTE Plug-in is an on-demand Technical Evangelist. It scans your package metadata and
code, and provides targeted feedback to help you improve and future-proof your app. The
feedback includes a detailed metadata inventory, recommendations on features or
technologies to consider using, enablement resources, and installation limitations. The
feedback also includes best practices, partner alerts, guidance on improving your partner
Trailblazer score, and more. While it's designed for ISV and OEM partners, anyone
developing on the platform can use it.
When you install the plug-in, you're asked to confirm that it's unsigned. Answer yes. This behavior is expected.
See GitHub for documentation and more information.
- Einstein Analytics Plug-In
- Salesforce Einstein Analytics is a cloud-based platform for connecting data from
multiple sources, creating interactive views of that data, and sharing those views in
apps.
Use the Einstein Analytics CLI plug-in to create scratch orgs with Analytics Studio, which you can use to develop and test source code. The plug-in includes commands that call a subset of the Salesforce Analytics REST API endpoints to manage Analytics assets programmatically. Create and iteratively develop Analytics templates. Update and delete apps, dashboards, lenses, and dataflows. Use history commands to restore previous versions of dashboards and dataflows. Manage the auto-install lifecycle for embedded templated apps.
See Develop with the Analytics Plugin for the Salesforce CLI.
Install Trusted Unsigned Plug-ins Automatically
-
Create a file called unsignedPluginAllowList.json and put it in one of
these directories:
- (Linux and macOS): $HOME/.config/sfdx
- (Windows) Depending on your Windows configuration, either C:\Users\username\.config\sfdx or %LOCALAPPDATA%\sfdx
-
Add the names of the plug-ins you trust to the JSON file in a simple array of strings. For
example: