# CLI

Update, configure, and test CLI settings

* [`sfp cli config get [FIRSTARGKEY]`](#sfp-cli-config-get-firstargkey)
* [`sfp cli config list [FIRSTARGKEY]`](#sfp-cli-config-list-firstargkey)
* [`sfp cli config set [FIRSTARGKEY] [SECONDARGVALUE]`](#sfp-cli-config-set-firstargkey-secondargvalue)
* [`sfp cli config unset [FIRSTARGKEY]`](#sfp-cli-config-unset-firstargkey)
* [`sfp cli test`](#sfp-cli-test)
* [`sfp cli update`](#sfp-cli-update)

## `sfp cli config get [FIRSTARGKEY]`

Fetch a config key/value pair from the config.json file in the .sfp folder.

```
USAGE
  $ sfp cli config get [FIRSTARGKEY] [--json] [-g] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -g, --global             Fetch the configuration variable globally, so they can be used from any Salesforce DX
                           project.
      --loglevel=<option>  [default: info] logging level for this command invocation
                           <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Fetch a config key/value pair from the config.json file in the .sfp folder.
  When this commands runs globally the file needs to be in the home folder.
  When this commands runs without flag the file needs to be in the project folder.

ALIASES
  $ sfp get
  $ sfp config get

EXAMPLES
  $ sfp config:unset domain core
```

*See code:* [*src/commands/cli/config/get.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp cli config list [FIRSTARGKEY]`

List all config key/value pair from the config.json file in the .sfp folder.

```
USAGE
  $ sfp cli config list [FIRSTARGKEY] [--json] [-g] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -g, --global             List the configuration variables globally, so they can be used from any Salesforce DX
                           project.
      --loglevel=<option>  [default: info] logging level for this command invocation
                           <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  List all config key/value pair from the config.json file in the .sfp folder.
  When this commands runs globally the file needs to be in the home folder.
  When this commands runs without flag the file needs to be in the project folder.

ALIASES
  $ sfp list
  $ sfp config list

EXAMPLES
  $ sfp config:list
```

*See code:* [*src/commands/cli/config/list.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp cli config set [FIRSTARGKEY] [SECONDARGVALUE]`

Set one configuration variable, such as sfp server URL, server email, or your default org.

```
USAGE
  $ sfp cli config set [FIRSTARGKEY] [SECONDARGVALUE] [--json] [-g] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

ARGUMENTS
  [FIRSTARGKEY]     Config key to set, for example server-url or server-email
  [SECONDARGVALUE]  Config value to store for the key

FLAGS
  -g, --global             Set the configuration variable globally, so it can be used from any Salesforce DX project.
      --loglevel=<option>  [default: info] logging level for this command invocation
                           <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Set one configuration variable, such as sfp server URL, server email, or your default org.

  Use configuration variables to set CLI defaults, such as your default org, SFP server URL, or SFP server login email.
  This command creates/updates a config.json file in the .sfp-pro folder.
  When this command runs globally the file is created in the home folder.
  When this command runs without --global the file is created in the project folder.

  Common SFP server defaults:
  - `server-url` - default SFP server URL used by commands with `--sfp-server-url`
  - `server-email` - default user email used by server-authenticated commands with `--email`

ALIASES
  $ sfp set
  $ sfp config set

EXAMPLES
  $ sfp set server-url http://localhost:4243

  $ sfp set server-email user@example.com

  $ sfp set server-url https://sfp.example.com --global

  $ sfp set server-email user@example.com --global

  $ sfp config set target-org me@my.org

  $ sfp config:set target-org me@my.org
```

*See code:* [*src/commands/cli/config/set.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp cli config unset [FIRSTARGKEY]`

Delete a config key/value pair from the config.json file in the .sfp folder.

```
USAGE
  $ sfp cli config unset [FIRSTARGKEY] [--json] [-g] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -g, --global             Delete the configuration variable globally, so they can be used from any Salesforce DX
                           project.
      --loglevel=<option>  [default: info] logging level for this command invocation
                           <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Delete a config key/value pair from the config.json file in the .sfp folder.
  When this commands runs globally the file needs to be in the home folder.
  When this commands runs without flag the file needs to be in the project folder.

ALIASES
  $ sfp unset
  $ sfp config unset

EXAMPLES
  $ sfp config:unset domain core
```

*See code:* [*src/commands/cli/config/unset.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp cli test`

Verify AI provider connectivity and authentication

```
USAGE
  $ sfp cli test -p anthropic|openai|amazon-bedrock|github-copilot [--json] [-m <value>] [--prompt <value>]
    [-t <value>]

FLAGS
  -m, --model=<value>      Model ID (uses provider default if not specified)
  -p, --provider=<option>  (required) AI provider to test
                           <options: anthropic|openai|amazon-bedrock|github-copilot>
  -t, --timeout=<value>    [default: 60] Request timeout in seconds
      --json               Output results as JSON
      --prompt=<value>     [default: Respond with exactly: OK] Test prompt to send

DESCRIPTION
  Verify AI provider connectivity and authentication

ALIASES
  $ sfp ai test

EXAMPLES
  $ sfp ai test --provider anthropic

  $ sfp ai test --provider openai --model gpt-4o

  $ sfp ai test --provider github-copilot

  $ sfp ai test --provider amazon-bedrock

  $ sfp ai test --prompt "What is 2+2?"
```

*See code:* [*src/commands/cli/test.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp cli update`

Update the SFP CLI to the latest version

```
USAGE
  $ sfp cli update [--json] [-r <value> | -v <value>] [-g <value>] [-t <value>]

FLAGS
  -g, --registry=<value>  [env: FLXBL_NPM_REGISTRY] NPM registry URL to use
  -r, --cadence=<value>   [default: latest] Release cadence to update to (e.g., 'latest','beta', 'development')
  -t, --token=<value>     [env: FLXBL_NPM_REGISTRY_KEY] NPM registry authentication token
  -v, --version=<value>   Specific version to update to

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Update the SFP CLI to the latest version

ALIASES
  $ sfp update

EXAMPLES
  $ sfp update

  $ sfp update --cadence latest

  $ sfp update --version 1.2.3

  $ sfp update --registry https://custom.registry.com
```

*See code:* [*src/commands/cli/update.ts*](https://source.flxbl.io/flxbl/sfp-pro)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flxbl.io/flxbl/sfp/sfp-community/cli-reference-v51-release-v3/advanced/cli.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
