# Key-Value

Store and retrieve key-value pairs

* [`sfp server key-value add`](#sfp-server-key-value-add)
* [`sfp server key-value delete`](#sfp-server-key-value-delete)
* [`sfp server key-value get`](#sfp-server-key-value-get)
* [`sfp server key-value update`](#sfp-server-key-value-update)

## `sfp server key-value add`

Add a new key-value pair to the server

```
USAGE
  $ sfp server key-value add -k <value> -v <value> [--json] [--repository <value>] [-e <value>] [-t <value>]
    [--sfp-server-url <value>] [-u] [-g <value>...] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -e, --email=<value>               Email address for authenticated user. Ignored if --application-token is provided.
                                    Can be set via SFP_SERVER_USER env var.
  -g, --logsgroupsymbol=<value>...  Symbol used by CICD platform to group/collapse logs in the console. Provide an
                                    opening group, and an optional closing group symbol.
  -k, --key=<value>                 (required) The key to store
  -t, --application-token=<value>   Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var
                                    (CLI flags take precedence over env vars).
  -u, --upsert                      Create a new key-value pair or update if it already exists
  -v, --value=<value>               (required) The value to store
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --repository=<value>          The repository identifier. E.g `owner/repo` for GitHub/GitLab or `org/project/repo`
                                    for Azure DevOps
      --sfp-server-url=<value>      URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp
                                    config:set server-url

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Add a new key-value pair to the server

EXAMPLES
  $ sfp server key-value add --key mykey --value myvalue

  $ sfp server key-value add --key mykey --value myvalue --upsert
```

*See code:* [*src/commands/server/key-value/add.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp server key-value delete`

Delete a key-value pair from the server

```
USAGE
  $ sfp server key-value delete -k <value> [--json] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url
    <value>] [-g <value>...] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -e, --email=<value>               Email address for authenticated user. Ignored if --application-token is provided.
                                    Can be set via SFP_SERVER_USER env var.
  -g, --logsgroupsymbol=<value>...  Symbol used by CICD platform to group/collapse logs in the console. Provide an
                                    opening group, and an optional closing group symbol.
  -k, --key=<value>                 (required) The key to delete
  -t, --application-token=<value>   Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var
                                    (CLI flags take precedence over env vars).
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --repository=<value>          The repository identifier. E.g `owner/repo` for GitHub/GitLab or `org/project/repo`
                                    for Azure DevOps
      --sfp-server-url=<value>      URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp
                                    config:set server-url

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Delete a key-value pair from the server

EXAMPLES
  $ sfp server key-value delete --key mykey
```

*See code:* [*src/commands/server/key-value/delete.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp server key-value get`

Get a value by key from the server

```
USAGE
  $ sfp server key-value get -k <value> [--json] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url
    <value>] [-g <value>...] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -e, --email=<value>               Email address for authenticated user. Ignored if --application-token is provided.
                                    Can be set via SFP_SERVER_USER env var.
  -g, --logsgroupsymbol=<value>...  Symbol used by CICD platform to group/collapse logs in the console. Provide an
                                    opening group, and an optional closing group symbol.
  -k, --key=<value>                 (required) The key to retrieve
  -t, --application-token=<value>   Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var
                                    (CLI flags take precedence over env vars).
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --repository=<value>          The repository identifier. E.g `owner/repo` for GitHub/GitLab or `org/project/repo`
                                    for Azure DevOps
      --sfp-server-url=<value>      URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp
                                    config:set server-url

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Get a value by key from the server

EXAMPLES
  $ sfp server key-value get --key mykey
```

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

## `sfp server key-value update`

Update a value for an existing key in the server

```
USAGE
  $ sfp server key-value update -k <value> -v <value> [--json] [--repository <value>] [-e <value>] [-t <value>]
    [--sfp-server-url <value>] [-g <value>...] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -e, --email=<value>               Email address for authenticated user. Ignored if --application-token is provided.
                                    Can be set via SFP_SERVER_USER env var.
  -g, --logsgroupsymbol=<value>...  Symbol used by CICD platform to group/collapse logs in the console. Provide an
                                    opening group, and an optional closing group symbol.
  -k, --key=<value>                 (required) The key to update
  -t, --application-token=<value>   Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var
                                    (CLI flags take precedence over env vars).
  -v, --value=<value>               (required) The new value to set
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --repository=<value>          The repository identifier. E.g `owner/repo` for GitHub/GitLab or `org/project/repo`
                                    for Azure DevOps
      --sfp-server-url=<value>      URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp
                                    config:set server-url

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Update a value for an existing key in the server

EXAMPLES
  $ sfp server key-value update --key mykey --value newvalue
```

*See code:* [*src/commands/server/key-value/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/cli-reference-v51-release-v3/server/key-value.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.
