COMMAND DOCS
COMMAND DOCS [command-name [command-name ...]]
- Group
- Server
- Complexity
- O(N) where N is the number of commands asked about
- Arity
- -2 (at least 2 words, counting the command name)
- 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
Section titled “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. |
command_flags |
The flags, as in COMMAND INFO. |
Examples
Section titled “Examples”127.0.0.1:6379> COMMAND DOCS get1) "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
Section titled “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
Section titled “See also”Was this page helpful?
Thanks for the feedback.