COMMAND
Returns information about registered server commands.
Syntax
Section titled “Syntax”COMMAND [subcommand [arguments]]Subcommands
Section titled “Subcommands”COMMAND
Section titled “COMMAND”Returns information about all registered commands.
COMMANDCOMMAND INFO
Section titled “COMMAND INFO”Returns information about one or more specific commands.
COMMAND INFO [command ...]| Parameter | Type | Required | Description |
|---|---|---|---|
command | string | No | One or more command names to query (returns all if omitted) |
COMMAND COUNT
Section titled “COMMAND COUNT”Returns the total number of registered commands.
COMMAND COUNTCOMMAND DOCS
Section titled “COMMAND DOCS”Returns command documentation (not yet implemented).
COMMAND DOCSReturn Value
Section titled “Return Value”- COMMAND / COMMAND INFO: Array of arrays, one per command, each containing:
| Position | Field | Type | Description |
|---|---|---|---|
| 1 | name | string | Command name (lowercase) |
| 2 | arity | integer | Number of arguments |
| 3 | flags | array | Command flags (e.g. readonly, fast) |
| 4 | first key | integer | Position of the first key argument |
| 5 | last key | integer | Position of the last key argument |
| 6 | step | integer | Key step interval |
| 7 | acl categories | array | ACL categories (prefixed with @) |
| 8 | tips | array | Command tips |
| 9 | key specifications | array | Key specification details |
| 10 | subcommands | array | Subcommand info (empty) |
- COMMAND COUNT: Integer: total number of commands.
- COMMAND DOCS: Empty array (not yet implemented).
Behavior
Section titled “Behavior”Reads command metadata from the server’s command registry. For COMMAND and COMMAND INFO, builds a detailed array
structure per command. COMMAND COUNT returns the total count of all registered commands.
This command does not require the cluster to be initialized.
Errors
Section titled “Errors”| Error | Condition |
|---|---|
ERR | Unknown subcommand |
Examples
Section titled “Examples”Get command count:
127.0.0.1:5484> COMMAND COUNT(integer) 42Get info for PING:
127.0.0.1:5484> COMMAND INFO ping1) 1) "ping" 2) (integer) -1 3) 1) "fast" 4) (integer) 0 5) (integer) 0 6) (integer) 0 7) 1) "@connection" 8) (empty array) 9) (empty array) 10) (empty array)