Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

COMMAND

Last updated
COMMAND
COMMAND subcommand [argument ...]
Group
Server
Complexity
O(N) where N is the number of commands
Arity
-1 (at least 1 words, counting the command name)
Flags
read-only, loading
HotKV Cloud
All plans
On-Premise
no license needed

COMMAND without arguments describes every command the server has, in the same format as COMMAND INFO. Cluster-aware client libraries read it at startup to learn where each command’s keys are, so they can send the command to the right node.

The subcommands below answer narrower questions. COMMAND HELP lists them.

Subcommand What it does
COMMAND COUNT How many commands there are.
COMMAND LIST Every command and subcommand name, optionally filtered.
COMMAND INFO Arity, flags, key positions and ACL categories of commands.
COMMAND DOCS A short documentation entry per command.
COMMAND GETKEYS The keys a full command line would use.
COMMAND GETKEYSANDFLAGS The keys, and whether each is read or written.

An unknown subcommand gets ERR unknown subcommand '<name>'.

An array with one entry per command, as described on COMMAND INFO.

127.0.0.1:6379> COMMAND
1) 1) "get"
2) (integer) 2
3) 1) "readonly"
2) "fast"
4) (integer) 1
5) (integer) 1
6) (integer) 1
7) 1) "@read"
2) "@string"
3) "@fast"
2) ...

Redis 7 and Valkey 8 add three more elements to each entry (tips, key specifications and subcommands). HotKV returns the first seven, which is what client libraries use for routing. The commands HotKV adds (for example PCACHE.GET) are included.

COMMAND INFO, COMMAND GETKEYS, COMMAND LIST, ACL CAT