This package has been deprecated

Author message:

sfdx-cli is deprecated, and no updates are planned. Use @salesforce/cli instead. See https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_move_to_sf_v2.htm

sfdx-cli

7.209.6 • Public • Published

Salesforce CLI

Warning
The sfdx CLI entered maintenance mode on July 12th, 2023. Use sf instead at salesforce/cli.

Check out this blog post for information and context about this change.
See the Move from sfdx (v7) to sf (v2) section of the Salesforce CLI Setup Guide for details on how to make the switch.


This is was the latest sfdx CLI application, based on the oclif CLI engine. By default it comes installed with various plugins.

Releases

We publish the latest CLI on Thursdays. At the same time we also publish the latest-rc release candidate CLI. The release candidates contain changes that will likely be in the final official version for the next release. To Install the latest-rc version, run npm install sfdx-cli@latest-rc. We suggest having your CI/CD pipeline use the latest-rc in addition to the latest release tags.

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

Run sfdx update to update the CLI to the latest available version.

Installation

You can install this by either using an OS-specific installer available here, by directly installing it with npm or yarn (see the instructions below).

Installing with npm or yarn

To get started, you'll need to install node v12 or greater, though we recommend using the latest v14 (LTS) for the best experience. While this can be done using an installer from nodejs.com or via an OS-specific package manager, we recommend using nvm to easily manage multiple node versions.

If using nvm, be sure that you've selected the appropriate version with something like nvm use v14.x.y, where x and y are specific to the version that you installed. If you want to use this version by default run nvm alias default node -- otherwise, when you restart your shell nvm will revert to whatever version configured prior to installing the latest.

npm

npm is installed automatically with Node.js. Install the CLI using npm as follows:

> npm install --global sfdx-cli

yarn

yarn is another popular Node.js package manager that can be used to install the CLI, but it needs to be installed separately from Node.js if you choose to use it.

Note that by default yarn will attempt to install the binary in a location that may conflict with the location used by the installers, so you may additionally want to run the following command to avoid collision should you want to maintain two separate installations: yarn config set prefix ~/.yarn (macOS and Linux). Then, use the following:

> yarn global add sfdx-cli

Docker Images

We provide versioned images on dockerhub. They come in 2 flavors

  1. slim is just the CLI installed using the installer for linux and openjdk11
  2. full includes other utilities and a full node/npm installation

Interactive Example

# choose a tag to pull and run
docker pull salesforce/salesforcedx:latest-rc-slim
docker run -it salesforce/salesforcedx:latest-rc-slim

# then run any sfdx command you like
sfdx version

# when done, type exit to leave the container
exit

Remote Execution Example

# using the ID of a running container, execute some command like "sfdx version"
docker exec -it 8b1e2696a243 bin/bash sfdx version


Development

If you would like to contribute, please see also the internal developer documentation.

Readme

Keywords

none

Package Sidebar

Install

npm i sfdx-cli

Weekly Downloads

50,906

Version

7.209.6

License

BSD-3-Clause

Unpacked Size

2.12 MB

Total Files

26

Last publish

Collaborators

  • mdonnalley
  • salesforce-releases