# COMMAND DOCS

> Return a short documentation entry for each command.

URL: https://docs.hotkv.com/commands/command-docs/

```
COMMAND DOCS [command-name [command-name ...]]
```

- Group: Server
- Complexity: O(N) where N is the number of commands asked about
- HotKV Cloud: all plans
- On-Premise: no license needed

`COMMAND DOCS` returns a documentation entry for each command you name, or
for every command if you name none. Tools such as `redis-cli` call it to
offer hints while you type.

HotKV keeps these entries minimal: they carry the arity and flags, not the
argument-by-argument documentation Redis returns. The full reference for
every command is this documentation site.

## Return value

An array of pairs: the command name in lower case, then its entry. An unknown
name gets an empty entry. Each entry is an array of five field and value
pairs, in RESP2 and RESP3 alike:

| Field | Value |
| --- | --- |
| `summary` | The command name. |
| `since` | A fixed version string, the same for every command. |
| `group` | `pubsub` for Pub/Sub commands, `server` for administrative commands, `generic` for the rest. |
| `arity` | The arity, as in [COMMAND INFO](https://docs.hotkv.com/commands/command-info/index.md). |
| `command_flags` | The flags, as in [COMMAND INFO](https://docs.hotkv.com/commands/command-info/index.md). |

## Examples

```
127.0.0.1:6379> COMMAND DOCS get
1) "get"
2)  1) "summary"
    2) "GET"
    3) "since"
    4) "<version>"
    5) "group"
    6) "generic"
    7) "arity"
    8) (integer) 2
    9) "command_flags"
   10) 1) "readonly"
       2) "fast"
```

## Compatibility

Redis 7 and Valkey 8 return a real summary, the version that introduced the
command, the command's group, its arguments, and a map in RESP3. HotKV's
entries have the shape shown above, so tools that rely on `COMMAND DOCS`
for argument hints show fewer of them.

## See also

[COMMAND INFO](https://docs.hotkv.com/commands/command-info/index.md), [COMMAND](https://docs.hotkv.com/commands/command/index.md)