Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

sfdx-cli

salesforcecli126.1kBSD-3-Clausedeprecated7.209.6

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

Salesforce CLI

readme

Salesforce CLI

This is 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.

changelog

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

7.166.1 (2022-08-26)

Bug Fixes

  • skip lwc NUTs because of API 403 (d949ead)

7.166.0 (2022-08-25)

7.165.0 (2022-08-18)

7.164.2 (2022-08-17)

7.164.1 (2022-08-11)

7.164.0 (2022-08-11)

7.163.0 (2022-08-05)

7.162.0 (2022-07-29)

7.161.0 (2022-07-21)

7.160.0 (2022-07-14)

7.159.0 (2022-07-07)

7.158.1 (2022-07-01)

7.158.0 (2022-06-30)

7.157.0 (2022-06-23)

7.156.1 (2022-06-23)

7.156.0 (2022-06-23)

7.155.1 (2022-06-14)

7.155.0 (2022-06-09)

7.154.0 (2022-06-02)

7.153.1 (2022-06-02)

7.153.0 (2022-05-27)

7.152.0 (2022-05-19)

7.151.1 (2022-05-17)

Bug Fixes

7.151.0 (2022-05-12)

7.150.0 (2022-05-05)

7.149.1 (2022-05-05)

7.149.0 (2022-04-29)

Bug Fixes

  • add schemas to yarn resolutions (cea2886)

7.148.3 (2022-04-25)

7.148.2 (2022-04-22)

7.148.1 (2022-04-22)

7.148.0 (2022-04-22)

7.147.1 (2022-04-21)

7.147.0 (2022-04-14)

7.146.1 (2022-04-14)

Bug Fixes

  • xz on the promotes to rc (92a6f19)

7.146.0 (2022-04-07)

7.145.0 (2022-03-31)

7.144.2 (2022-03-28)

7.144.1 (2022-03-25)

7.144.0 (2022-03-24)

7.143.0 (2022-03-17)

7.142.1 (2022-03-11)

Bug Fixes

7.142.0 (2022-03-11)

Bug Fixes

7.141.1 (2022-03-08)

7.141.0 (2022-03-03)

7.140.0 (2022-02-24)

7.139.0 (2022-02-17)

Bug Fixes

7.138.1 (2022-02-15)

7.138.0 (2022-02-10)

Features

7.137.1 (2022-02-04)

7.136.2 (2022-02-01)

7.136.1 (2022-01-28)

7.136.0 (2022-01-28)

