Newer Version Available

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

Where is Salesforce CLI Installed?

When troubleshooting installation problems, it's often useful to know which directories Salesforce CLI is installed in.

Run this command and search the output for the location property, which points to the global Salesforce CLI installation directory. The command works for all types of installations: installers, npm, and TAR files.

1sf plugins inspect @salesforce/cli

In this sample output, Salesforce CLI is installed in the /Users/astro/.local/share/sf/client/2.25.7-b42201f directory.

1sf plugins inspect @salesforce/cli
2└─ @salesforce/cli
3   ├─ version 2.25.7
4   ├─ homepage https://github.com/salesforcecli/cli
5   ├─ location /Users/astro/.local/share/sf/client/2.25.7-b42201f
6   ├─ commands
7   │  ├─ cmdt:generate:field
8      ...
9   └─ dependencies
10      ├─ @inquirer/select ^1.3.1 => 1.3.1
11      ...

To find the directories in which the plugins are installed, set the DEBUG environment variable to sf and run the version command. For example:

1DEBUG=sf sf version

The data property in the output contains the directory that contains the installed plugins. In this truncated sample output, plugins are installed in the /Users/astro/.local/share/sf directory.

1DEBUG=sf sf version
2  sf                        OS: +0ms
3  sf                  platform: darwin +1ms
4  sf              architecture: x64 +0ms
5  sf                   release: 23.2.0 +0ms
6  sf                     shell: bash +0ms
7  sf                      NODE: +0ms
8  sf                   version: 20.10.0 +0ms
9  sf                       CLI: +0ms
10  sf                   version: 2.25.7 +0ms
11  sf                   channel: stable +0ms
12  sf                       bin: sf +0ms
13  sf                      data: /Users/astro/.local/share/sf +0ms
14  sf                     cache: /Users/astro/Library/Caches/sf +0ms
15  sf                    config: /Users/astro/.config/sf +0ms
16  sf                       ENV: +1ms
17  sf                SF_BINPATH: /Users/astro/.local/share/sf/client/bin/sf +0ms
18  sf             SF_REDIRECTED: 1 +0ms
19...