COMMAND-DOCS(3valkey)

๐Ÿ“ฆ
version 9.0.6 ยท 2 versions
, in fedora 44

๐Ÿ’– COMMAND-DOCS ๐Ÿ’–

okay so bestie, welcome to command-docs from the Valkey Command Manual โ€” this is the page where the server spills the tea about its own commands. no cap, it literally tells you the documentation about one command, a few commands, or every single one. โœจ


๐ŸŒธ NAME ๐ŸŒธ

command-docs โ€” returns documentary information about one, multiple or all commands. yes she's nosy and we love that for her. ๐ŸŽ€


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

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

โœจ DESCRIPTION โœจ

Return documentary information about commands. it's giving "tell me everything about yourself" energy and honestly? iconic. ๐Ÿ’…

By default, the reply includes all of the server's commands. but if you don't want the whole buffet, you can use the optional command-name argument to specify the names of one or more commands. slay, picky queen. ๐Ÿ“

The reply includes a map for each returned command. the following keys may be included in the mapped reply:

  • summary โ€” short command description. the lil elevator pitch. ๐Ÿ’–
  • since โ€” the Valkey version that added the command (or for module commands, the module version). like a birthday but for features. ๐ŸŽ‚
  • group โ€” the functional group to which the command belongs. possible values are:
    • bitmap
    • cluster
    • connection
    • generic
    • geo
    • hash
    • hyperloglog
    • list
    • module
    • pubsub
    • scripting
    • sentinel
    • server
    • set
    • sorted-set
    • stream
    • string
    • transactions
  • complexity โ€” a short explanation about the command's time complexity. aka how hard she has to work. ๐Ÿ˜ฎโ€๐Ÿ’จ
  • doc_flags โ€” an array of documentation flags. possible values are:
    • deprecated โ€” the command is deprecated. ๐Ÿ’€
    • syscmd โ€” a system command that isn't meant to be called by users. bestie do NOT touch, that's not for you, fr fr.
  • deprecated_since โ€” the Valkey version that deprecated the command (or for module commands, the module version)..
  • replaced_by โ€” the alternative for a deprecated command. the glow-up replacement. ๐Ÿ‘‘
  • history โ€” an array of historical notes describing changes to the command's output or arguments. it should not contain information about behavioral changes. each entry is an array itself, made up of two elements:
    1. The Valkey version that the entry applies to.
    2. The description of the change.
  • arguments โ€” an array of maps that describe the command's arguments. please refer to the Valkey command arguments page for more information. (that's a whole other lore drop, iykyk ๐Ÿงš)

๐Ÿซถ REPLY ๐Ÿซถ

๐Ÿ’œ RESP2

valkey-protocol(7) Array reply: a map, as a flattened array, where each key is a command name, and each value is the documentary information. flattened, like my emotional state during finals. ๐Ÿ˜ญ

๐Ÿ’œ RESP3

valkey-protocol(7) Map reply: a map where each key is a command name, and each value is the documentary information. actual nested map, we love structure. ๐ŸŒˆ


๐Ÿ”ฅ COMPLEXITY ๐Ÿ”ฅ

O(N) where N is the number of commands to look up


๐Ÿ‘‘ ACL CATEGORIES ๐Ÿ‘‘

@connection @slow


โญ HISTORY โญ

  • Available since: 7.0.0

๐ŸŽ€ EXAMPLES ๐ŸŽ€

