{
  "schema_version": 2,
  "id": "commands/client-setinfo",
  "title": "CLIENT SETINFO",
  "url": "https://redis.io/docs/latest/commands/client-setinfo/",
  "summary": "Sets information specific to the client or connection.",
  "since": "7.2.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-18T09:48:21+01:00",
  "page_type": "content",
  "content_hash": "cff34d41c874ce469ab890be01ba7364340130e4c46f0e400c33450b182f1aef",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "The `CLIENT SETINFO` command assigns various info attributes to the current connection which are displayed in the output of [`CLIENT LIST`](https://redis.io/docs/latest/commands/client-list) and [`CLIENT INFO`](https://redis.io/docs/latest/commands/client-info).\n\nClient libraries are expected to pipeline this command after authentication on all connections\nand ignore failures since they could be connected to an older version that doesn't support them."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "Provide one of the following.\n\n<details open><summary><code>LIB-NAME libname</code></summary>\n\nSet the library name for the current connection.\n\n</details>\n\n<details open><summary><code>LIB-VER libver</code></summary>\n\nSet the library version for the current connection.\n\n</details>"
    },
    {
      "id": "details",
      "title": "Details",
      "role": "content",
      "text": "There is no limit to the length of these attributes. However it is not possible to use spaces, newlines, or other non-printable characters that would violate the format of the [`CLIENT LIST`](https://redis.io/docs/latest/commands/client-list) reply.\n\n[Official client libraries](https://redis.io/docs/latest/develop/connect/clients/) allow extending `lib-name` with a custom suffix to expose additional information about the client. \nFor example, high-level libraries like [redis-om-spring](https://github.com/redis/redis-om-spring) can report their version. \nThe resulting `lib-name` would be `jedis(redis-om-spring_v1.0.0)`. \nBrace characters are used to delimit the custom suffix and should be avoided in the suffix itself.\nWe recommend using the following format for the custom suffixes for third-party libraries `(?<custom-name>[ -~]+)[ -~]v(?<custom-version>[\\d\\.]+)` and use `;` to delimit multiple suffixes.\n\nNote that these attributes are not cleared by the [`RESET`](https://redis.io/docs/latest/commands/reset) command."
    },
    {
      "id": "redis-software-and-redis-cloud-compatibility",
      "title": "Redis Software and Redis Cloud compatibility",
      "role": "content",
      "text": "| Redis<br />Software | Redis<br />Cloud | <span style=\"min-width: 9em; display: table-cell\">Notes</span> |\n|:----------------------|:-----------------|:------|\n| <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> | <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\n[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the attribute name was successfully set.\n\n**RESP3:**\n\n[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the attribute name was successfully set."
    }
  ],
  "examples": []
}