Features

  • warn people about salesforcedx during update (#436) (3b076fd)

Bug Fixes

  • no process.exit(0) (e6c2bb4)
  • remove lightning lint command (fad0a91)

7.133.0 (2022-01-06)

Features

Bug Fixes

7.132.0 (2021-12-16)

7.131.0 (2021-12-09)

7.130.1 (2021-12-03)

7.130.0 (2021-12-03)

Features

7.129.0 (2021-11-19)

7.128.0 (2021-11-18)

7.127.0 (2021-11-11)

7.126.0 (2021-11-04)

Bug Fixes

  • dir paths (47dc692)
  • don't change dataDir for bundled sf (fbeaf1f)
  • oclif manifest command (1494ade)
  • postupdate hook doesn't use npm anymore (d1f4e21)
  • sf install path for tarballs (a851ec3)
  • test new installer packaging (83160bd)
  • test new installers (bf2620a)
  • test new installers with sf included (afcf758)
  • test new installers? (403e7ff)
  • update release management plugin (1e68acc)
  • whoops (34c1f8f)
  • whoops, actually change sf install path for tarballs (cb32ed3)

7.125.0 (2021-10-28)

Bug Fixes

7.124.0 (2021-10-21)

7.123.1 (2021-10-21)

Bug Fixes

7.123.0 (2021-10-14)

Features

  • use npm postinstall script to install sf (97791ad)

Bug Fixes

  • add some more debugging output (3923b1f)
  • call to shelljs.which (f260a48)
  • create path before moving sf to it (7764405)
  • don't get sf root from pwd() (85f6e18)
  • find npmGlobalBin with shelljs (4255698)
  • make sure sf gets copied to sfdx root (a4b7443)
  • put sf back in bin folder (e78ad00)
  • remove newline from path (a02d568)
  • revert find npmGlobalBin with shelljs (9a03311)
  • revert previous "fix" (041ee7a)
  • shelljs.exec whoopsies (b408631)

7.122.1 (2021-10-08)

7.121.8 (2021-10-08)

7.121.7 (2021-10-07)

7.121.6 (2021-10-07)

7.121.5 (2021-10-07)

7.122.0 (2021-10-07)

7.121.4 (2021-10-07)

7.121.3 (2021-10-06)

7.121.2 (2021-10-01)

Bug Fixes

7.121.1 (2021-10-01)

Bug Fixes

7.121.0 (2021-09-30)

7.120.0 (2021-09-29)

Bug Fixes

  • update @salesforce/templates to latest (78b79d1)
  • use absolute path to sf (#276) (fdd76c1)

7.119.3 (2021-09-24)

7.119.2 (2021-09-24)

Bug Fixes

  • do not allow installation of banned plugins (fed6ef3)

7.119.1 (2021-09-17)

7.119.0 (2021-09-17)

Bug Fixes

  • verify node installation in full image (#266) (36578e2)

7.118.1 (2021-09-10)

7.118.0 (2021-09-09)

Bug Fixes

  • add missing env var for docker deps verification (f26c97c)
  • add script to execute sf (8e43bed)
  • enable shell for spawned process (634a924)
  • handle non-existent npm executable (2cca0ba)
  • use absolute path to sf bin (c799408)

7.117.0 (2021-09-02)

7.116.2 (2021-08-27)

Bug Fixes

  • force sdr and ts-types version (4b48e8e)

7.116.1 (2021-08-27)

Bug Fixes

  • sdr at top level to resolve (03ee773)

7.116.0 (2021-08-26)

Bug Fixes

7.115.1 (2021-08-23)

Features

7.115.0 (2021-08-21)

7.114.0 (2021-08-13)

7.113.0 (2021-08-06)

7.112.1 (2021-08-05)

7.112.0 (2021-07-30)

7.111.6 (2021-07-27)

7.111.5 (2021-07-26)

7.111.4 (2021-07-22)

7.111.3 (2021-07-21)

7.111.2 (2021-07-16)

7.111.1 (2021-07-15)

7.111.0 (2021-07-15)

7.110.0 (2021-07-08)

7.109.0 (2021-07-01)

Features

  • build/promote scripts (967ab6a)
  • check npm promotions (9a5ffa1)
  • makes tarball download url an ARG (e769295)
  • slim builds latest-rc from tarball (11bafd9)
  • use node14 (48a4cbf)
  • yarn scripts and circle yml for docker (7270d03)

Bug Fixes

  • validated circle config (eb20bf3)

7.108.0 (2021-06-24)

Features

  • add more version information (f9c2cb3)
  • changing the interface name (e00e2ca)
  • update --json command without --verbose (00827c3)
  • updating version command (e9dc75a)

7.107.0 (2021-06-17)

7.106.3 (2021-06-10)

7.106.2 (2021-06-10)

7.106.1 (2021-06-10)

7.106.0 (2021-06-10)

7.105.0 (2021-06-04)

7.104.0 (2021-05-27)

7.103.0 (2021-05-20)

7.102.0 (2021-05-13)

7.101.0 (2021-05-06)

7.100.0 (2021-04-29)

7.99.0 (2021-04-22)

7.98.0 (2021-04-19)

7.97.1 (2021-04-09)

7.97.0 (2021-04-08)

7.96.1 (2021-04-08)

Bug Fixes

7.96.0 (2021-04-05)

Bug Fixes

  • collapse latest-rc promote step into pack/upload (c2c5c46)
  • remove targets from promote commands (a141b3b)

7.95.0 (2021-04-01)

Bug Fixes

7.94.3 (2021-03-25)

7.94.2 (2021-03-25)

Bug Fixes

7.94.1 (2021-03-25)

7.93.1 (2021-03-18)

7.93.0 (2021-03-18)

7.92.0 (2021-03-12)

7.91.0 (2021-03-04)

7.90.2 (2021-03-03)

7.90.1 (2021-03-02)

7.90.0 (2021-03-02)

7.89.2 (2021-02-25)

Bug Fixes

  • read version from package.json for promote-stable-rc (#48) (6bd6555)

7.89.1 (2021-02-23)

Bug Fixes

7.88.4 (2021-02-20)

7.88.3 (2021-02-17)

7.88.2 (2021-02-16)

7.88.1 (2021-02-11)

Bug Fixes

7.88.0 (2021-02-10)

Features

  • remove s3 check for stability (#34) [skip-ci] (f2bd13b)

7.87.0 (2021-02-05)

Features

Bug Fixes

  • [skip-ci] update readme with latest-rc install info (4a6a755)

7.86.3 (2021-01-29)

Bug Fixes

  • do not sign npm package (33b44c2)

7.86.2 (2021-01-29)

7.86.1 (2021-01-28)

7.86.0 (2021-01-28)

Features