{
  "schema_version": 2,
  "id": "commands/command-docs",
  "title": "COMMAND DOCS",
  "url": "https://redis.io/docs/latest/commands/command-docs/",
  "summary": "Returns documentary information about one, multiple or all commands.",
  "since": "7.0.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-18T09:48:09+01:00",
  "page_type": "content",
  "content_hash": "6361957d128ae7537609f2e14b3c8f268f5858693c3141512596b14365b8ef6e",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Return documentary information about commands.\n\nBy default, the reply includes all of the server's commands.\nYou can use the optional _command-name_ argument to specify the names of one or more commands.\n\nThe reply includes a map for each returned command.\nThe following keys may be included in the mapped reply:\n\n* **summary:** short command description.\n* **since:** the Redis version that added the command (or for module commands, the module version).\n* **group:** the functional group to which the command belongs.\n  Possible values are:\n    - array\n    - bf\n    - bitmap\n    - cf\n    - cluster\n    - cms\n    - connection\n    - generic\n    - geo\n    - hash\n    - hyperloglog\n    - json\n    - list\n    - pubsub\n    - scripting\n    - search\n    - server\n    - set\n    - sorted-set\n    - stream\n    - string\n    - suggestion\n    - tdigest\n    - timeseries\n    - topk\n    - transactions\n    - vector_set\n* **complexity:** a short explanation about the command's time complexity.\n* **doc_flags:** an array of documentation flags.\n  Possible values are:\n  - deprecated: the command is deprecated.\n  - syscmd: a system command that isn't meant to be called by users.\n* **deprecated_since:** the Redis version that deprecated the command (or for module commands, the module version)..\n* **replaced_by:** the alternative for a deprecated command.\n* **history:** an array of historical notes describing changes to the command's output or arguments. It should not contain information about behavioral changes.\n  Each entry is an array itself, made up of two elements:\n  1. The Redis version that the entry applies to.\n  2. The description of the change.\n* **arguments:** an array of maps that describe the command's arguments.\n  Please refer to the [Redis command arguments](https://redis.io/docs/latest/develop/reference/command-arguments) page for more information."
    },
    {
      "id": "optional-arguments",
      "title": "Optional arguments",
      "role": "parameters",
      "text": "<details open><summary><code>command-name [command-name ...]</code></summary>\n\nOne or more command names to return documentation for. If omitted, documentation for all commands is returned.\n\n</details>"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "redis> COMMAND DOCS SET\n1) \"set\"\n2)  1) \"summary\"\n    2) \"Sets the string value of a key, ignoring its type. The key is created if it doesn't exist.\"\n    3) \"since\"\n    4) \"1.0.0\"\n    5) \"group\"\n    6) \"string\"\n    7) \"complexity\"\n    8) \"O(1)\"\n    9) \"history\"\n   10) 1) 1) \"2.6.12\"\n          2) \"Added the `EX`, `PX`, `NX` and `XX` options.\"\n       2) 1) \"6.0.0\"\n          2) \"Added the `KEEPTTL` option.\"\n       3) 1) \"6.2.0\"\n          2) \"Added the `GET`, `EXAT` and `PXAT` option.\"\n       4) 1) \"7.0.0\"\n          2) \"Allowed the `NX` and `GET` options to be used together.\"\n       5) 1) \"8.4.0\"\n          2) \"Added 'IFEQ', 'IFNE', 'IFDEQ', 'IFDNE' options.\"\n   11) \"arguments\"\n   12) 1) 1) \"name\"\n          2) \"key\"\n          3) \"type\"\n          4) \"key\"\n          5) \"display_text\"\n          6) \"key\"\n          7) \"key_spec_index\"\n          8) (integer) 0\n       2) 1) \"name\"\n          2) \"value\"\n          3) \"type\"\n          4) \"string\"\n          5) \"display_text\"\n          6) \"value\"\n       3)  1) \"name\"\n           2) \"condition\"\n           3) \"type\"\n           4) \"oneof\"\n           5) \"since\"\n           6) \"2.6.12\"\n           7) \"flags\"\n           8) 1) optional\n           9) \"arguments\"\n          10) 1) 1) \"name\"\n                 2) \"nx\"\n                 3) \"type\"\n                 4) \"pure-token\"\n                 5) \"display_text\"\n                 6) \"nx\"\n                 7) \"token\"\n                 8) \"NX\"\n              2) 1) \"name\"\n                 2) \"xx\"\n                 3) \"type\"\n                 4) \"pure-token\"\n                 5) \"display_text\"\n                 6) \"xx\"\n                 7) \"token\"\n                 8) \"XX\"\n              3)  1) \"name\"\n                  2) \"ifeq-value\"\n                  3) \"type\"\n                  4) \"string\"\n                  5) \"display_text\"\n                  6) \"ifeq-value\"\n                  7) \"token\"\n                  8) \"IFEQ\"\n                  9) \"since\"\n                 10) \"8.4.0\"\n              4)  1) \"name\"\n                  2) \"ifne-value\"\n                  3) \"type\"\n                  4) \"string\"\n                  5) \"display_text\"\n                  6) \"ifne-value\"\n                  7) \"token\"\n                  8) \"IFNE\"\n                  9) \"since\"\n                 10) \"8.4.0\"\n              5)  1) \"name\"\n                  2) \"ifdeq-digest\"\n                  3) \"type\"\n                  4) \"string\"\n                  5) \"display_text\"\n                  6) \"ifdeq-digest\"\n                  7) \"token\"\n                  8) \"IFDEQ\"\n                  9) \"since\"\n                 10) \"8.4.0\"\n              6)  1) \"name\"\n                  2) \"ifdne-digest\"\n                  3) \"type\"\n                  4) \"string\"\n                  5) \"display_text\"\n                  6) \"ifdne-digest\"\n                  7) \"token\"\n                  8) \"IFDNE\"\n                  9) \"since\"\n                 10) \"8.4.0\"\n       4)  1) \"name\"\n           2) \"get\"\n           3) \"type\"\n           4) \"pure-token\"\n           5) \"display_text\"\n           6) \"get\"\n           7) \"token\"\n           8) \"GET\"\n           9) \"since\"\n          10) \"6.2.0\"\n          11) \"flags\"\n          12) 1) optional\n       5) 1) \"name\"\n          2) \"expiration\"\n          3) \"type\"\n          4) \"oneof\"\n          5) \"flags\"\n          6) 1) optional\n          7) \"arguments\"\n          8) 1)  1) \"name\"\n                 2) \"seconds\"\n                 3) \"type\"\n                 4) \"integer\"\n                 5) \"display_text\"\n                 6) \"seconds\"\n                 7) \"token\"\n                 8) \"EX\"\n                 9) \"since\"\n                10) \"2.6.12\"\n             2)  1) \"name\"\n                 2) \"milliseconds\"\n                 3) \"type\"\n                 4) \"integer\"\n                 5) \"display_text\"\n                 6) \"milliseconds\"\n                 7) \"token\"\n                 8) \"PX\"\n                 9) \"since\"\n                10) \"2.6.12\"\n             3)  1) \"name\"\n                 2) \"unix-time-seconds\"\n                 3) \"type\"\n                 4) \"unix-time\"\n                 5) \"display_text\"\n                 6) \"unix-time-seconds\"\n                 7) \"token\"\n                 8) \"EXAT\"\n                 9) \"since\"\n                10) \"6.2.0\"\n             4)  1) \"name\"\n                 2) \"unix-time-milliseconds\"\n                 3) \"type\"\n                 4) \"unix-time\"\n                 5) \"display_text\"\n                 6) \"unix-time-milliseconds\"\n                 7) \"token\"\n                 8) \"PXAT\"\n                 9) \"since\"\n                10) \"6.2.0\"\n             5)  1) \"name\"\n                 2) \"keepttl\"\n                 3) \"type\"\n                 4) \"pure-token\"\n                 5) \"display_text\"\n                 6) \"keepttl\"\n                 7) \"token\"\n                 8) \"KEEPTTL\"\n                 9) \"since\"\n                10) \"6.0.0\""
    },
    {
      "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[Array reply](../../develop/reference/protocol-spec#arrays): a map, as a flattened array, where each key is a command name, and each value is the documentary information.\n\n**RESP3:**\n\n[Map reply](../../develop/reference/protocol-spec#maps): a map where each key is a command name, and each value is the documentary information."
    }
  ],
  "examples": []
}
