You can change the location of the configuration file by using the --config
option or the environment variable.
Upon successful login, the btp CLI creates a configuration file (config.json
) in the default location of your user config directory:
-
Microsoft Windows:
C:\Users<i class="varname"><username>\AppData\Roaming\SAP\btp\config.json
-
Apple macOS ;
~/Library/Application Support/.btp/config.json
-
Linux:
~/.config/.btp/config.json
This folder serves as the working directory of the btp CLI, that is, it’s necessary for its proper functioning, and is used with each command execution.
If you want the configuration file to be created in a different folder, you can use the --config
option in your login command and then specify this location in each command call with this --config
option.
-
Specify the location of the configuration file with your login command:
btp --config "<file path>" login
-
Specify this location either with the
BTP_CLIENTCONFIG
environment variable, or use the--config
option with each subsequent command call.btp --config "<file path>"
In version 2.14, the environment variable
BTP_CLIENTCONFIG
was introduced. If you use an older client version, you need to useSAPCP_CLIENTCONFIG
. Although the old one is kept, we recommend to switch toBTP_CLIENTCONFIG
.
Let's assume you want to work in two subaccounts in parallel, using two terminals. For example, with the first terminal (A), you want to work in a subaccount with ID 1000, with the second terminal (B) you want to work in a subaccount with ID 2000, and you want to list the users in each subaccount.
Terminal A |
Terminal B |
---|---|
Run all commands as usual. The btp CLI uses the default configuration file. |
Use this option with each command call. |
|
|
|
|