127.0.0.1:6379> COMMAND DOCS SET
1) "set"
2)  1) "summary"
    2) "Sets the string value of a key, ignoring its type. The key is created if it doesn't exist."
    3) "since"
    4) "1.0.0"
    5) "group"
    6) "string"
    7) "complexity"
    8) "O(1)"
    9) "history"
   10) 1) 1) "2.6.12"
          2) "Added the `EX`, `PX`, `NX` and `XX` options."
       2) 1) "6.0.0"
          2) "Added the `KEEPTTL` option."
       3) 1) "6.2.0"
          2) "Added the `GET`, `EXAT` and `PXAT` option."
       4) 1) "7.0.0"
          2) "Allowed the `NX` and `GET` options to be used together."
   11) "arguments"
   12) 1) 1) "name"
          2) "key"
          3) "type"
          4) "key"
          5) "display_text"
          6) "key"
          7) "key_spec_index"
          8) (integer) 0
       2) 1) "name"
          2) "value"
          3) "type"
          4) "string"
          5) "display_text"
          6) "value"
       3)  1) "name"
           2) "condition"
           3) "type"
           4) "oneof"
           5) "since"
           6) "2.6.12"
           7) "flags"
           8) 1) optional
           9) "arguments"
          10) 1) 1) "name"
                 2) "nx"
                 3) "type"
                 4) "pure-token"
                 5) "display_text"
                 6) "nx"
                 7) "token"
                 8) "NX"
              2) 1) "name"
                 2) "xx"
                 3) "type"
                 4) "pure-token"
                 5) "display_text"
                 6) "xx"
                 7) "token"
                 8) "XX"
       4)  1) "name"
           2) "get"
           3) "type"
           4) "pure-token"
           5) "display_text"
           6) "get"
           7) "token"
           8) "GET"
           9) "since"
          10) "6.2.0"
          11) "flags"
          12) 1) optional
       5) 1) "name"
          2) "expiration"
          3) "type"
          4) "oneof"
          5) "flags"
          6) 1) optional
          7) "arguments"
          8) 1)  1) "name"
                 2) "seconds"
                 3) "type"
                 4) "integer"
                 5) "display_text"
                 6) "seconds"
                 7) "token"
                 8) "EX"
                 9) "since"
                10) "2.6.12"
              2)  1) "name"
                 2) "milliseconds"
                 3) "type"
                 4) "integer"
                 5) "display_text"
                 6) "milliseconds"
                 7) "token"
                 8) "PX"
                 9) "since"
                10) "2.6.12"
              3)  1) "name"
                 2) "unix-time-seconds"
                 3) "type"
                 4) "unix-time"
                 5) "display_text"
                 6) "unix-time-seconds"
                 7) "token"
                 8) "EXAT"
                 9) "since"
                10) "6.2.0"
              4)  1) "name"
                 2) "unix-time-milliseconds"
                 3) "type"
                 4) "unix-time"
                 5) "display_text"
                 6) "unix-time-milliseconds"
                 7) "token"
                 8) "PXAT"
                 9) "since"
                10) "6.2.0"
              5)  1) "name"
                 2) "keepttl"
                 3) "type"
                 4) "pure-token"
                 5) "display_text"
                 6) "keepttl"
                 7) "token"
                 8) "KEEPTTL"
                 9) "since"
                10) "6.0.0"

like. the LORE. the depth. the way SET has a whole family tree of options. we are obsessed. ๐Ÿฅน๐Ÿ’–


๐ŸŒˆ SEE ALSO ๐ŸŒˆ

acl(3valkey), acl-cat(3valkey), acl-deluser(3valkey), acl-dryrun(3valkey), acl-genpass(3valkey), acl-getuser(3valkey), acl-help(3valkey), acl-list(3valkey), acl-load(3valkey), acl-log(3valkey), acl-save(3valkey), acl-setuser(3valkey), acl-users(3valkey), acl-whoami(3valkey), bgrewriteaof(3valkey), bgsave(3valkey), command(3valkey), command-count(3valkey), command-getkeys(3valkey), command-getkeysandflags(3valkey), command-help(3valkey), command-info(3valkey), command-list(3valkey), commandlog(3valkey), commandlog-get(3valkey), commandlog-help(3valkey), commandlog-len(3valkey), commandlog-reset(3valkey), config(3valkey), config-get(3valkey), config-help(3valkey), config-resetstat(3valkey), config-rewrite(3valkey), config-set(3valkey), dbsize(3valkey), debug(3valkey), failover(3valkey), flushall(3valkey), flushdb(3valkey), info(3valkey), lastsave(3valkey), latency(3valkey), latency-doctor(3valkey), latency-graph(3valkey), latency-help(3valkey), latency-histogram(3valkey), latency-history(3valkey), latency-latest(3valkey), latency-reset(3valkey), lolwut(3valkey), memory(3valkey), memory-doctor(3valkey), memory-help(3valkey), memory-malloc-stats(3valkey), memory-purge(3valkey), memory-stats(3valkey), memory-usage(3valkey), module(3valkey), module-help(3valkey), module-list(3valkey), module-load(3valkey), module-loadex(3valkey), module-unload(3valkey), monitor(3valkey), psync(3valkey), replconf(3valkey), replicaof(3valkey), restore-asking(3valkey), role(3valkey), save(3valkey), shutdown(3valkey), slowlog(3valkey), slowlog-get(3valkey), slowlog-help(3valkey), slowlog-len(3valkey), slowlog-reset(3valkey), swapdb(3valkey), sync(3valkey), time(3valkey)


๐Ÿ’Œ and that's the whole page bestie. go read some docs, treat yourself. no cap. ๐Ÿซถ

this cutie is from Valkey 9.0.0, dated 2025-10-21 โ€” sending you all the love, mwah ๐Ÿ’…โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from