summaryrefslogtreecommitdiffstats
path: root/src/commands
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 17:31:02 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 17:31:02 +0000
commitbb12c1fd00eb51118749bbbc69c5596835fcbd3b (patch)
tree88038a98bd31c1b765f3390767a2ec12e37c79ec /src/commands
parentInitial commit. (diff)
downloadredis-bb12c1fd00eb51118749bbbc69c5596835fcbd3b.tar.xz
redis-bb12c1fd00eb51118749bbbc69c5596835fcbd3b.zip
Adding upstream version 5:7.0.15.upstream/5%7.0.15upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/acl-cat.json24
-rw-r--r--src/commands/acl-deluser.json25
-rw-r--r--src/commands/acl-dryrun.json35
-rw-r--r--src/commands/acl-genpass.json24
-rw-r--r--src/commands/acl-getuser.json34
-rw-r--r--src/commands/acl-help.json16
-rw-r--r--src/commands/acl-list.json18
-rw-r--r--src/commands/acl-load.json18
-rw-r--r--src/commands/acl-log.json36
-rw-r--r--src/commands/acl-save.json18
-rw-r--r--src/commands/acl-setuser.json40
-rw-r--r--src/commands/acl-users.json18
-rw-r--r--src/commands/acl-whoami.json17
-rw-r--r--src/commands/acl.json12
-rw-r--r--src/commands/append.json49
-rw-r--r--src/commands/asking.json16
-rw-r--r--src/commands/auth.json40
-rw-r--r--src/commands/bgrewriteaof.json15
-rw-r--r--src/commands/bgsave.json30
-rw-r--r--src/commands/bitcount.json82
-rw-r--r--src/commands/bitfield.json144
-rw-r--r--src/commands/bitfield_ro.json62
-rw-r--r--src/commands/bitop.json72
-rw-r--r--src/commands/bitpos.json93
-rw-r--r--src/commands/blmove.json106
-rw-r--r--src/commands/blmpop.json77
-rw-r--r--src/commands/blpop.json57
-rw-r--r--src/commands/brpop.json57
-rw-r--r--src/commands/brpoplpush.json85
-rw-r--r--src/commands/bzmpop.json77
-rw-r--r--src/commands/bzpopmax.json58
-rw-r--r--src/commands/bzpopmin.json58
-rw-r--r--src/commands/client-caching.json38
-rw-r--r--src/commands/client-getname.json20
-rw-r--r--src/commands/client-getredir.json20
-rw-r--r--src/commands/client-help.json19
-rw-r--r--src/commands/client-id.json20
-rw-r--r--src/commands/client-info.json23
-rw-r--r--src/commands/client-kill.json131
-rw-r--r--src/commands/client-list.json95
-rw-r--r--src/commands/client-no-evict.json39
-rw-r--r--src/commands/client-pause.json51
-rw-r--r--src/commands/client-reply.json43
-rw-r--r--src/commands/client-setname.json26
-rw-r--r--src/commands/client-tracking.json76
-rw-r--r--src/commands/client-trackinginfo.json20
-rw-r--r--src/commands/client-unblock.json44
-rw-r--r--src/commands/client-unpause.json21
-rw-r--r--src/commands/client.json12
-rw-r--r--src/commands/cluster-addslots.json23
-rw-r--r--src/commands/cluster-addslotsrange.json33
-rw-r--r--src/commands/cluster-bumpepoch.json19
-rw-r--r--src/commands/cluster-count-failure-reports.json24
-rw-r--r--src/commands/cluster-countkeysinslot.json20
-rw-r--r--src/commands/cluster-delslots.json23
-rw-r--r--src/commands/cluster-delslotsrange.json33
-rw-r--r--src/commands/cluster-failover.json35
-rw-r--r--src/commands/cluster-flushslots.json16
-rw-r--r--src/commands/cluster-forget.json22
-rw-r--r--src/commands/cluster-getkeysinslot.json27
-rw-r--r--src/commands/cluster-help.json15
-rw-r--r--src/commands/cluster-info.json17
-rw-r--r--src/commands/cluster-keyslot.json20
-rw-r--r--src/commands/cluster-links.json17
-rw-r--r--src/commands/cluster-meet.json38
-rw-r--r--src/commands/cluster-myid.json14
-rw-r--r--src/commands/cluster-nodes.json17
-rw-r--r--src/commands/cluster-replicas.json24
-rw-r--r--src/commands/cluster-replicate.json22
-rw-r--r--src/commands/cluster-reset.json35
-rw-r--r--src/commands/cluster-saveconfig.json16
-rw-r--r--src/commands/cluster-set-config-epoch.json22
-rw-r--r--src/commands/cluster-setslot.json48
-rw-r--r--src/commands/cluster-shards.json18
-rw-r--r--src/commands/cluster-slaves.json29
-rw-r--r--src/commands/cluster-slots.json32
-rw-r--r--src/commands/cluster.json9
-rw-r--r--src/commands/command-count.json19
-rw-r--r--src/commands/command-docs.json30
-rw-r--r--src/commands/command-getkeys.json19
-rw-r--r--src/commands/command-getkeysandflags.json19
-rw-r--r--src/commands/command-help.json19
-rw-r--r--src/commands/command-info.json36
-rw-r--r--src/commands/command-list.json47
-rw-r--r--src/commands/command.json21
-rw-r--r--src/commands/config-get.json36
-rw-r--r--src/commands/config-help.json15
-rw-r--r--src/commands/config-resetstat.json17
-rw-r--r--src/commands/config-rewrite.json17
-rw-r--r--src/commands/config-set.json44
-rw-r--r--src/commands/config.json9
-rw-r--r--src/commands/copy.json79
-rw-r--r--src/commands/dbsize.json21
-rw-r--r--src/commands/debug.json20
-rw-r--r--src/commands/decr.json46
-rw-r--r--src/commands/decrby.json50
-rw-r--r--src/commands/del.json48
-rw-r--r--src/commands/discard.json20
-rw-r--r--src/commands/dump.json46
-rw-r--r--src/commands/echo.json24
-rw-r--r--src/commands/eval.json66
-rw-r--r--src/commands/eval_ro.json65
-rw-r--r--src/commands/evalsha.json65
-rw-r--r--src/commands/evalsha_ro.json64
-rw-r--r--src/commands/exec.json19
-rw-r--r--src/commands/exists.json54
-rw-r--r--src/commands/expire.json82
-rw-r--r--src/commands/expireat.json82
-rw-r--r--src/commands/expiretime.json44
-rw-r--r--src/commands/failover.json51
-rw-r--r--src/commands/fcall.json66
-rw-r--r--src/commands/fcall_ro.json65
-rw-r--r--src/commands/flushall.json52
-rw-r--r--src/commands/flushdb.json52
-rw-r--r--src/commands/function-delete.json28
-rw-r--r--src/commands/function-dump.json17
-rw-r--r--src/commands/function-flush.json41
-rw-r--r--src/commands/function-help.json18
-rw-r--r--src/commands/function-kill.json22
-rw-r--r--src/commands/function-list.json34
-rw-r--r--src/commands/function-load.json35
-rw-r--r--src/commands/function-restore.json51
-rw-r--r--src/commands/function-stats.json23
-rw-r--r--src/commands/function.json9
-rw-r--r--src/commands/geoadd.json94
-rw-r--r--src/commands/geodist.json78
-rw-r--r--src/commands/geohash.json48
-rw-r--r--src/commands/geopos.json48
-rw-r--r--src/commands/georadius.json204
-rw-r--r--src/commands/georadius_ro.json146
-rw-r--r--src/commands/georadiusbymember.json195
-rw-r--r--src/commands/georadiusbymember_ro.json135
-rw-r--r--src/commands/geosearch.json212
-rw-r--r--src/commands/geosearchstore.json224
-rw-r--r--src/commands/get.json44
-rw-r--r--src/commands/getbit.json48
-rw-r--r--src/commands/getdel.json45
-rw-r--r--src/commands/getex.json78
-rw-r--r--src/commands/getrange.json51
-rw-r--r--src/commands/getset.json55
-rw-r--r--src/commands/hdel.json55
-rw-r--r--src/commands/hello.json63
-rw-r--r--src/commands/hexists.json47
-rw-r--r--src/commands/hget.json48
-rw-r--r--src/commands/hgetall.json46
-rw-r--r--src/commands/hincrby.json54
-rw-r--r--src/commands/hincrbyfloat.json54
-rw-r--r--src/commands/hkeys.json46
-rw-r--r--src/commands/hlen.json43
-rw-r--r--src/commands/hmget.json49
-rw-r--r--src/commands/hmset.json65
-rw-r--r--src/commands/hrandfield.json63
-rw-r--r--src/commands/hscan.json62
-rw-r--r--src/commands/hset.json66
-rw-r--r--src/commands/hsetnx.json53
-rw-r--r--src/commands/hstrlen.json47
-rw-r--r--src/commands/hvals.json46
-rw-r--r--src/commands/incr.json46
-rw-r--r--src/commands/incrby.json50
-rw-r--r--src/commands/incrbyfloat.json50
-rw-r--r--src/commands/info.json37
-rw-r--r--src/commands/keys.json27
-rw-r--r--src/commands/lastsave.json22
-rw-r--r--src/commands/latency-doctor.json22
-rw-r--r--src/commands/latency-graph.json28
-rw-r--r--src/commands/latency-help.json15
-rw-r--r--src/commands/latency-histogram.json30
-rw-r--r--src/commands/latency-history.json28
-rw-r--r--src/commands/latency-latest.json22
-rw-r--r--src/commands/latency-reset.json29
-rw-r--r--src/commands/latency.json9
-rw-r--r--src/commands/lcs.json72
-rw-r--r--src/commands/lindex.json47
-rw-r--r--src/commands/linsert.json68
-rw-r--r--src/commands/llen.json43
-rw-r--r--src/commands/lmove.json100
-rw-r--r--src/commands/lmpop.json72
-rw-r--r--src/commands/lolwut.json21
-rw-r--r--src/commands/lpop.json57
-rw-r--r--src/commands/lpos.json65
-rw-r--r--src/commands/lpush.json56
-rw-r--r--src/commands/lpushx.json56
-rw-r--r--src/commands/lrange.json51
-rw-r--r--src/commands/lrem.json51
-rw-r--r--src/commands/lset.json52
-rw-r--r--src/commands/ltrim.json51
-rw-r--r--src/commands/memory-doctor.json16
-rw-r--r--src/commands/memory-help.json15
-rw-r--r--src/commands/memory-malloc-stats.json16
-rw-r--r--src/commands/memory-purge.json15
-rw-r--r--src/commands/memory-stats.json16
-rw-r--r--src/commands/memory-usage.json46
-rw-r--r--src/commands/memory.json9
-rw-r--r--src/commands/mget.json48
-rw-r--r--src/commands/migrate.json169
-rw-r--r--src/commands/module-help.json15
-rw-r--r--src/commands/module-list.json18
-rw-r--r--src/commands/module-load.json29
-rw-r--r--src/commands/module-loadex.json54
-rw-r--r--src/commands/module-unload.json23
-rw-r--r--src/commands/module.json9
-rw-r--r--src/commands/monitor.json16
-rw-r--r--src/commands/move.json49
-rw-r--r--src/commands/mset.json59
-rw-r--r--src/commands/msetnx.json59
-rw-r--r--src/commands/multi.json20
-rw-r--r--src/commands/object-encoding.json46
-rw-r--r--src/commands/object-freq.json46
-rw-r--r--src/commands/object-help.json18
-rw-r--r--src/commands/object-idletime.json46
-rw-r--r--src/commands/object-refcount.json46
-rw-r--r--src/commands/object.json9
-rw-r--r--src/commands/persist.json44
-rw-r--r--src/commands/pexpire.json82
-rw-r--r--src/commands/pexpireat.json82
-rw-r--r--src/commands/pexpiretime.json44
-rw-r--r--src/commands/pfadd.json51
-rw-r--r--src/commands/pfcount.json46
-rw-r--r--src/commands/pfdebug.json52
-rw-r--r--src/commands/pfmerge.json69
-rw-r--r--src/commands/pfselftest.json19
-rw-r--r--src/commands/ping.json28
-rw-r--r--src/commands/psetex.json52
-rw-r--r--src/commands/psubscribe.json30
-rw-r--r--src/commands/psync.json25
-rw-r--r--src/commands/pttl.json53
-rw-r--r--src/commands/publish.json28
-rw-r--r--src/commands/pubsub-channels.json23
-rw-r--r--src/commands/pubsub-help.json15
-rw-r--r--src/commands/pubsub-numpat.json16
-rw-r--r--src/commands/pubsub-numsub.json24
-rw-r--r--src/commands/pubsub-shardchannels.json23
-rw-r--r--src/commands/pubsub-shardnumsub.json24
-rw-r--r--src/commands/pubsub.json9
-rw-r--r--src/commands/punsubscribe.json25
-rw-r--r--src/commands/quit.json21
-rw-r--r--src/commands/randomkey.json21
-rw-r--r--src/commands/readonly.json18
-rw-r--r--src/commands/readwrite.json18
-rw-r--r--src/commands/rename.json69
-rw-r--r--src/commands/renamenx.json74
-rw-r--r--src/commands/replconf.json20
-rw-r--r--src/commands/replicaof.json54
-rw-r--r--src/commands/reset.json21
-rw-r--r--src/commands/restore-asking.json99
-rw-r--r--src/commands/restore.json95
-rw-r--r--src/commands/role.json21
-rw-r--r--src/commands/rpop.json57
-rw-r--r--src/commands/rpoplpush.json73
-rw-r--r--src/commands/rpush.json56
-rw-r--r--src/commands/rpushx.json56
-rw-r--r--src/commands/sadd.json56
-rw-r--r--src/commands/save.json16
-rw-r--r--src/commands/scan.json52
-rw-r--r--src/commands/scard.json43
-rw-r--r--src/commands/script-debug.json40
-rw-r--r--src/commands/script-exists.json28
-rw-r--r--src/commands/script-flush.json47
-rw-r--r--src/commands/script-help.json18
-rw-r--r--src/commands/script-kill.json22
-rw-r--r--src/commands/script-load.json28
-rw-r--r--src/commands/script.json9
-rw-r--r--src/commands/sdiff.json47
-rw-r--r--src/commands/sdiffstore.json68
-rw-r--r--src/commands/select.json24
-rw-r--r--src/commands/sentinel-ckquorum.json21
-rw-r--r--src/commands/sentinel-config.json46
-rw-r--r--src/commands/sentinel-debug.json33
-rw-r--r--src/commands/sentinel-failover.json21
-rw-r--r--src/commands/sentinel-flushconfig.json16
-rw-r--r--src/commands/sentinel-get-master-addr-by-name.json22
-rw-r--r--src/commands/sentinel-help.json17
-rw-r--r--src/commands/sentinel-info-cache.json23
-rw-r--r--src/commands/sentinel-is-master-down-by-addr.json34
-rw-r--r--src/commands/sentinel-master.json22
-rw-r--r--src/commands/sentinel-masters.json16
-rw-r--r--src/commands/sentinel-monitor.json34
-rw-r--r--src/commands/sentinel-myid.json16
-rw-r--r--src/commands/sentinel-pending-scripts.json15
-rw-r--r--src/commands/sentinel-remove.json22
-rw-r--r--src/commands/sentinel-replicas.json22
-rw-r--r--src/commands/sentinel-reset.json22
-rw-r--r--src/commands/sentinel-sentinels.json22
-rw-r--r--src/commands/sentinel-set.json37
-rw-r--r--src/commands/sentinel-simulate-failure.json37
-rw-r--r--src/commands/sentinel-slaves.json27
-rw-r--r--src/commands/sentinel.json14
-rw-r--r--src/commands/set.json132
-rw-r--r--src/commands/setbit.json53
-rw-r--r--src/commands/setex.json52
-rw-r--r--src/commands/setnx.json49
-rw-r--r--src/commands/setrange.json52
-rw-r--r--src/commands/shutdown.json65
-rw-r--r--src/commands/sinter.json47
-rw-r--r--src/commands/sintercard.json55
-rw-r--r--src/commands/sinterstore.json68
-rw-r--r--src/commands/sismember.json47
-rw-r--r--src/commands/slaveof.json59
-rw-r--r--src/commands/slowlog-get.json33
-rw-r--r--src/commands/slowlog-help.json15
-rw-r--r--src/commands/slowlog-len.json21
-rw-r--r--src/commands/slowlog-reset.json20
-rw-r--r--src/commands/slowlog.json9
-rw-r--r--src/commands/smembers.json46
-rw-r--r--src/commands/smismember.json49
-rw-r--r--src/commands/smove.json72
-rw-r--r--src/commands/sort.json136
-rw-r--r--src/commands/sort_ro.json115
-rw-r--r--src/commands/spop.json60
-rw-r--r--src/commands/spublish.json46
-rw-r--r--src/commands/srandmember.json58
-rw-r--r--src/commands/srem.json55
-rw-r--r--src/commands/sscan.json62
-rw-r--r--src/commands/ssubscribe.json42
-rw-r--r--src/commands/strlen.json43
-rw-r--r--src/commands/subscribe.json25
-rw-r--r--src/commands/substr.json56
-rw-r--r--src/commands/sunion.json47
-rw-r--r--src/commands/sunionstore.json68
-rw-r--r--src/commands/sunsubscribe.json43
-rw-r--r--src/commands/swapdb.json28
-rw-r--r--src/commands/sync.json15
-rw-r--r--src/commands/time.json18
-rw-r--r--src/commands/touch.json48
-rw-r--r--src/commands/ttl.json53
-rw-r--r--src/commands/type.json43
-rw-r--r--src/commands/unlink.json49
-rw-r--r--src/commands/unsubscribe.json25
-rw-r--r--src/commands/unwatch.json20
-rw-r--r--src/commands/wait.json30
-rw-r--r--src/commands/watch.json47
-rw-r--r--src/commands/xack.json53
-rw-r--r--src/commands/xadd.json148
-rw-r--r--src/commands/xautoclaim.json81
-rw-r--r--src/commands/xclaim.json100
-rw-r--r--src/commands/xdel.json49
-rw-r--r--src/commands/xgroup-create.json82
-rw-r--r--src/commands/xgroup-createconsumer.json53
-rw-r--r--src/commands/xgroup-delconsumer.json52
-rw-r--r--src/commands/xgroup-destroy.json48
-rw-r--r--src/commands/xgroup-help.json18
-rw-r--r--src/commands/xgroup-setid.json75
-rw-r--r--src/commands/xgroup.json9
-rw-r--r--src/commands/xinfo-consumers.json51
-rw-r--r--src/commands/xinfo-groups.json50
-rw-r--r--src/commands/xinfo-help.json18
-rw-r--r--src/commands/xinfo-stream.json68
-rw-r--r--src/commands/xinfo.json9
-rw-r--r--src/commands/xlen.json43
-rw-r--r--src/commands/xpending.json87
-rw-r--r--src/commands/xrange.json63
-rw-r--r--src/commands/xread.json72
-rw-r--r--src/commands/xreadgroup.json92
-rw-r--r--src/commands/xrevrange.json63
-rw-r--r--src/commands/xsetid.json69
-rw-r--r--src/commands/xtrim.json103
-rw-r--r--src/commands/zadd.json124
-rw-r--r--src/commands/zcard.json43
-rw-r--r--src/commands/zcount.json52
-rw-r--r--src/commands/zdiff.json55
-rw-r--r--src/commands/zdiffstore.json73
-rw-r--r--src/commands/zincrby.json54
-rw-r--r--src/commands/zinter.json85
-rw-r--r--src/commands/zintercard.json55
-rw-r--r--src/commands/zinterstore.json103
-rw-r--r--src/commands/zlexcount.json52
-rw-r--r--src/commands/zmpop.json72
-rw-r--r--src/commands/zmscore.json49
-rw-r--r--src/commands/zpopmax.json50
-rw-r--r--src/commands/zpopmin.json50
-rw-r--r--src/commands/zrandmember.json63
-rw-r--r--src/commands/zrange.json105
-rw-r--r--src/commands/zrangebylex.json72
-rw-r--r--src/commands/zrangebyscore.json85
-rw-r--r--src/commands/zrangestore.json114
-rw-r--r--src/commands/zrank.json48
-rw-r--r--src/commands/zrem.json55
-rw-r--r--src/commands/zremrangebylex.json51
-rw-r--r--src/commands/zremrangebyrank.json51
-rw-r--r--src/commands/zremrangebyscore.json51
-rw-r--r--src/commands/zrevrange.json62
-rw-r--r--src/commands/zrevrangebylex.json72
-rw-r--r--src/commands/zrevrangebyscore.json84
-rw-r--r--src/commands/zrevrank.json48
-rw-r--r--src/commands/zscan.json62
-rw-r--r--src/commands/zscore.json48
-rw-r--r--src/commands/zunion.json85
-rw-r--r--src/commands/zunionstore.json103
388 files changed, 18069 insertions, 0 deletions
diff --git a/src/commands/acl-cat.json b/src/commands/acl-cat.json
new file mode 100644
index 0000000..a132cbc
--- /dev/null
+++ b/src/commands/acl-cat.json
@@ -0,0 +1,24 @@
+{
+ "CAT": {
+ "summary": "List the ACL categories or the commands inside a category",
+ "complexity": "O(1) since the categories and commands are a fixed set.",
+ "group": "server",
+ "since": "6.0.0",
+ "arity": -2,
+ "container": "ACL",
+ "function": "aclCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "categoryname",
+ "type": "string",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/acl-deluser.json b/src/commands/acl-deluser.json
new file mode 100644
index 0000000..3c61557
--- /dev/null
+++ b/src/commands/acl-deluser.json
@@ -0,0 +1,25 @@
+{
+ "DELUSER": {
+ "summary": "Remove the specified ACL users and the associated rules",
+ "complexity": "O(1) amortized time considering the typical user.",
+ "group": "server",
+ "since": "6.0.0",
+ "arity": -3,
+ "container": "ACL",
+ "function": "aclCommand",
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "username",
+ "type": "string",
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/acl-dryrun.json b/src/commands/acl-dryrun.json
new file mode 100644
index 0000000..544858c
--- /dev/null
+++ b/src/commands/acl-dryrun.json
@@ -0,0 +1,35 @@
+{
+ "DRYRUN": {
+ "summary": "Returns whether the user can execute the given command without executing the command.",
+ "complexity": "O(1).",
+ "group": "server",
+ "since": "7.0.0",
+ "arity": -4,
+ "container": "ACL",
+ "function": "aclCommand",
+ "history": [],
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "username",
+ "type": "string"
+ },
+ {
+ "name": "command",
+ "type": "string"
+ },
+ {
+ "name": "arg",
+ "type": "string",
+ "optional": true,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/acl-genpass.json b/src/commands/acl-genpass.json
new file mode 100644
index 0000000..9de0313
--- /dev/null
+++ b/src/commands/acl-genpass.json
@@ -0,0 +1,24 @@
+{
+ "GENPASS": {
+ "summary": "Generate a pseudorandom secure password to use for ACL users",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "6.0.0",
+ "arity": -2,
+ "container": "ACL",
+ "function": "aclCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "bits",
+ "type": "integer",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/acl-getuser.json b/src/commands/acl-getuser.json
new file mode 100644
index 0000000..b87c7f6
--- /dev/null
+++ b/src/commands/acl-getuser.json
@@ -0,0 +1,34 @@
+{
+ "GETUSER": {
+ "summary": "Get the rules for a specific ACL user",
+ "complexity": "O(N). Where N is the number of password, command and pattern rules that the user has.",
+ "group": "server",
+ "since": "6.0.0",
+ "arity": 3,
+ "container": "ACL",
+ "function": "aclCommand",
+ "history": [
+ [
+ "6.2.0",
+ "Added Pub/Sub channel patterns."
+ ],
+ [
+ "7.0.0",
+ "Added selectors and changed the format of key and channel patterns from a list to their rule representation."
+ ]
+ ],
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "username",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/acl-help.json b/src/commands/acl-help.json
new file mode 100644
index 0000000..1cec00a
--- /dev/null
+++ b/src/commands/acl-help.json
@@ -0,0 +1,16 @@
+{
+ "HELP": {
+ "summary": "Show helpful text about the different subcommands",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "6.0.0",
+ "arity": 2,
+ "container": "ACL",
+ "function": "aclCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ]
+ }
+}
diff --git a/src/commands/acl-list.json b/src/commands/acl-list.json
new file mode 100644
index 0000000..f7a740d
--- /dev/null
+++ b/src/commands/acl-list.json
@@ -0,0 +1,18 @@
+{
+ "LIST": {
+ "summary": "List the current ACL rules in ACL config file format",
+ "complexity": "O(N). Where N is the number of configured users.",
+ "group": "server",
+ "since": "6.0.0",
+ "arity": 2,
+ "container": "ACL",
+ "function": "aclCommand",
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ]
+ }
+}
diff --git a/src/commands/acl-load.json b/src/commands/acl-load.json
new file mode 100644
index 0000000..a4f138e
--- /dev/null
+++ b/src/commands/acl-load.json
@@ -0,0 +1,18 @@
+{
+ "LOAD": {
+ "summary": "Reload the ACLs from the configured ACL file",
+ "complexity": "O(N). Where N is the number of configured users.",
+ "group": "server",
+ "since": "6.0.0",
+ "arity": 2,
+ "container": "ACL",
+ "function": "aclCommand",
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ]
+ }
+}
diff --git a/src/commands/acl-log.json b/src/commands/acl-log.json
new file mode 100644
index 0000000..c599685
--- /dev/null
+++ b/src/commands/acl-log.json
@@ -0,0 +1,36 @@
+{
+ "LOG": {
+ "summary": "List latest events denied because of ACLs in place",
+ "complexity": "O(N) with N being the number of entries shown.",
+ "group": "server",
+ "since": "6.0.0",
+ "arity": -2,
+ "container": "ACL",
+ "function": "aclCommand",
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "operation",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "count",
+ "type": "integer"
+ },
+ {
+ "name": "reset",
+ "type": "pure-token",
+ "token": "RESET"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/acl-save.json b/src/commands/acl-save.json
new file mode 100644
index 0000000..0c6ee8a
--- /dev/null
+++ b/src/commands/acl-save.json
@@ -0,0 +1,18 @@
+{
+ "SAVE": {
+ "summary": "Save the current ACL rules in the configured ACL file",
+ "complexity": "O(N). Where N is the number of configured users.",
+ "group": "server",
+ "since": "6.0.0",
+ "arity": 2,
+ "container": "ACL",
+ "function": "aclCommand",
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ]
+ }
+}
diff --git a/src/commands/acl-setuser.json b/src/commands/acl-setuser.json
new file mode 100644
index 0000000..7f1f308
--- /dev/null
+++ b/src/commands/acl-setuser.json
@@ -0,0 +1,40 @@
+{
+ "SETUSER": {
+ "summary": "Modify or create the rules for a specific ACL user",
+ "complexity": "O(N). Where N is the number of rules provided.",
+ "group": "server",
+ "since": "6.0.0",
+ "arity": -3,
+ "container": "ACL",
+ "function": "aclCommand",
+ "history": [
+ [
+ "6.2.0",
+ "Added Pub/Sub channel patterns."
+ ],
+ [
+ "7.0.0",
+ "Added selectors and key based permissions."
+ ]
+ ],
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "username",
+ "type": "string"
+ },
+ {
+ "name": "rule",
+ "type": "string",
+ "optional": true,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/acl-users.json b/src/commands/acl-users.json
new file mode 100644
index 0000000..5d00edb
--- /dev/null
+++ b/src/commands/acl-users.json
@@ -0,0 +1,18 @@
+{
+ "USERS": {
+ "summary": "List the username of all the configured ACL rules",
+ "complexity": "O(N). Where N is the number of configured users.",
+ "group": "server",
+ "since": "6.0.0",
+ "arity": 2,
+ "container": "ACL",
+ "function": "aclCommand",
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ]
+ }
+}
diff --git a/src/commands/acl-whoami.json b/src/commands/acl-whoami.json
new file mode 100644
index 0000000..7c3cc9a
--- /dev/null
+++ b/src/commands/acl-whoami.json
@@ -0,0 +1,17 @@
+{
+ "WHOAMI": {
+ "summary": "Return the name of the user associated to the current connection",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "6.0.0",
+ "arity": 2,
+ "container": "ACL",
+ "function": "aclCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ]
+ }
+}
diff --git a/src/commands/acl.json b/src/commands/acl.json
new file mode 100644
index 0000000..3c9141a
--- /dev/null
+++ b/src/commands/acl.json
@@ -0,0 +1,12 @@
+{
+ "ACL": {
+ "summary": "A container for Access List Control commands ",
+ "complexity": "Depends on subcommand.",
+ "group": "server",
+ "since": "6.0.0",
+ "arity": -2,
+ "command_flags": [
+ "SENTINEL"
+ ]
+ }
+}
diff --git a/src/commands/append.json b/src/commands/append.json
new file mode 100644
index 0000000..77d1705
--- /dev/null
+++ b/src/commands/append.json
@@ -0,0 +1,49 @@
+{
+ "APPEND": {
+ "summary": "Append a value to a key",
+ "complexity": "O(1). The amortized time complexity is O(1) assuming the appended value is small and the already present value is of any size, since the dynamic string library used by Redis will double the free space available on every reallocation.",
+ "group": "string",
+ "since": "2.0.0",
+ "arity": 3,
+ "function": "appendCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "FAST"
+ ],
+ "acl_categories": [
+ "STRING"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "INSERT"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "value",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/asking.json b/src/commands/asking.json
new file mode 100644
index 0000000..a825804
--- /dev/null
+++ b/src/commands/asking.json
@@ -0,0 +1,16 @@
+{
+ "ASKING": {
+ "summary": "Sent by cluster clients after an -ASK redirect",
+ "complexity": "O(1)",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": 1,
+ "function": "askingCommand",
+ "command_flags": [
+ "FAST"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ]
+ }
+}
diff --git a/src/commands/auth.json b/src/commands/auth.json
new file mode 100644
index 0000000..ff5e4b2
--- /dev/null
+++ b/src/commands/auth.json
@@ -0,0 +1,40 @@
+{
+ "AUTH": {
+ "summary": "Authenticate to the server",
+ "complexity": "O(N) where N is the number of passwords defined for the user",
+ "group": "connection",
+ "since": "1.0.0",
+ "arity": -2,
+ "function": "authCommand",
+ "history": [
+ [
+ "6.0.0",
+ "Added ACL style (username and password)."
+ ]
+ ],
+ "command_flags": [
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "FAST",
+ "NO_AUTH",
+ "SENTINEL",
+ "ALLOW_BUSY"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ],
+ "arguments": [
+ {
+ "name": "username",
+ "type": "string",
+ "optional": true,
+ "since": "6.0.0"
+ },
+ {
+ "name": "password",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/bgrewriteaof.json b/src/commands/bgrewriteaof.json
new file mode 100644
index 0000000..27d64dd
--- /dev/null
+++ b/src/commands/bgrewriteaof.json
@@ -0,0 +1,15 @@
+{
+ "BGREWRITEAOF": {
+ "summary": "Asynchronously rewrite the append-only file",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "1.0.0",
+ "arity": 1,
+ "function": "bgrewriteaofCommand",
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "NOSCRIPT"
+ ]
+ }
+}
diff --git a/src/commands/bgsave.json b/src/commands/bgsave.json
new file mode 100644
index 0000000..4b645db
--- /dev/null
+++ b/src/commands/bgsave.json
@@ -0,0 +1,30 @@
+{
+ "BGSAVE": {
+ "summary": "Asynchronously save the dataset to disk",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "1.0.0",
+ "arity": -1,
+ "function": "bgsaveCommand",
+ "history": [
+ [
+ "3.2.2",
+ "Added the `SCHEDULE` option."
+ ]
+ ],
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "NOSCRIPT"
+ ],
+ "arguments": [
+ {
+ "name": "schedule",
+ "token": "SCHEDULE",
+ "type": "pure-token",
+ "optional": true,
+ "since": "3.2.2"
+ }
+ ]
+ }
+}
diff --git a/src/commands/bitcount.json b/src/commands/bitcount.json
new file mode 100644
index 0000000..c852609
--- /dev/null
+++ b/src/commands/bitcount.json
@@ -0,0 +1,82 @@
+{
+ "BITCOUNT": {
+ "summary": "Count set bits in a string",
+ "complexity": "O(N)",
+ "group": "bitmap",
+ "since": "2.6.0",
+ "arity": -2,
+ "function": "bitcountCommand",
+ "history": [
+ [
+ "7.0.0",
+ "Added the `BYTE|BIT` option."
+ ]
+ ],
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "BITMAP"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "index",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "start",
+ "type": "integer"
+ },
+ {
+ "name": "end",
+ "type": "integer"
+ },
+ {
+ "name": "index_unit",
+ "type": "oneof",
+ "optional": true,
+ "since": "7.0.0",
+ "arguments": [
+ {
+ "name": "byte",
+ "type": "pure-token",
+ "token": "BYTE"
+ },
+ {
+ "name": "bit",
+ "type": "pure-token",
+ "token": "BIT"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/bitfield.json b/src/commands/bitfield.json
new file mode 100644
index 0000000..28cc73b
--- /dev/null
+++ b/src/commands/bitfield.json
@@ -0,0 +1,144 @@
+{
+ "BITFIELD": {
+ "summary": "Perform arbitrary bitfield integer operations on strings",
+ "complexity": "O(1) for each subcommand specified",
+ "group": "bitmap",
+ "since": "3.2.0",
+ "arity": -2,
+ "function": "bitfieldCommand",
+ "get_keys_function": "bitfieldGetKeys",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "BITMAP"
+ ],
+ "key_specs": [
+ {
+ "notes": "This command allows both access and modification of the key",
+ "flags": [
+ "RW",
+ "UPDATE",
+ "ACCESS",
+ "VARIABLE_FLAGS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "operation",
+ "type": "oneof",
+ "multiple": true,
+ "optional": true,
+ "arguments": [
+ {
+ "token": "GET",
+ "name": "encoding_offset",
+ "type": "block",
+ "arguments": [
+ {
+ "name": "encoding",
+ "type": "string"
+ },
+ {
+ "name": "offset",
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "name": "write",
+ "type": "block",
+ "arguments": [
+ {
+ "token": "OVERFLOW",
+ "name": "wrap_sat_fail",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "wrap",
+ "type": "pure-token",
+ "token": "WRAP"
+ },
+ {
+ "name": "sat",
+ "type": "pure-token",
+ "token": "SAT"
+ },
+ {
+ "name": "fail",
+ "type": "pure-token",
+ "token": "FAIL"
+ }
+ ]
+ },
+ {
+ "name": "write_operation",
+ "type": "oneof",
+ "arguments": [
+ {
+ "token": "SET",
+ "name": "encoding_offset_value",
+ "type": "block",
+ "arguments": [
+ {
+ "name": "encoding",
+ "type": "string"
+ },
+ {
+ "name": "offset",
+ "type": "integer"
+ },
+ {
+ "name": "value",
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "token": "INCRBY",
+ "name": "encoding_offset_increment",
+ "type": "block",
+ "arguments": [
+ {
+ "name": "encoding",
+ "type": "string"
+ },
+ {
+ "name": "offset",
+ "type": "integer"
+ },
+ {
+ "name": "increment",
+ "type": "integer"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/src/commands/bitfield_ro.json b/src/commands/bitfield_ro.json
new file mode 100644
index 0000000..ea0656a
--- /dev/null
+++ b/src/commands/bitfield_ro.json
@@ -0,0 +1,62 @@
+{
+ "BITFIELD_RO": {
+ "summary": "Perform arbitrary bitfield integer operations on strings. Read-only variant of BITFIELD",
+ "complexity": "O(1) for each subcommand specified",
+ "group": "bitmap",
+ "since": "6.0.0",
+ "arity": -2,
+ "function": "bitfieldroCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "BITMAP"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "token": "GET",
+ "name": "encoding_offset",
+ "type": "block",
+ "optional": true,
+ "multiple": true,
+ "multiple_token": true,
+ "arguments": [
+ {
+ "name": "encoding",
+ "type": "string"
+ },
+ {
+ "name": "offset",
+ "type": "integer"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/bitop.json b/src/commands/bitop.json
new file mode 100644
index 0000000..7cca1f0
--- /dev/null
+++ b/src/commands/bitop.json
@@ -0,0 +1,72 @@
+{
+ "BITOP": {
+ "summary": "Perform bitwise operations between strings",
+ "complexity": "O(N)",
+ "group": "bitmap",
+ "since": "2.6.0",
+ "arity": -4,
+ "function": "bitopCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "BITMAP"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "OW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 3
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -1,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "operation",
+ "type": "string"
+ },
+ {
+ "name": "destkey",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 1,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/bitpos.json b/src/commands/bitpos.json
new file mode 100644
index 0000000..b8d2bf0
--- /dev/null
+++ b/src/commands/bitpos.json
@@ -0,0 +1,93 @@
+{
+ "BITPOS": {
+ "summary": "Find first bit set or clear in a string",
+ "complexity": "O(N)",
+ "group": "bitmap",
+ "since": "2.8.7",
+ "arity": -3,
+ "function": "bitposCommand",
+ "history": [
+ [
+ "7.0.0",
+ "Added the `BYTE|BIT` option."
+ ]
+ ],
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "BITMAP"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "bit",
+ "type": "integer"
+ },
+ {
+ "name": "index",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "start",
+ "type": "integer"
+ },
+ {
+ "name": "end_index",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "end",
+ "type": "integer"
+ },
+ {
+ "name": "index_unit",
+ "type": "oneof",
+ "optional": true,
+ "since": "7.0.0",
+ "arguments": [
+ {
+ "name": "byte",
+ "type": "pure-token",
+ "token": "BYTE"
+ },
+ {
+ "name": "bit",
+ "type": "pure-token",
+ "token": "BIT"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/blmove.json b/src/commands/blmove.json
new file mode 100644
index 0000000..6203614
--- /dev/null
+++ b/src/commands/blmove.json
@@ -0,0 +1,106 @@
+{
+ "BLMOVE": {
+ "summary": "Pop an element from a list, push it to another list and return it; or block until one is available",
+ "complexity": "O(1)",
+ "group": "list",
+ "since": "6.2.0",
+ "arity": 6,
+ "function": "blmoveCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "NOSCRIPT",
+ "BLOCKING"
+ ],
+ "acl_categories": [
+ "LIST"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "RW",
+ "INSERT"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "source",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "destination",
+ "type": "key",
+ "key_spec_index": 1
+ },
+ {
+ "name": "wherefrom",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "left",
+ "type": "pure-token",
+ "token": "LEFT"
+ },
+ {
+ "name": "right",
+ "type": "pure-token",
+ "token": "RIGHT"
+ }
+ ]
+ },
+ {
+ "name": "whereto",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "left",
+ "type": "pure-token",
+ "token": "LEFT"
+ },
+ {
+ "name": "right",
+ "type": "pure-token",
+ "token": "RIGHT"
+ }
+ ]
+ },
+ {
+ "name": "timeout",
+ "type": "double"
+ }
+ ]
+ }
+}
diff --git a/src/commands/blmpop.json b/src/commands/blmpop.json
new file mode 100644
index 0000000..29d381a
--- /dev/null
+++ b/src/commands/blmpop.json
@@ -0,0 +1,77 @@
+{
+ "BLMPOP": {
+ "summary": "Pop elements from a list, or block until one is available",
+ "complexity": "O(N+M) where N is the number of provided keys and M is the number of elements returned.",
+ "group": "list",
+ "since": "7.0.0",
+ "arity": -5,
+ "function": "blmpopCommand",
+ "get_keys_function": "blmpopGetKeys",
+ "command_flags": [
+ "WRITE",
+ "BLOCKING"
+ ],
+ "acl_categories": [
+ "LIST"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "keynum": {
+ "keynumidx": 0,
+ "firstkey": 1,
+ "step": 1
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "timeout",
+ "type": "double"
+ },
+ {
+ "name": "numkeys",
+ "type": "integer"
+ },
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ },
+ {
+ "name": "where",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "left",
+ "type": "pure-token",
+ "token": "LEFT"
+ },
+ {
+ "name": "right",
+ "type": "pure-token",
+ "token": "RIGHT"
+ }
+ ]
+ },
+ {
+ "token": "COUNT",
+ "name": "count",
+ "type": "integer",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/blpop.json b/src/commands/blpop.json
new file mode 100644
index 0000000..6871654
--- /dev/null
+++ b/src/commands/blpop.json
@@ -0,0 +1,57 @@
+{
+ "BLPOP": {
+ "summary": "Remove and get the first element in a list, or block until one is available",
+ "complexity": "O(N) where N is the number of provided keys.",
+ "group": "list",
+ "since": "2.0.0",
+ "arity": -3,
+ "function": "blpopCommand",
+ "history": [
+ [
+ "6.0.0",
+ "`timeout` is interpreted as a double instead of an integer."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "NOSCRIPT",
+ "BLOCKING"
+ ],
+ "acl_categories": [
+ "LIST"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -2,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ },
+ {
+ "name": "timeout",
+ "type": "double"
+ }
+ ]
+ }
+}
diff --git a/src/commands/brpop.json b/src/commands/brpop.json
new file mode 100644
index 0000000..8f65202
--- /dev/null
+++ b/src/commands/brpop.json
@@ -0,0 +1,57 @@
+{
+ "BRPOP": {
+ "summary": "Remove and get the last element in a list, or block until one is available",
+ "complexity": "O(N) where N is the number of provided keys.",
+ "group": "list",
+ "since": "2.0.0",
+ "arity": -3,
+ "function": "brpopCommand",
+ "history": [
+ [
+ "6.0.0",
+ "`timeout` is interpreted as a double instead of an integer."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "NOSCRIPT",
+ "BLOCKING"
+ ],
+ "acl_categories": [
+ "LIST"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -2,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ },
+ {
+ "name": "timeout",
+ "type": "double"
+ }
+ ]
+ }
+}
diff --git a/src/commands/brpoplpush.json b/src/commands/brpoplpush.json
new file mode 100644
index 0000000..7f8d11a
--- /dev/null
+++ b/src/commands/brpoplpush.json
@@ -0,0 +1,85 @@
+{
+ "BRPOPLPUSH": {
+ "summary": "Pop an element from a list, push it to another list and return it; or block until one is available",
+ "complexity": "O(1)",
+ "group": "list",
+ "since": "2.2.0",
+ "arity": 4,
+ "function": "brpoplpushCommand",
+ "history": [
+ [
+ "6.0.0",
+ "`timeout` is interpreted as a double instead of an integer."
+ ]
+ ],
+ "deprecated_since": "6.2.0",
+ "replaced_by": "`BLMOVE` with the `RIGHT` and `LEFT` arguments",
+ "doc_flags": [
+ "DEPRECATED"
+ ],
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "NOSCRIPT",
+ "BLOCKING"
+ ],
+ "acl_categories": [
+ "LIST"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "RW",
+ "INSERT"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "source",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "destination",
+ "type": "key",
+ "key_spec_index": 1
+ },
+ {
+ "name": "timeout",
+ "type": "double"
+ }
+ ]
+ }
+}
diff --git a/src/commands/bzmpop.json b/src/commands/bzmpop.json
new file mode 100644
index 0000000..87a1cd8
--- /dev/null
+++ b/src/commands/bzmpop.json
@@ -0,0 +1,77 @@
+{
+ "BZMPOP": {
+ "summary": "Remove and return members with scores in a sorted set or block until one is available",
+ "complexity": "O(K) + O(M*log(N)) where K is the number of provided keys, N being the number of elements in the sorted set, and M being the number of elements popped.",
+ "group": "sorted_set",
+ "since": "7.0.0",
+ "arity": -5,
+ "function": "bzmpopCommand",
+ "get_keys_function": "blmpopGetKeys",
+ "command_flags": [
+ "WRITE",
+ "BLOCKING"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "keynum": {
+ "keynumidx": 0,
+ "firstkey": 1,
+ "step": 1
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "timeout",
+ "type": "double"
+ },
+ {
+ "name": "numkeys",
+ "type": "integer"
+ },
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ },
+ {
+ "name": "where",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "min",
+ "type": "pure-token",
+ "token": "MIN"
+ },
+ {
+ "name": "max",
+ "type": "pure-token",
+ "token": "MAX"
+ }
+ ]
+ },
+ {
+ "token": "COUNT",
+ "name": "count",
+ "type": "integer",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/bzpopmax.json b/src/commands/bzpopmax.json
new file mode 100644
index 0000000..5ca53aa
--- /dev/null
+++ b/src/commands/bzpopmax.json
@@ -0,0 +1,58 @@
+{
+ "BZPOPMAX": {
+ "summary": "Remove and return the member with the highest score from one or more sorted sets, or block until one is available",
+ "complexity": "O(log(N)) with N being the number of elements in the sorted set.",
+ "group": "sorted_set",
+ "since": "5.0.0",
+ "arity": -3,
+ "function": "bzpopmaxCommand",
+ "history": [
+ [
+ "6.0.0",
+ "`timeout` is interpreted as a double instead of an integer."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "NOSCRIPT",
+ "FAST",
+ "BLOCKING"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -2,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ },
+ {
+ "name": "timeout",
+ "type": "double"
+ }
+ ]
+ }
+}
diff --git a/src/commands/bzpopmin.json b/src/commands/bzpopmin.json
new file mode 100644
index 0000000..742a231
--- /dev/null
+++ b/src/commands/bzpopmin.json
@@ -0,0 +1,58 @@
+{
+ "BZPOPMIN": {
+ "summary": "Remove and return the member with the lowest score from one or more sorted sets, or block until one is available",
+ "complexity": "O(log(N)) with N being the number of elements in the sorted set.",
+ "group": "sorted_set",
+ "since": "5.0.0",
+ "arity": -3,
+ "function": "bzpopminCommand",
+ "history": [
+ [
+ "6.0.0",
+ "`timeout` is interpreted as a double instead of an integer."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "NOSCRIPT",
+ "FAST",
+ "BLOCKING"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -2,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ },
+ {
+ "name": "timeout",
+ "type": "double"
+ }
+ ]
+ }
+}
diff --git a/src/commands/client-caching.json b/src/commands/client-caching.json
new file mode 100644
index 0000000..b8beaa8
--- /dev/null
+++ b/src/commands/client-caching.json
@@ -0,0 +1,38 @@
+{
+ "CACHING": {
+ "summary": "Instruct the server about tracking or not keys in the next request",
+ "complexity": "O(1)",
+ "group": "connection",
+ "since": "6.0.0",
+ "arity": 3,
+ "container": "CLIENT",
+ "function": "clientCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ],
+ "arguments": [
+ {
+ "name": "mode",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "yes",
+ "type": "pure-token",
+ "token": "YES"
+ },
+ {
+ "name": "no",
+ "type": "pure-token",
+ "token": "NO"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/client-getname.json b/src/commands/client-getname.json
new file mode 100644
index 0000000..515e0ed
--- /dev/null
+++ b/src/commands/client-getname.json
@@ -0,0 +1,20 @@
+{
+ "GETNAME": {
+ "summary": "Get the current connection name",
+ "complexity": "O(1)",
+ "group": "connection",
+ "since": "2.6.9",
+ "arity": 2,
+ "container": "CLIENT",
+ "function": "clientCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ]
+ }
+}
diff --git a/src/commands/client-getredir.json b/src/commands/client-getredir.json
new file mode 100644
index 0000000..8d5b239
--- /dev/null
+++ b/src/commands/client-getredir.json
@@ -0,0 +1,20 @@
+{
+ "GETREDIR": {
+ "summary": "Get tracking notifications redirection client ID if any",
+ "complexity": "O(1)",
+ "group": "connection",
+ "since": "6.0.0",
+ "arity": 2,
+ "container": "CLIENT",
+ "function": "clientCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ]
+ }
+}
diff --git a/src/commands/client-help.json b/src/commands/client-help.json
new file mode 100644
index 0000000..fee49f9
--- /dev/null
+++ b/src/commands/client-help.json
@@ -0,0 +1,19 @@
+{
+ "HELP": {
+ "summary": "Show helpful text about the different subcommands",
+ "complexity": "O(1)",
+ "group": "connection",
+ "since": "5.0.0",
+ "arity": 2,
+ "container": "CLIENT",
+ "function": "clientCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ]
+ }
+}
diff --git a/src/commands/client-id.json b/src/commands/client-id.json
new file mode 100644
index 0000000..792da7d
--- /dev/null
+++ b/src/commands/client-id.json
@@ -0,0 +1,20 @@
+{
+ "ID": {
+ "summary": "Returns the client ID for the current connection",
+ "complexity": "O(1)",
+ "group": "connection",
+ "since": "5.0.0",
+ "arity": 2,
+ "container": "CLIENT",
+ "function": "clientCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ]
+ }
+}
diff --git a/src/commands/client-info.json b/src/commands/client-info.json
new file mode 100644
index 0000000..06fa094
--- /dev/null
+++ b/src/commands/client-info.json
@@ -0,0 +1,23 @@
+{
+ "INFO": {
+ "summary": "Returns information about the current client connection.",
+ "complexity": "O(1)",
+ "group": "connection",
+ "since": "6.2.0",
+ "arity": 2,
+ "container": "CLIENT",
+ "function": "clientCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ]
+ }
+}
diff --git a/src/commands/client-kill.json b/src/commands/client-kill.json
new file mode 100644
index 0000000..6303c74
--- /dev/null
+++ b/src/commands/client-kill.json
@@ -0,0 +1,131 @@
+{
+ "KILL": {
+ "summary": "Kill the connection of a client",
+ "complexity": "O(N) where N is the number of client connections",
+ "group": "connection",
+ "since": "2.4.0",
+ "arity": -3,
+ "container": "CLIENT",
+ "function": "clientCommand",
+ "history": [
+ [
+ "2.8.12",
+ "Added new filter format."
+ ],
+ [
+ "2.8.12",
+ "`ID` option."
+ ],
+ [
+ "3.2.0",
+ "Added `master` type in for `TYPE` option."
+ ],
+ [
+ "5.0.0",
+ "Replaced `slave` `TYPE` with `replica`. `slave` still supported for backward compatibility."
+ ],
+ [
+ "6.2.0",
+ "`LADDR` option."
+ ]
+ ],
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ],
+ "arguments": [
+ {
+ "name": "filter",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "ip:port",
+ "type": "string",
+ "deprecated_since": "2.8.12"
+ },
+ {
+ "name": "new-format",
+ "type": "oneof",
+ "multiple": true,
+ "arguments": [
+ {
+ "token": "ID",
+ "name": "client-id",
+ "type": "integer",
+ "optional": true,
+ "since": "2.8.12"
+ },
+ {
+ "token": "TYPE",
+ "name": "normal_master_slave_pubsub",
+ "type": "oneof",
+ "optional": true,
+ "since": "2.8.12",
+ "arguments": [
+ {
+ "name": "normal",
+ "type": "pure-token",
+ "token": "normal"
+ },
+ {
+ "name": "master",
+ "type": "pure-token",
+ "token": "master",
+ "since": "3.2.0"
+ },
+ {
+ "name": "slave",
+ "type": "pure-token",
+ "token": "slave"
+ },
+ {
+ "name": "replica",
+ "type": "pure-token",
+ "token": "replica",
+ "since": "5.0.0"
+ },
+ {
+ "name": "pubsub",
+ "type": "pure-token",
+ "token": "pubsub"
+ }
+ ]
+ },
+ {
+ "token": "USER",
+ "name": "username",
+ "type": "string",
+ "optional": true
+ },
+ {
+ "token": "ADDR",
+ "name": "ip:port",
+ "type": "string",
+ "optional": true
+ },
+ {
+ "token": "LADDR",
+ "name": "ip:port",
+ "type": "string",
+ "optional": true,
+ "since": "6.2.0"
+ },
+ {
+ "token": "SKIPME",
+ "name": "yes/no",
+ "type": "string",
+ "optional": true
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/client-list.json b/src/commands/client-list.json
new file mode 100644
index 0000000..3cff10a
--- /dev/null
+++ b/src/commands/client-list.json
@@ -0,0 +1,95 @@
+{
+ "LIST": {
+ "summary": "Get the list of client connections",
+ "complexity": "O(N) where N is the number of client connections",
+ "group": "connection",
+ "since": "2.4.0",
+ "arity": -2,
+ "container": "CLIENT",
+ "function": "clientCommand",
+ "history": [
+ [
+ "2.8.12",
+ "Added unique client `id` field."
+ ],
+ [
+ "5.0.0",
+ "Added optional `TYPE` filter."
+ ],
+ [
+ "6.0.0",
+ "Added `user` field."
+ ],
+ [
+ "6.2.0",
+ "Added `argv-mem`, `tot-mem`, `laddr` and `redir` fields and the optional `ID` filter."
+ ],
+ [
+ "7.0.0",
+ "Added `resp`, `multi-mem`, `rbs` and `rbp` fields."
+ ],
+ [
+ "7.0.3",
+ "Added `ssub` field."
+ ]
+ ],
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "arguments": [
+ {
+ "token": "TYPE",
+ "name": "normal_master_replica_pubsub",
+ "type": "oneof",
+ "optional": true,
+ "since": "5.0.0",
+ "arguments": [
+ {
+ "name": "normal",
+ "type": "pure-token",
+ "token": "normal"
+ },
+ {
+ "name": "master",
+ "type": "pure-token",
+ "token": "master"
+ },
+ {
+ "name": "replica",
+ "type": "pure-token",
+ "token": "replica"
+ },
+ {
+ "name": "pubsub",
+ "type": "pure-token",
+ "token": "pubsub"
+ }
+ ]
+ },
+ {
+ "name": "id",
+ "token": "ID",
+ "type": "block",
+ "optional": true,
+ "since": "6.2.0",
+ "arguments": [
+ {
+ "name": "client-id",
+ "type": "integer",
+ "multiple": true
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/client-no-evict.json b/src/commands/client-no-evict.json
new file mode 100644
index 0000000..fc0ad71
--- /dev/null
+++ b/src/commands/client-no-evict.json
@@ -0,0 +1,39 @@
+{
+ "NO-EVICT": {
+ "summary": "Set client eviction mode for the current connection",
+ "complexity": "O(1)",
+ "group": "connection",
+ "since": "7.0.0",
+ "arity": 3,
+ "container": "CLIENT",
+ "function": "clientCommand",
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ],
+ "arguments": [
+ {
+ "name": "enabled",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "on",
+ "type": "pure-token",
+ "token": "ON"
+ },
+ {
+ "name": "off",
+ "type": "pure-token",
+ "token": "OFF"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/client-pause.json b/src/commands/client-pause.json
new file mode 100644
index 0000000..90b7e3b
--- /dev/null
+++ b/src/commands/client-pause.json
@@ -0,0 +1,51 @@
+{
+ "PAUSE": {
+ "summary": "Stop processing commands from clients for some time",
+ "complexity": "O(1)",
+ "group": "connection",
+ "since": "2.9.50",
+ "arity": -3,
+ "container": "CLIENT",
+ "function": "clientCommand",
+ "history": [
+ [
+ "6.2.0",
+ "`CLIENT PAUSE WRITE` mode added along with the `mode` option."
+ ]
+ ],
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ],
+ "arguments": [
+ {
+ "name": "timeout",
+ "type": "integer"
+ },
+ {
+ "name": "mode",
+ "type": "oneof",
+ "optional": true,
+ "since": "6.2.0",
+ "arguments": [
+ {
+ "name": "write",
+ "type": "pure-token",
+ "token": "WRITE"
+ },
+ {
+ "name": "all",
+ "type": "pure-token",
+ "token": "ALL"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/client-reply.json b/src/commands/client-reply.json
new file mode 100644
index 0000000..25d2cef
--- /dev/null
+++ b/src/commands/client-reply.json
@@ -0,0 +1,43 @@
+{
+ "REPLY": {
+ "summary": "Instruct the server whether to reply to commands",
+ "complexity": "O(1)",
+ "group": "connection",
+ "since": "3.2.0",
+ "arity": 3,
+ "container": "CLIENT",
+ "function": "clientCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ],
+ "arguments": [
+ {
+ "name": "on_off_skip",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "on",
+ "type": "pure-token",
+ "token": "ON"
+ },
+ {
+ "name": "off",
+ "type": "pure-token",
+ "token": "OFF"
+ },
+ {
+ "name": "skip",
+ "type": "pure-token",
+ "token": "SKIP"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/client-setname.json b/src/commands/client-setname.json
new file mode 100644
index 0000000..cc9199f
--- /dev/null
+++ b/src/commands/client-setname.json
@@ -0,0 +1,26 @@
+{
+ "SETNAME": {
+ "summary": "Set the current connection name",
+ "complexity": "O(1)",
+ "group": "connection",
+ "since": "2.6.9",
+ "arity": 3,
+ "container": "CLIENT",
+ "function": "clientCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ],
+ "arguments": [
+ {
+ "name": "connection-name",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/client-tracking.json b/src/commands/client-tracking.json
new file mode 100644
index 0000000..40811f1
--- /dev/null
+++ b/src/commands/client-tracking.json
@@ -0,0 +1,76 @@
+{
+ "TRACKING": {
+ "summary": "Enable or disable server assisted client side caching support",
+ "complexity": "O(1). Some options may introduce additional complexity.",
+ "group": "connection",
+ "since": "6.0.0",
+ "arity": -3,
+ "container": "CLIENT",
+ "function": "clientCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ],
+ "arguments": [
+ {
+ "name": "status",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "on",
+ "type": "pure-token",
+ "token": "ON"
+ },
+ {
+ "name": "off",
+ "type": "pure-token",
+ "token": "OFF"
+ }
+ ]
+ },
+ {
+ "token": "REDIRECT",
+ "name": "client-id",
+ "type": "integer",
+ "optional": true
+ },
+ {
+ "token": "PREFIX",
+ "name": "prefix",
+ "type": "string",
+ "optional": true,
+ "multiple": true,
+ "multiple_token": true
+ },
+ {
+ "name": "BCAST",
+ "token": "BCAST",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "name": "OPTIN",
+ "token": "OPTIN",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "name": "OPTOUT",
+ "token": "OPTOUT",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "name": "NOLOOP",
+ "token": "NOLOOP",
+ "type": "pure-token",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/client-trackinginfo.json b/src/commands/client-trackinginfo.json
new file mode 100644
index 0000000..124c442
--- /dev/null
+++ b/src/commands/client-trackinginfo.json
@@ -0,0 +1,20 @@
+{
+ "TRACKINGINFO": {
+ "summary": "Return information about server assisted client side caching for the current connection",
+ "complexity": "O(1)",
+ "group": "connection",
+ "since": "6.2.0",
+ "arity": 2,
+ "container": "CLIENT",
+ "function": "clientCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ]
+ }
+}
diff --git a/src/commands/client-unblock.json b/src/commands/client-unblock.json
new file mode 100644
index 0000000..75bdddc
--- /dev/null
+++ b/src/commands/client-unblock.json
@@ -0,0 +1,44 @@
+{
+ "UNBLOCK": {
+ "summary": "Unblock a client blocked in a blocking command from a different connection",
+ "complexity": "O(log N) where N is the number of client connections",
+ "group": "connection",
+ "since": "5.0.0",
+ "arity": -3,
+ "container": "CLIENT",
+ "function": "clientCommand",
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ],
+ "arguments": [
+ {
+ "name": "client-id",
+ "type": "integer"
+ },
+ {
+ "name": "timeout_error",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "timeout",
+ "type": "pure-token",
+ "token": "TIMEOUT"
+ },
+ {
+ "name": "error",
+ "type": "pure-token",
+ "token": "ERROR"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/client-unpause.json b/src/commands/client-unpause.json
new file mode 100644
index 0000000..661baa0
--- /dev/null
+++ b/src/commands/client-unpause.json
@@ -0,0 +1,21 @@
+{
+ "UNPAUSE": {
+ "summary": "Resume processing of clients that were paused",
+ "complexity": "O(N) Where N is the number of paused clients",
+ "group": "connection",
+ "since": "6.2.0",
+ "arity": 2,
+ "container": "CLIENT",
+ "function": "clientCommand",
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ]
+ }
+}
diff --git a/src/commands/client.json b/src/commands/client.json
new file mode 100644
index 0000000..dfe2a9b
--- /dev/null
+++ b/src/commands/client.json
@@ -0,0 +1,12 @@
+{
+ "CLIENT": {
+ "summary": "A container for client connection commands",
+ "complexity": "Depends on subcommand.",
+ "group": "connection",
+ "since": "2.4.0",
+ "arity": -2,
+ "command_flags": [
+ "SENTINEL"
+ ]
+ }
+}
diff --git a/src/commands/cluster-addslots.json b/src/commands/cluster-addslots.json
new file mode 100644
index 0000000..0a2d0a8
--- /dev/null
+++ b/src/commands/cluster-addslots.json
@@ -0,0 +1,23 @@
+{
+ "ADDSLOTS": {
+ "summary": "Assign new hash slots to receiving node",
+ "complexity": "O(N) where N is the total number of hash slot arguments",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": -3,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "STALE"
+ ],
+ "arguments": [
+ {
+ "name": "slot",
+ "type": "integer",
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/cluster-addslotsrange.json b/src/commands/cluster-addslotsrange.json
new file mode 100644
index 0000000..756a0a6
--- /dev/null
+++ b/src/commands/cluster-addslotsrange.json
@@ -0,0 +1,33 @@
+{
+ "ADDSLOTSRANGE": {
+ "summary": "Assign new hash slots to receiving node",
+ "complexity": "O(N) where N is the total number of the slots between the start slot and end slot arguments.",
+ "group": "cluster",
+ "since": "7.0.0",
+ "arity": -4,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "STALE"
+ ],
+ "arguments": [
+ {
+ "name": "start-slot_end-slot",
+ "type": "block",
+ "multiple": true,
+ "arguments": [
+ {
+ "name": "start-slot",
+ "type": "integer"
+ },
+ {
+ "name": "end-slot",
+ "type": "integer"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/cluster-bumpepoch.json b/src/commands/cluster-bumpepoch.json
new file mode 100644
index 0000000..66dc28f
--- /dev/null
+++ b/src/commands/cluster-bumpepoch.json
@@ -0,0 +1,19 @@
+{
+ "BUMPEPOCH": {
+ "summary": "Advance the cluster config epoch",
+ "complexity": "O(1)",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": 2,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "STALE"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ]
+ }
+}
diff --git a/src/commands/cluster-count-failure-reports.json b/src/commands/cluster-count-failure-reports.json
new file mode 100644
index 0000000..bf25bc2
--- /dev/null
+++ b/src/commands/cluster-count-failure-reports.json
@@ -0,0 +1,24 @@
+{
+ "COUNT-FAILURE-REPORTS": {
+ "summary": "Return the number of failure reports active for a given node",
+ "complexity": "O(N) where N is the number of failure reports",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": 3,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "ADMIN",
+ "STALE"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "arguments": [
+ {
+ "name": "node-id",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/cluster-countkeysinslot.json b/src/commands/cluster-countkeysinslot.json
new file mode 100644
index 0000000..eefae6e
--- /dev/null
+++ b/src/commands/cluster-countkeysinslot.json
@@ -0,0 +1,20 @@
+{
+ "COUNTKEYSINSLOT": {
+ "summary": "Return the number of local keys in the specified hash slot",
+ "complexity": "O(1)",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": 3,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "STALE"
+ ],
+ "arguments": [
+ {
+ "name": "slot",
+ "type": "integer"
+ }
+ ]
+ }
+}
diff --git a/src/commands/cluster-delslots.json b/src/commands/cluster-delslots.json
new file mode 100644
index 0000000..89c147b
--- /dev/null
+++ b/src/commands/cluster-delslots.json
@@ -0,0 +1,23 @@
+{
+ "DELSLOTS": {
+ "summary": "Set hash slots as unbound in receiving node",
+ "complexity": "O(N) where N is the total number of hash slot arguments",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": -3,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "STALE"
+ ],
+ "arguments": [
+ {
+ "name": "slot",
+ "type": "integer",
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/cluster-delslotsrange.json b/src/commands/cluster-delslotsrange.json
new file mode 100644
index 0000000..96776d1
--- /dev/null
+++ b/src/commands/cluster-delslotsrange.json
@@ -0,0 +1,33 @@
+{
+ "DELSLOTSRANGE": {
+ "summary": "Set hash slots as unbound in receiving node",
+ "complexity": "O(N) where N is the total number of the slots between the start slot and end slot arguments.",
+ "group": "cluster",
+ "since": "7.0.0",
+ "arity": -4,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "STALE"
+ ],
+ "arguments": [
+ {
+ "name": "start-slot_end-slot",
+ "type": "block",
+ "multiple": true,
+ "arguments": [
+ {
+ "name": "start-slot",
+ "type": "integer"
+ },
+ {
+ "name": "end-slot",
+ "type": "integer"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/cluster-failover.json b/src/commands/cluster-failover.json
new file mode 100644
index 0000000..e7daf24
--- /dev/null
+++ b/src/commands/cluster-failover.json
@@ -0,0 +1,35 @@
+{
+ "FAILOVER": {
+ "summary": "Forces a replica to perform a manual failover of its master.",
+ "complexity": "O(1)",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": -2,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "STALE"
+ ],
+ "arguments": [
+ {
+ "name": "options",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "force",
+ "type": "pure-token",
+ "token": "FORCE"
+ },
+ {
+ "name": "takeover",
+ "type": "pure-token",
+ "token": "TAKEOVER"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/cluster-flushslots.json b/src/commands/cluster-flushslots.json
new file mode 100644
index 0000000..214aa39
--- /dev/null
+++ b/src/commands/cluster-flushslots.json
@@ -0,0 +1,16 @@
+{
+ "FLUSHSLOTS": {
+ "summary": "Delete a node's own slots information",
+ "complexity": "O(1)",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": 2,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "STALE"
+ ]
+ }
+}
diff --git a/src/commands/cluster-forget.json b/src/commands/cluster-forget.json
new file mode 100644
index 0000000..6668eab
--- /dev/null
+++ b/src/commands/cluster-forget.json
@@ -0,0 +1,22 @@
+{
+ "FORGET": {
+ "summary": "Remove a node from the nodes table",
+ "complexity": "O(1)",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": 3,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "STALE"
+ ],
+ "arguments": [
+ {
+ "name": "node-id",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/cluster-getkeysinslot.json b/src/commands/cluster-getkeysinslot.json
new file mode 100644
index 0000000..97c3a3b
--- /dev/null
+++ b/src/commands/cluster-getkeysinslot.json
@@ -0,0 +1,27 @@
+{
+ "GETKEYSINSLOT": {
+ "summary": "Return local key names in the specified hash slot",
+ "complexity": "O(log(N)) where N is the number of requested keys",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": 4,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "STALE"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "arguments": [
+ {
+ "name": "slot",
+ "type": "integer"
+ },
+ {
+ "name": "count",
+ "type": "integer"
+ }
+ ]
+ }
+}
diff --git a/src/commands/cluster-help.json b/src/commands/cluster-help.json
new file mode 100644
index 0000000..d0ddf11
--- /dev/null
+++ b/src/commands/cluster-help.json
@@ -0,0 +1,15 @@
+{
+ "HELP": {
+ "summary": "Show helpful text about the different subcommands",
+ "complexity": "O(1)",
+ "group": "cluster",
+ "since": "5.0.0",
+ "arity": 2,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE"
+ ]
+ }
+}
diff --git a/src/commands/cluster-info.json b/src/commands/cluster-info.json
new file mode 100644
index 0000000..08250f1
--- /dev/null
+++ b/src/commands/cluster-info.json
@@ -0,0 +1,17 @@
+{
+ "INFO": {
+ "summary": "Provides info about Redis Cluster node state",
+ "complexity": "O(1)",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": 2,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "STALE"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ]
+ }
+}
diff --git a/src/commands/cluster-keyslot.json b/src/commands/cluster-keyslot.json
new file mode 100644
index 0000000..1064547
--- /dev/null
+++ b/src/commands/cluster-keyslot.json
@@ -0,0 +1,20 @@
+{
+ "KEYSLOT": {
+ "summary": "Returns the hash slot of the specified key",
+ "complexity": "O(N) where N is the number of bytes in the key",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": 3,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "STALE"
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/cluster-links.json b/src/commands/cluster-links.json
new file mode 100644
index 0000000..4d50247
--- /dev/null
+++ b/src/commands/cluster-links.json
@@ -0,0 +1,17 @@
+{
+ "LINKS": {
+ "summary": "Returns a list of all TCP links to and from peer nodes in cluster",
+ "complexity": "O(N) where N is the total number of Cluster nodes",
+ "group": "cluster",
+ "since": "7.0.0",
+ "arity": 2,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "STALE"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ]
+ }
+}
diff --git a/src/commands/cluster-meet.json b/src/commands/cluster-meet.json
new file mode 100644
index 0000000..d79ece2
--- /dev/null
+++ b/src/commands/cluster-meet.json
@@ -0,0 +1,38 @@
+{
+ "MEET": {
+ "summary": "Force a node cluster to handshake with another node",
+ "complexity": "O(1)",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": -4,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "history": [
+ [
+ "4.0.0",
+ "Added the optional `cluster_bus_port` argument."
+ ]
+ ],
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "STALE"
+ ],
+ "arguments": [
+ {
+ "name": "ip",
+ "type": "string"
+ },
+ {
+ "name": "port",
+ "type": "integer"
+ },
+ {
+ "name": "cluster_bus_port",
+ "type": "integer",
+ "optional": true,
+ "since": "4.0.0"
+ }
+ ]
+ }
+}
diff --git a/src/commands/cluster-myid.json b/src/commands/cluster-myid.json
new file mode 100644
index 0000000..dc4f8a7
--- /dev/null
+++ b/src/commands/cluster-myid.json
@@ -0,0 +1,14 @@
+{
+ "MYID": {
+ "summary": "Return the node id",
+ "complexity": "O(1)",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": 2,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "STALE"
+ ]
+ }
+}
diff --git a/src/commands/cluster-nodes.json b/src/commands/cluster-nodes.json
new file mode 100644
index 0000000..9452139
--- /dev/null
+++ b/src/commands/cluster-nodes.json
@@ -0,0 +1,17 @@
+{
+ "NODES": {
+ "summary": "Get Cluster config for the node",
+ "complexity": "O(N) where N is the total number of Cluster nodes",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": 2,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "STALE"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ]
+ }
+}
diff --git a/src/commands/cluster-replicas.json b/src/commands/cluster-replicas.json
new file mode 100644
index 0000000..e86322b
--- /dev/null
+++ b/src/commands/cluster-replicas.json
@@ -0,0 +1,24 @@
+{
+ "REPLICAS": {
+ "summary": "List replica nodes of the specified master node",
+ "complexity": "O(1)",
+ "group": "cluster",
+ "since": "5.0.0",
+ "arity": 3,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "ADMIN",
+ "STALE"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "arguments": [
+ {
+ "name": "node-id",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/cluster-replicate.json b/src/commands/cluster-replicate.json
new file mode 100644
index 0000000..beda5e7
--- /dev/null
+++ b/src/commands/cluster-replicate.json
@@ -0,0 +1,22 @@
+{
+ "REPLICATE": {
+ "summary": "Reconfigure a node as a replica of the specified master node",
+ "complexity": "O(1)",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": 3,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "STALE"
+ ],
+ "arguments": [
+ {
+ "name": "node-id",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/cluster-reset.json b/src/commands/cluster-reset.json
new file mode 100644
index 0000000..c7711e9
--- /dev/null
+++ b/src/commands/cluster-reset.json
@@ -0,0 +1,35 @@
+{
+ "RESET": {
+ "summary": "Reset a Redis Cluster node",
+ "complexity": "O(N) where N is the number of known nodes. The command may execute a FLUSHALL as a side effect.",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": -2,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "ADMIN",
+ "STALE",
+ "NOSCRIPT"
+ ],
+ "arguments": [
+ {
+ "name": "hard_soft",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "hard",
+ "type": "pure-token",
+ "token": "HARD"
+ },
+ {
+ "name": "soft",
+ "type": "pure-token",
+ "token": "SOFT"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/cluster-saveconfig.json b/src/commands/cluster-saveconfig.json
new file mode 100644
index 0000000..991286d
--- /dev/null
+++ b/src/commands/cluster-saveconfig.json
@@ -0,0 +1,16 @@
+{
+ "SAVECONFIG": {
+ "summary": "Forces the node to save cluster state on disk",
+ "complexity": "O(1)",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": 2,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "STALE"
+ ]
+ }
+}
diff --git a/src/commands/cluster-set-config-epoch.json b/src/commands/cluster-set-config-epoch.json
new file mode 100644
index 0000000..5f07f63
--- /dev/null
+++ b/src/commands/cluster-set-config-epoch.json
@@ -0,0 +1,22 @@
+{
+ "SET-CONFIG-EPOCH": {
+ "summary": "Set the configuration epoch in a new node",
+ "complexity": "O(1)",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": 3,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "STALE"
+ ],
+ "arguments": [
+ {
+ "name": "config-epoch",
+ "type": "integer"
+ }
+ ]
+ }
+}
diff --git a/src/commands/cluster-setslot.json b/src/commands/cluster-setslot.json
new file mode 100644
index 0000000..ad0e9b5
--- /dev/null
+++ b/src/commands/cluster-setslot.json
@@ -0,0 +1,48 @@
+{
+ "SETSLOT": {
+ "summary": "Bind a hash slot to a specific node",
+ "complexity": "O(1)",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": -4,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "STALE"
+ ],
+ "arguments": [
+ {
+ "name": "slot",
+ "type": "integer"
+ },
+ {
+ "name": "subcommand",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "node-id",
+ "type": "string",
+ "token": "IMPORTING"
+ },
+ {
+ "name": "node-id",
+ "type": "string",
+ "token": "MIGRATING"
+ },
+ {
+ "name": "node-id",
+ "type": "string",
+ "token": "NODE"
+ },
+ {
+ "name": "stable",
+ "type": "pure-token",
+ "token": "STABLE"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/cluster-shards.json b/src/commands/cluster-shards.json
new file mode 100644
index 0000000..925ce8b
--- /dev/null
+++ b/src/commands/cluster-shards.json
@@ -0,0 +1,18 @@
+{
+ "SHARDS": {
+ "summary": "Get array of cluster slots to node mappings",
+ "complexity": "O(N) where N is the total number of cluster nodes",
+ "group": "cluster",
+ "since": "7.0.0",
+ "arity": 2,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "history": [],
+ "command_flags": [
+ "STALE"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ]
+ }
+}
diff --git a/src/commands/cluster-slaves.json b/src/commands/cluster-slaves.json
new file mode 100644
index 0000000..0ea77a8
--- /dev/null
+++ b/src/commands/cluster-slaves.json
@@ -0,0 +1,29 @@
+{
+ "SLAVES": {
+ "summary": "List replica nodes of the specified master node",
+ "complexity": "O(1)",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": 3,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "deprecated_since": "5.0.0",
+ "replaced_by": "`CLUSTER REPLICAS`",
+ "doc_flags": [
+ "DEPRECATED"
+ ],
+ "command_flags": [
+ "ADMIN",
+ "STALE"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "arguments": [
+ {
+ "name": "node-id",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/cluster-slots.json b/src/commands/cluster-slots.json
new file mode 100644
index 0000000..e878242
--- /dev/null
+++ b/src/commands/cluster-slots.json
@@ -0,0 +1,32 @@
+{
+ "SLOTS": {
+ "summary": "Get array of Cluster slot to node mappings",
+ "complexity": "O(N) where N is the total number of Cluster nodes",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": 2,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "deprecated_since": "7.0.0",
+ "replaced_by": "`CLUSTER SHARDS`",
+ "doc_flags": [
+ "DEPRECATED"
+ ],
+ "history": [
+ [
+ "4.0.0",
+ "Added node IDs."
+ ],
+ [
+ "7.0.0",
+ "Added additional networking metadata field."
+ ]
+ ],
+ "command_flags": [
+ "STALE"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ]
+ }
+}
diff --git a/src/commands/cluster.json b/src/commands/cluster.json
new file mode 100644
index 0000000..732a829
--- /dev/null
+++ b/src/commands/cluster.json
@@ -0,0 +1,9 @@
+{
+ "CLUSTER": {
+ "summary": "A container for cluster commands",
+ "complexity": "Depends on subcommand.",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": -2
+ }
+}
diff --git a/src/commands/command-count.json b/src/commands/command-count.json
new file mode 100644
index 0000000..f2081ca
--- /dev/null
+++ b/src/commands/command-count.json
@@ -0,0 +1,19 @@
+{
+ "COUNT": {
+ "summary": "Get total number of Redis commands",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "2.8.13",
+ "arity": 2,
+ "container": "COMMAND",
+ "function": "commandCountCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ]
+ }
+}
diff --git a/src/commands/command-docs.json b/src/commands/command-docs.json
new file mode 100644
index 0000000..7dc81d6
--- /dev/null
+++ b/src/commands/command-docs.json
@@ -0,0 +1,30 @@
+{
+ "DOCS": {
+ "summary": "Get array of specific Redis command documentation",
+ "complexity": "O(N) where N is the number of commands to look up",
+ "group": "server",
+ "since": "7.0.0",
+ "arity": -2,
+ "container": "COMMAND",
+ "function": "commandDocsCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT_ORDER"
+ ],
+ "arguments": [
+ {
+ "name": "command-name",
+ "type": "string",
+ "optional": true,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/command-getkeys.json b/src/commands/command-getkeys.json
new file mode 100644
index 0000000..7447261
--- /dev/null
+++ b/src/commands/command-getkeys.json
@@ -0,0 +1,19 @@
+{
+ "GETKEYS": {
+ "summary": "Extract keys given a full Redis command",
+ "complexity": "O(N) where N is the number of arguments to the command",
+ "group": "server",
+ "since": "2.8.13",
+ "arity": -4,
+ "container": "COMMAND",
+ "function": "commandGetKeysCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ]
+ }
+}
diff --git a/src/commands/command-getkeysandflags.json b/src/commands/command-getkeysandflags.json
new file mode 100644
index 0000000..6410835
--- /dev/null
+++ b/src/commands/command-getkeysandflags.json
@@ -0,0 +1,19 @@
+{
+ "GETKEYSANDFLAGS": {
+ "summary": "Extract keys and access flags given a full Redis command",
+ "complexity": "O(N) where N is the number of arguments to the command",
+ "group": "server",
+ "since": "7.0.0",
+ "arity": -4,
+ "container": "COMMAND",
+ "function": "commandGetKeysAndFlagsCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ]
+ }
+}
diff --git a/src/commands/command-help.json b/src/commands/command-help.json
new file mode 100644
index 0000000..d5ad719
--- /dev/null
+++ b/src/commands/command-help.json
@@ -0,0 +1,19 @@
+{
+ "HELP": {
+ "summary": "Show helpful text about the different subcommands",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "5.0.0",
+ "arity": 2,
+ "container": "COMMAND",
+ "function": "commandHelpCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ]
+ }
+}
diff --git a/src/commands/command-info.json b/src/commands/command-info.json
new file mode 100644
index 0000000..52ab400
--- /dev/null
+++ b/src/commands/command-info.json
@@ -0,0 +1,36 @@
+{
+ "INFO": {
+ "summary": "Get array of specific Redis command details, or all when no argument is given.",
+ "complexity": "O(N) where N is the number of commands to look up",
+ "group": "server",
+ "since": "2.8.13",
+ "arity": -2,
+ "container": "COMMAND",
+ "function": "commandInfoCommand",
+ "history": [
+ [
+ "7.0.0",
+ "Allowed to be called with no argument to get info on all commands."
+ ]
+ ],
+ "command_flags": [
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT_ORDER"
+ ],
+ "arguments": [
+ {
+ "name": "command-name",
+ "type": "string",
+ "optional": true,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/command-list.json b/src/commands/command-list.json
new file mode 100644
index 0000000..9ef624f
--- /dev/null
+++ b/src/commands/command-list.json
@@ -0,0 +1,47 @@
+{
+ "LIST": {
+ "summary": "Get an array of Redis command names",
+ "complexity": "O(N) where N is the total number of Redis commands",
+ "group": "server",
+ "since": "7.0.0",
+ "arity": -2,
+ "container": "COMMAND",
+ "function": "commandListCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT_ORDER"
+ ],
+ "arguments": [
+ {
+ "name": "filterby",
+ "token": "FILTERBY",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "module-name",
+ "type": "string",
+ "token": "MODULE"
+ },
+ {
+ "name": "category",
+ "type": "string",
+ "token": "ACLCAT"
+ },
+ {
+ "name": "pattern",
+ "type": "pattern",
+ "token": "PATTERN"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/command.json b/src/commands/command.json
new file mode 100644
index 0000000..0bed040
--- /dev/null
+++ b/src/commands/command.json
@@ -0,0 +1,21 @@
+{
+ "COMMAND": {
+ "summary": "Get array of Redis command details",
+ "complexity": "O(N) where N is the total number of Redis commands",
+ "group": "server",
+ "since": "2.8.13",
+ "arity": -1,
+ "function": "commandCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT_ORDER"
+ ]
+ }
+}
diff --git a/src/commands/config-get.json b/src/commands/config-get.json
new file mode 100644
index 0000000..26c0609
--- /dev/null
+++ b/src/commands/config-get.json
@@ -0,0 +1,36 @@
+{
+ "GET": {
+ "summary": "Get the values of configuration parameters",
+ "complexity": "O(N) when N is the number of configuration parameters provided",
+ "group": "server",
+ "since": "2.0.0",
+ "arity": -3,
+ "container": "CONFIG",
+ "function": "configGetCommand",
+ "history": [
+ [
+ "7.0.0",
+ "Added the ability to pass multiple pattern parameters in one call"
+ ]
+ ],
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE"
+ ],
+ "arguments": [
+ {
+ "name": "parameter",
+ "type": "block",
+ "multiple": true,
+ "arguments": [
+ {
+ "name": "parameter",
+ "type": "string"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/config-help.json b/src/commands/config-help.json
new file mode 100644
index 0000000..537dd6b
--- /dev/null
+++ b/src/commands/config-help.json
@@ -0,0 +1,15 @@
+{
+ "HELP": {
+ "summary": "Show helpful text about the different subcommands",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "5.0.0",
+ "arity": 2,
+ "container": "CONFIG",
+ "function": "configHelpCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE"
+ ]
+ }
+}
diff --git a/src/commands/config-resetstat.json b/src/commands/config-resetstat.json
new file mode 100644
index 0000000..0180402
--- /dev/null
+++ b/src/commands/config-resetstat.json
@@ -0,0 +1,17 @@
+{
+ "RESETSTAT": {
+ "summary": "Reset the stats returned by INFO",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "2.0.0",
+ "arity": 2,
+ "container": "CONFIG",
+ "function": "configResetStatCommand",
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE"
+ ]
+ }
+}
diff --git a/src/commands/config-rewrite.json b/src/commands/config-rewrite.json
new file mode 100644
index 0000000..4e31dd8
--- /dev/null
+++ b/src/commands/config-rewrite.json
@@ -0,0 +1,17 @@
+{
+ "REWRITE": {
+ "summary": "Rewrite the configuration file with the in memory configuration",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "2.8.0",
+ "arity": 2,
+ "container": "CONFIG",
+ "function": "configRewriteCommand",
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE"
+ ]
+ }
+}
diff --git a/src/commands/config-set.json b/src/commands/config-set.json
new file mode 100644
index 0000000..656e4bc
--- /dev/null
+++ b/src/commands/config-set.json
@@ -0,0 +1,44 @@
+{
+ "SET": {
+ "summary": "Set configuration parameters to the given values",
+ "complexity": "O(N) when N is the number of configuration parameters provided",
+ "group": "server",
+ "since": "2.0.0",
+ "arity": -4,
+ "container": "CONFIG",
+ "function": "configSetCommand",
+ "history": [
+ [
+ "7.0.0",
+ "Added the ability to set multiple parameters in one call."
+ ]
+ ],
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:ALL_NODES",
+ "RESPONSE_POLICY:ALL_SUCCEEDED"
+ ],
+ "arguments": [
+ {
+ "name": "parameter_value",
+ "type": "block",
+ "multiple": true,
+ "arguments": [
+ {
+ "name": "parameter",
+ "type": "string"
+ },
+ {
+ "name": "value",
+ "type": "string"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/config.json b/src/commands/config.json
new file mode 100644
index 0000000..a12271d
--- /dev/null
+++ b/src/commands/config.json
@@ -0,0 +1,9 @@
+{
+ "CONFIG": {
+ "summary": "A container for server configuration commands",
+ "complexity": "Depends on subcommand.",
+ "group": "server",
+ "since": "2.0.0",
+ "arity": -2
+ }
+}
diff --git a/src/commands/copy.json b/src/commands/copy.json
new file mode 100644
index 0000000..0ffb949
--- /dev/null
+++ b/src/commands/copy.json
@@ -0,0 +1,79 @@
+{
+ "COPY": {
+ "summary": "Copy a key",
+ "complexity": "O(N) worst case for collections, where N is the number of nested items. O(1) for string values.",
+ "group": "generic",
+ "since": "6.2.0",
+ "arity": -3,
+ "function": "copyCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "OW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "source",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "destination",
+ "type": "key",
+ "key_spec_index": 1
+ },
+ {
+ "token": "DB",
+ "name": "destination-db",
+ "type": "integer",
+ "optional": true
+ },
+ {
+ "name": "replace",
+ "token": "REPLACE",
+ "type": "pure-token",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/dbsize.json b/src/commands/dbsize.json
new file mode 100644
index 0000000..4d65574
--- /dev/null
+++ b/src/commands/dbsize.json
@@ -0,0 +1,21 @@
+{
+ "DBSIZE": {
+ "summary": "Return the number of keys in the selected database",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "1.0.0",
+ "arity": 1,
+ "function": "dbsizeCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:ALL_SHARDS",
+ "RESPONSE_POLICY:AGG_SUM"
+ ]
+ }
+}
diff --git a/src/commands/debug.json b/src/commands/debug.json
new file mode 100644
index 0000000..092d2e9
--- /dev/null
+++ b/src/commands/debug.json
@@ -0,0 +1,20 @@
+{
+ "DEBUG": {
+ "summary": "A container for debugging commands",
+ "complexity": "Depends on subcommand.",
+ "group": "server",
+ "since": "1.0.0",
+ "arity": -2,
+ "function": "debugCommand",
+ "doc_flags": [
+ "SYSCMD"
+ ],
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "PROTECTED"
+ ]
+ }
+}
diff --git a/src/commands/decr.json b/src/commands/decr.json
new file mode 100644
index 0000000..4a5128d
--- /dev/null
+++ b/src/commands/decr.json
@@ -0,0 +1,46 @@
+{
+ "DECR": {
+ "summary": "Decrement the integer value of a key by one",
+ "complexity": "O(1)",
+ "group": "string",
+ "since": "1.0.0",
+ "arity": 2,
+ "function": "decrCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "FAST"
+ ],
+ "acl_categories": [
+ "STRING"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/decrby.json b/src/commands/decrby.json
new file mode 100644
index 0000000..19f376b
--- /dev/null
+++ b/src/commands/decrby.json
@@ -0,0 +1,50 @@
+{
+ "DECRBY": {
+ "summary": "Decrement the integer value of a key by the given number",
+ "complexity": "O(1)",
+ "group": "string",
+ "since": "1.0.0",
+ "arity": 3,
+ "function": "decrbyCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "FAST"
+ ],
+ "acl_categories": [
+ "STRING"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "decrement",
+ "type": "integer"
+ }
+ ]
+ }
+}
diff --git a/src/commands/del.json b/src/commands/del.json
new file mode 100644
index 0000000..bc500a9
--- /dev/null
+++ b/src/commands/del.json
@@ -0,0 +1,48 @@
+{
+ "DEL": {
+ "summary": "Delete a key",
+ "complexity": "O(N) where N is the number of keys that will be removed. When a key to remove holds a value other than a string, the individual complexity for this key is O(M) where M is the number of elements in the list, set, sorted set or hash. Removing a single key that holds a string value is O(1).",
+ "group": "generic",
+ "since": "1.0.0",
+ "arity": -2,
+ "function": "delCommand",
+ "command_flags": [
+ "WRITE"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:MULTI_SHARD",
+ "RESPONSE_POLICY:AGG_SUM"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RM",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -1,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/discard.json b/src/commands/discard.json
new file mode 100644
index 0000000..56589a8
--- /dev/null
+++ b/src/commands/discard.json
@@ -0,0 +1,20 @@
+{
+ "DISCARD": {
+ "summary": "Discard all commands issued after MULTI",
+ "complexity": "O(N), when N is the number of queued commands",
+ "group": "transactions",
+ "since": "2.0.0",
+ "arity": 1,
+ "function": "discardCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "FAST",
+ "ALLOW_BUSY"
+ ],
+ "acl_categories": [
+ "TRANSACTION"
+ ]
+ }
+}
diff --git a/src/commands/dump.json b/src/commands/dump.json
new file mode 100644
index 0000000..2e9453c
--- /dev/null
+++ b/src/commands/dump.json
@@ -0,0 +1,46 @@
+{
+ "DUMP": {
+ "summary": "Return a serialized version of the value stored at the specified key.",
+ "complexity": "O(1) to access the key and additional O(N*M) to serialize it, where N is the number of Redis objects composing the value and M their average size. For small string values the time complexity is thus O(1)+O(1*M) where M is small, so simply O(1).",
+ "group": "generic",
+ "since": "2.6.0",
+ "arity": 2,
+ "function": "dumpCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/echo.json b/src/commands/echo.json
new file mode 100644
index 0000000..f38d10b
--- /dev/null
+++ b/src/commands/echo.json
@@ -0,0 +1,24 @@
+{
+ "ECHO": {
+ "summary": "Echo the given string",
+ "complexity": "O(1)",
+ "group": "connection",
+ "since": "1.0.0",
+ "arity": 2,
+ "function": "echoCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ],
+ "arguments": [
+ {
+ "name": "message",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/eval.json b/src/commands/eval.json
new file mode 100644
index 0000000..50fc022
--- /dev/null
+++ b/src/commands/eval.json
@@ -0,0 +1,66 @@
+{
+ "EVAL": {
+ "summary": "Execute a Lua script server side",
+ "complexity": "Depends on the script that is executed.",
+ "group": "scripting",
+ "since": "2.6.0",
+ "arity": -3,
+ "function": "evalCommand",
+ "get_keys_function": "evalGetKeys",
+ "command_flags": [
+ "NOSCRIPT",
+ "SKIP_MONITOR",
+ "MAY_REPLICATE",
+ "NO_MANDATORY_KEYS",
+ "STALE"
+ ],
+ "acl_categories": [
+ "SCRIPTING"
+ ],
+ "key_specs": [
+ {
+ "notes": "We cannot tell how the keys will be used so we assume the worst, RW and UPDATE",
+ "flags": [
+ "RW",
+ "ACCESS",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "keynum": {
+ "keynumidx": 0,
+ "firstkey": 1,
+ "step": 1
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "script",
+ "type": "string"
+ },
+ {
+ "name": "numkeys",
+ "type": "integer"
+ },
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "optional": true,
+ "multiple": true
+ },
+ {
+ "name": "arg",
+ "type": "string",
+ "optional": true,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/eval_ro.json b/src/commands/eval_ro.json
new file mode 100644
index 0000000..2911521
--- /dev/null
+++ b/src/commands/eval_ro.json
@@ -0,0 +1,65 @@
+{
+ "EVAL_RO": {
+ "summary": "Execute a read-only Lua script server side",
+ "complexity": "Depends on the script that is executed.",
+ "group": "scripting",
+ "since": "7.0.0",
+ "arity": -3,
+ "function": "evalRoCommand",
+ "get_keys_function": "evalGetKeys",
+ "command_flags": [
+ "NOSCRIPT",
+ "SKIP_MONITOR",
+ "NO_MANDATORY_KEYS",
+ "STALE",
+ "READONLY"
+ ],
+ "acl_categories": [
+ "SCRIPTING"
+ ],
+ "key_specs": [
+ {
+ "notes": "We cannot tell how the keys will be used so we assume the worst, RO and ACCESS",
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "keynum": {
+ "keynumidx": 0,
+ "firstkey": 1,
+ "step": 1
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "script",
+ "type": "string"
+ },
+ {
+ "name": "numkeys",
+ "type": "integer"
+ },
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "optional":true,
+ "multiple": true
+ },
+ {
+ "name": "arg",
+ "type": "string",
+ "optional":true,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/evalsha.json b/src/commands/evalsha.json
new file mode 100644
index 0000000..9b68b87
--- /dev/null
+++ b/src/commands/evalsha.json
@@ -0,0 +1,65 @@
+{
+ "EVALSHA": {
+ "summary": "Execute a Lua script server side",
+ "complexity": "Depends on the script that is executed.",
+ "group": "scripting",
+ "since": "2.6.0",
+ "arity": -3,
+ "function": "evalShaCommand",
+ "get_keys_function": "evalGetKeys",
+ "command_flags": [
+ "NOSCRIPT",
+ "SKIP_MONITOR",
+ "MAY_REPLICATE",
+ "NO_MANDATORY_KEYS",
+ "STALE"
+ ],
+ "acl_categories": [
+ "SCRIPTING"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "keynum": {
+ "keynumidx": 0,
+ "firstkey": 1,
+ "step": 1
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "sha1",
+ "type": "string"
+ },
+ {
+ "name": "numkeys",
+ "type": "integer"
+ },
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "optional": true,
+ "multiple": true
+ },
+ {
+ "name": "arg",
+ "type": "string",
+ "optional": true,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/evalsha_ro.json b/src/commands/evalsha_ro.json
new file mode 100644
index 0000000..b08ce67
--- /dev/null
+++ b/src/commands/evalsha_ro.json
@@ -0,0 +1,64 @@
+{
+ "EVALSHA_RO": {
+ "summary": "Execute a read-only Lua script server side",
+ "complexity": "Depends on the script that is executed.",
+ "group": "scripting",
+ "since": "7.0.0",
+ "arity": -3,
+ "function": "evalShaRoCommand",
+ "get_keys_function": "evalGetKeys",
+ "command_flags": [
+ "NOSCRIPT",
+ "SKIP_MONITOR",
+ "NO_MANDATORY_KEYS",
+ "STALE",
+ "READONLY"
+ ],
+ "acl_categories": [
+ "SCRIPTING"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "keynum": {
+ "keynumidx": 0,
+ "firstkey": 1,
+ "step": 1
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "sha1",
+ "type": "string"
+ },
+ {
+ "name": "numkeys",
+ "type": "integer"
+ },
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "optional":true,
+ "multiple": true
+ },
+ {
+ "name": "arg",
+ "type": "string",
+ "optional":true,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/exec.json b/src/commands/exec.json
new file mode 100644
index 0000000..80856ef
--- /dev/null
+++ b/src/commands/exec.json
@@ -0,0 +1,19 @@
+{
+ "EXEC": {
+ "summary": "Execute all commands issued after MULTI",
+ "complexity": "Depends on commands in the transaction",
+ "group": "transactions",
+ "since": "1.2.0",
+ "arity": 1,
+ "function": "execCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SKIP_SLOWLOG"
+ ],
+ "acl_categories": [
+ "TRANSACTION"
+ ]
+ }
+}
diff --git a/src/commands/exists.json b/src/commands/exists.json
new file mode 100644
index 0000000..b313633
--- /dev/null
+++ b/src/commands/exists.json
@@ -0,0 +1,54 @@
+{
+ "EXISTS": {
+ "summary": "Determine if a key exists",
+ "complexity": "O(N) where N is the number of keys to check.",
+ "group": "generic",
+ "since": "1.0.0",
+ "arity": -2,
+ "function": "existsCommand",
+ "history": [
+ [
+ "3.0.3",
+ "Accepts multiple `key` arguments."
+ ]
+ ],
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:MULTI_SHARD",
+ "RESPONSE_POLICY:AGG_SUM"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -1,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/expire.json b/src/commands/expire.json
new file mode 100644
index 0000000..712830d
--- /dev/null
+++ b/src/commands/expire.json
@@ -0,0 +1,82 @@
+{
+ "EXPIRE": {
+ "summary": "Set a key's time to live in seconds",
+ "complexity": "O(1)",
+ "group": "generic",
+ "since": "1.0.0",
+ "arity": -3,
+ "function": "expireCommand",
+ "history": [
+ [
+ "7.0.0",
+ "Added options: `NX`, `XX`, `GT` and `LT`."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "seconds",
+ "type": "integer"
+ },
+ {
+ "name": "condition",
+ "type": "oneof",
+ "optional": true,
+ "since": "7.0.0",
+ "arguments": [
+ {
+ "name": "nx",
+ "type": "pure-token",
+ "token": "NX"
+ },
+ {
+ "name": "xx",
+ "type": "pure-token",
+ "token": "XX"
+ },
+ {
+ "name": "gt",
+ "type": "pure-token",
+ "token": "GT"
+ },
+ {
+ "name": "lt",
+ "type": "pure-token",
+ "token": "LT"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/expireat.json b/src/commands/expireat.json
new file mode 100644
index 0000000..43d9b74
--- /dev/null
+++ b/src/commands/expireat.json
@@ -0,0 +1,82 @@
+{
+ "EXPIREAT": {
+ "summary": "Set the expiration for a key as a UNIX timestamp",
+ "complexity": "O(1)",
+ "group": "generic",
+ "since": "1.2.0",
+ "arity": -3,
+ "function": "expireatCommand",
+ "history": [
+ [
+ "7.0.0",
+ "Added options: `NX`, `XX`, `GT` and `LT`."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "unix-time-seconds",
+ "type": "unix-time"
+ },
+ {
+ "name": "condition",
+ "type": "oneof",
+ "optional": true,
+ "since": "7.0.0",
+ "arguments": [
+ {
+ "name": "nx",
+ "type": "pure-token",
+ "token": "NX"
+ },
+ {
+ "name": "xx",
+ "type": "pure-token",
+ "token": "XX"
+ },
+ {
+ "name": "gt",
+ "type": "pure-token",
+ "token": "GT"
+ },
+ {
+ "name": "lt",
+ "type": "pure-token",
+ "token": "LT"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/expiretime.json b/src/commands/expiretime.json
new file mode 100644
index 0000000..9393c12
--- /dev/null
+++ b/src/commands/expiretime.json
@@ -0,0 +1,44 @@
+{
+ "EXPIRETIME": {
+ "summary": "Get the expiration Unix timestamp for a key",
+ "complexity": "O(1)",
+ "group": "generic",
+ "since": "7.0.0",
+ "arity": 2,
+ "function": "expiretimeCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/failover.json b/src/commands/failover.json
new file mode 100644
index 0000000..dd2e295
--- /dev/null
+++ b/src/commands/failover.json
@@ -0,0 +1,51 @@
+{
+ "FAILOVER": {
+ "summary": "Start a coordinated failover between this server and one of its replicas.",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "6.2.0",
+ "arity": -1,
+ "function": "failoverCommand",
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "STALE"
+ ],
+ "arguments": [
+ {
+ "name": "target",
+ "token": "TO",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "host",
+ "type": "string"
+ },
+ {
+ "name": "port",
+ "type": "integer"
+ },
+ {
+ "token": "FORCE",
+ "name": "force",
+ "type": "pure-token",
+ "optional": true
+ }
+ ]
+ },
+ {
+ "token": "ABORT",
+ "name": "abort",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "token": "TIMEOUT",
+ "name": "milliseconds",
+ "type": "integer",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/fcall.json b/src/commands/fcall.json
new file mode 100644
index 0000000..9e7a905
--- /dev/null
+++ b/src/commands/fcall.json
@@ -0,0 +1,66 @@
+{
+ "FCALL": {
+ "summary": "Invoke a function",
+ "complexity": "Depends on the function that is executed.",
+ "group": "scripting",
+ "since": "7.0.0",
+ "arity": -3,
+ "function": "fcallCommand",
+ "get_keys_function": "functionGetKeys",
+ "command_flags": [
+ "NOSCRIPT",
+ "SKIP_MONITOR",
+ "MAY_REPLICATE",
+ "NO_MANDATORY_KEYS",
+ "STALE"
+ ],
+ "acl_categories": [
+ "SCRIPTING"
+ ],
+ "key_specs": [
+ {
+ "notes": "We cannot tell how the keys will be used so we assume the worst, RW and UPDATE",
+ "flags": [
+ "RW",
+ "ACCESS",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "keynum": {
+ "keynumidx": 0,
+ "firstkey": 1,
+ "step": 1
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "function",
+ "type": "string"
+ },
+ {
+ "name": "numkeys",
+ "type": "integer"
+ },
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "optional": true,
+ "multiple": true
+ },
+ {
+ "name": "arg",
+ "type": "string",
+ "optional": true,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/fcall_ro.json b/src/commands/fcall_ro.json
new file mode 100644
index 0000000..6ba2736
--- /dev/null
+++ b/src/commands/fcall_ro.json
@@ -0,0 +1,65 @@
+{
+ "FCALL_RO": {
+ "summary": "Invoke a read-only function",
+ "complexity": "Depends on the function that is executed.",
+ "group": "scripting",
+ "since": "7.0.0",
+ "arity": -3,
+ "function": "fcallroCommand",
+ "get_keys_function": "functionGetKeys",
+ "command_flags": [
+ "NOSCRIPT",
+ "SKIP_MONITOR",
+ "NO_MANDATORY_KEYS",
+ "STALE",
+ "READONLY"
+ ],
+ "acl_categories": [
+ "SCRIPTING"
+ ],
+ "key_specs": [
+ {
+ "notes": "We cannot tell how the keys will be used so we assume the worst, RO and ACCESS",
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "keynum": {
+ "keynumidx": 0,
+ "firstkey": 1,
+ "step": 1
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "function",
+ "type": "string"
+ },
+ {
+ "name": "numkeys",
+ "type": "integer"
+ },
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "optional": true,
+ "multiple": true
+ },
+ {
+ "name": "arg",
+ "type": "string",
+ "optional": true,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/flushall.json b/src/commands/flushall.json
new file mode 100644
index 0000000..ef6a1f8
--- /dev/null
+++ b/src/commands/flushall.json
@@ -0,0 +1,52 @@
+{
+ "FLUSHALL": {
+ "summary": "Remove all keys from all databases",
+ "complexity": "O(N) where N is the total number of keys in all databases",
+ "group": "server",
+ "since": "1.0.0",
+ "arity": -1,
+ "function": "flushallCommand",
+ "history": [
+ [
+ "4.0.0",
+ "Added the `ASYNC` flushing mode modifier."
+ ],
+ [
+ "6.2.0",
+ "Added the `SYNC` flushing mode modifier."
+ ]
+ ],
+ "command_flags": [
+ "WRITE"
+ ],
+ "acl_categories": [
+ "KEYSPACE",
+ "DANGEROUS"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:ALL_SHARDS",
+ "RESPONSE_POLICY:ALL_SUCCEEDED"
+ ],
+ "arguments": [
+ {
+ "name": "async",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "async",
+ "type": "pure-token",
+ "token": "ASYNC",
+ "since": "4.0.0"
+ },
+ {
+ "name": "sync",
+ "type": "pure-token",
+ "token": "SYNC",
+ "since": "6.2.0"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/flushdb.json b/src/commands/flushdb.json
new file mode 100644
index 0000000..408ab32
--- /dev/null
+++ b/src/commands/flushdb.json
@@ -0,0 +1,52 @@
+{
+ "FLUSHDB": {
+ "summary": "Remove all keys from the current database",
+ "complexity": "O(N) where N is the number of keys in the selected database",
+ "group": "server",
+ "since": "1.0.0",
+ "arity": -1,
+ "function": "flushdbCommand",
+ "history": [
+ [
+ "4.0.0",
+ "Added the `ASYNC` flushing mode modifier."
+ ],
+ [
+ "6.2.0",
+ "Added the `SYNC` flushing mode modifier."
+ ]
+ ],
+ "command_flags": [
+ "WRITE"
+ ],
+ "acl_categories": [
+ "KEYSPACE",
+ "DANGEROUS"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:ALL_SHARDS",
+ "RESPONSE_POLICY:ALL_SUCCEEDED"
+ ],
+ "arguments": [
+ {
+ "name": "async",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "async",
+ "type": "pure-token",
+ "token": "ASYNC",
+ "since": "4.0.0"
+ },
+ {
+ "name": "sync",
+ "type": "pure-token",
+ "token": "SYNC",
+ "since": "6.2.0"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/function-delete.json b/src/commands/function-delete.json
new file mode 100644
index 0000000..01dc78b
--- /dev/null
+++ b/src/commands/function-delete.json
@@ -0,0 +1,28 @@
+{
+ "DELETE": {
+ "summary": "Delete a function by name",
+ "complexity": "O(1)",
+ "group": "scripting",
+ "since": "7.0.0",
+ "arity": 3,
+ "container": "FUNCTION",
+ "function": "functionDeleteCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "WRITE"
+ ],
+ "acl_categories": [
+ "SCRIPTING"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:ALL_SHARDS",
+ "RESPONSE_POLICY:ALL_SUCCEEDED"
+ ],
+ "arguments": [
+ {
+ "name": "library-name",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/function-dump.json b/src/commands/function-dump.json
new file mode 100644
index 0000000..de402f5
--- /dev/null
+++ b/src/commands/function-dump.json
@@ -0,0 +1,17 @@
+{
+ "DUMP": {
+ "summary": "Dump all functions into a serialized binary payload",
+ "complexity": "O(N) where N is the number of functions",
+ "group": "scripting",
+ "since": "7.0.0",
+ "arity": 2,
+ "container": "FUNCTION",
+ "function": "functionDumpCommand",
+ "command_flags": [
+ "NOSCRIPT"
+ ],
+ "acl_categories": [
+ "SCRIPTING"
+ ]
+ }
+}
diff --git a/src/commands/function-flush.json b/src/commands/function-flush.json
new file mode 100644
index 0000000..a5ab2db
--- /dev/null
+++ b/src/commands/function-flush.json
@@ -0,0 +1,41 @@
+{
+ "FLUSH": {
+ "summary": "Deleting all functions",
+ "complexity": "O(N) where N is the number of functions deleted",
+ "group": "scripting",
+ "since": "7.0.0",
+ "arity": -2,
+ "container": "FUNCTION",
+ "function": "functionFlushCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "WRITE"
+ ],
+ "acl_categories": [
+ "SCRIPTING"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:ALL_SHARDS",
+ "RESPONSE_POLICY:ALL_SUCCEEDED"
+ ],
+ "arguments": [
+ {
+ "name": "async",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "async",
+ "type": "pure-token",
+ "token": "ASYNC"
+ },
+ {
+ "name": "sync",
+ "type": "pure-token",
+ "token": "SYNC"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/function-help.json b/src/commands/function-help.json
new file mode 100644
index 0000000..b8213cb
--- /dev/null
+++ b/src/commands/function-help.json
@@ -0,0 +1,18 @@
+{
+ "HELP": {
+ "summary": "Show helpful text about the different subcommands",
+ "complexity": "O(1)",
+ "group": "scripting",
+ "since": "7.0.0",
+ "arity": 2,
+ "container": "FUNCTION",
+ "function": "functionHelpCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE"
+ ],
+ "acl_categories": [
+ "SCRIPTING"
+ ]
+ }
+}
diff --git a/src/commands/function-kill.json b/src/commands/function-kill.json
new file mode 100644
index 0000000..87432f9
--- /dev/null
+++ b/src/commands/function-kill.json
@@ -0,0 +1,22 @@
+{
+ "KILL": {
+ "summary": "Kill the function currently in execution.",
+ "complexity": "O(1)",
+ "group": "scripting",
+ "since": "7.0.0",
+ "arity": 2,
+ "container": "FUNCTION",
+ "function": "functionKillCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "ALLOW_BUSY"
+ ],
+ "acl_categories": [
+ "SCRIPTING"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:ALL_SHARDS",
+ "RESPONSE_POLICY:ONE_SUCCEEDED"
+ ]
+ }
+}
diff --git a/src/commands/function-list.json b/src/commands/function-list.json
new file mode 100644
index 0000000..6513b80
--- /dev/null
+++ b/src/commands/function-list.json
@@ -0,0 +1,34 @@
+{
+ "LIST": {
+ "summary": "List information about all the functions",
+ "complexity": "O(N) where N is the number of functions",
+ "group": "scripting",
+ "since": "7.0.0",
+ "arity": -2,
+ "container": "FUNCTION",
+ "function": "functionListCommand",
+ "command_flags": [
+ "NOSCRIPT"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT_ORDER"
+ ],
+ "acl_categories": [
+ "SCRIPTING"
+ ],
+ "arguments": [
+ {
+ "name": "library-name-pattern",
+ "type": "string",
+ "token": "LIBRARYNAME",
+ "optional": true
+ },
+ {
+ "name": "withcode",
+ "type": "pure-token",
+ "token": "WITHCODE",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/function-load.json b/src/commands/function-load.json
new file mode 100644
index 0000000..d047212
--- /dev/null
+++ b/src/commands/function-load.json
@@ -0,0 +1,35 @@
+{
+ "LOAD": {
+ "summary": "Create a function with the given arguments (name, code, description)",
+ "complexity": "O(1) (considering compilation time is redundant)",
+ "group": "scripting",
+ "since": "7.0.0",
+ "arity": -3,
+ "container": "FUNCTION",
+ "function": "functionLoadCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "SCRIPTING"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:ALL_SHARDS",
+ "RESPONSE_POLICY:ALL_SUCCEEDED"
+ ],
+ "arguments": [
+ {
+ "name": "replace",
+ "type": "pure-token",
+ "token": "REPLACE",
+ "optional": true
+ },
+ {
+ "name": "function-code",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/function-restore.json b/src/commands/function-restore.json
new file mode 100644
index 0000000..ede0168
--- /dev/null
+++ b/src/commands/function-restore.json
@@ -0,0 +1,51 @@
+{
+ "RESTORE": {
+ "summary": "Restore all the functions on the given payload",
+ "complexity": "O(N) where N is the number of functions on the payload",
+ "group": "scripting",
+ "since": "7.0.0",
+ "arity": -3,
+ "container": "FUNCTION",
+ "function": "functionRestoreCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "SCRIPTING"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:ALL_SHARDS",
+ "RESPONSE_POLICY:ALL_SUCCEEDED"
+ ],
+ "arguments": [
+ {
+ "name": "serialized-value",
+ "type": "string"
+ },
+ {
+ "name": "policy",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "flush",
+ "type": "pure-token",
+ "token": "FLUSH"
+ },
+ {
+ "name": "append",
+ "type": "pure-token",
+ "token": "APPEND"
+ },
+ {
+ "name": "replace",
+ "type": "pure-token",
+ "token": "REPLACE"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/function-stats.json b/src/commands/function-stats.json
new file mode 100644
index 0000000..0d055b6
--- /dev/null
+++ b/src/commands/function-stats.json
@@ -0,0 +1,23 @@
+{
+ "STATS": {
+ "summary": "Return information about the function currently running (name, description, duration)",
+ "complexity": "O(1)",
+ "group": "scripting",
+ "since": "7.0.0",
+ "arity": 2,
+ "container": "FUNCTION",
+ "function": "functionStatsCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "ALLOW_BUSY"
+ ],
+ "acl_categories": [
+ "SCRIPTING"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT",
+ "REQUEST_POLICY:ALL_SHARDS",
+ "RESPONSE_POLICY:SPECIAL"
+ ]
+ }
+}
diff --git a/src/commands/function.json b/src/commands/function.json
new file mode 100644
index 0000000..3d33345
--- /dev/null
+++ b/src/commands/function.json
@@ -0,0 +1,9 @@
+{
+ "FUNCTION": {
+ "summary": "A container for function commands",
+ "complexity": "Depends on subcommand.",
+ "group": "scripting",
+ "since": "7.0.0",
+ "arity": -2
+ }
+}
diff --git a/src/commands/geoadd.json b/src/commands/geoadd.json
new file mode 100644
index 0000000..acdc575
--- /dev/null
+++ b/src/commands/geoadd.json
@@ -0,0 +1,94 @@
+{
+ "GEOADD": {
+ "summary": "Add one or more geospatial items in the geospatial index represented using a sorted set",
+ "complexity": "O(log(N)) for each item added, where N is the number of elements in the sorted set.",
+ "group": "geo",
+ "since": "3.2.0",
+ "arity": -5,
+ "function": "geoaddCommand",
+ "history": [
+ [
+ "6.2.0",
+ "Added the `CH`, `NX` and `XX` options."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "GEO"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "condition",
+ "type": "oneof",
+ "optional": true,
+ "since": "6.2.0",
+ "arguments": [
+ {
+ "name": "nx",
+ "type": "pure-token",
+ "token": "NX"
+ },
+ {
+ "name": "xx",
+ "type": "pure-token",
+ "token": "XX"
+ }
+ ]
+ },
+ {
+ "name": "change",
+ "token": "CH",
+ "type": "pure-token",
+ "optional": true,
+ "since": "6.2.0"
+ },
+ {
+ "name": "longitude_latitude_member",
+ "type": "block",
+ "multiple": true,
+ "arguments": [
+ {
+ "name": "longitude",
+ "type": "double"
+ },
+ {
+ "name": "latitude",
+ "type": "double"
+ },
+ {
+ "name": "member",
+ "type": "string"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/geodist.json b/src/commands/geodist.json
new file mode 100644
index 0000000..87782b2
--- /dev/null
+++ b/src/commands/geodist.json
@@ -0,0 +1,78 @@
+{
+ "GEODIST": {
+ "summary": "Returns the distance between two members of a geospatial index",
+ "complexity": "O(log(N))",
+ "group": "geo",
+ "since": "3.2.0",
+ "arity": -4,
+ "function": "geodistCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "GEO"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "member1",
+ "type": "string"
+ },
+ {
+ "name": "member2",
+ "type": "string"
+ },
+ {
+ "name": "unit",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "m",
+ "type": "pure-token",
+ "token": "m"
+ },
+ {
+ "name": "km",
+ "type": "pure-token",
+ "token": "km"
+ },
+ {
+ "name": "ft",
+ "type": "pure-token",
+ "token": "ft"
+ },
+ {
+ "name": "mi",
+ "type": "pure-token",
+ "token": "mi"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/geohash.json b/src/commands/geohash.json
new file mode 100644
index 0000000..4cb383c
--- /dev/null
+++ b/src/commands/geohash.json
@@ -0,0 +1,48 @@
+{
+ "GEOHASH": {
+ "summary": "Returns members of a geospatial index as standard geohash strings",
+ "complexity": "O(log(N)) for each member requested, where N is the number of elements in the sorted set.",
+ "group": "geo",
+ "since": "3.2.0",
+ "arity": -2,
+ "function": "geohashCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "GEO"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "member",
+ "type": "string",
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/geopos.json b/src/commands/geopos.json
new file mode 100644
index 0000000..a41d162
--- /dev/null
+++ b/src/commands/geopos.json
@@ -0,0 +1,48 @@
+{
+ "GEOPOS": {
+ "summary": "Returns longitude and latitude of members of a geospatial index",
+ "complexity": "O(N) where N is the number of members requested.",
+ "group": "geo",
+ "since": "3.2.0",
+ "arity": -2,
+ "function": "geoposCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "GEO"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "member",
+ "type": "string",
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/georadius.json b/src/commands/georadius.json
new file mode 100644
index 0000000..c53efa4
--- /dev/null
+++ b/src/commands/georadius.json
@@ -0,0 +1,204 @@
+{
+ "GEORADIUS": {
+ "summary": "Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a point",
+ "complexity": "O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.",
+ "group": "geo",
+ "since": "3.2.0",
+ "arity": -6,
+ "function": "georadiusCommand",
+ "get_keys_function": "georadiusGetKeys",
+ "history": [
+ [
+ "6.2.0",
+ "Added the `ANY` option for `COUNT`."
+ ],
+ [
+ "7.0.0",
+ "Added support for uppercase unit names."
+ ]
+ ],
+ "deprecated_since": "6.2.0",
+ "replaced_by": "`GEOSEARCH` and `GEOSEARCHSTORE` with the `BYRADIUS` argument",
+ "doc_flags": [
+ "DEPRECATED"
+ ],
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "GEO"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "OW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "keyword": {
+ "keyword": "STORE",
+ "startfrom": 6
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "OW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "keyword": {
+ "keyword": "STOREDIST",
+ "startfrom": 6
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "longitude",
+ "type": "double"
+ },
+ {
+ "name": "latitude",
+ "type": "double"
+ },
+ {
+ "name": "radius",
+ "type": "double"
+ },
+ {
+ "name": "unit",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "m",
+ "type": "pure-token",
+ "token": "m"
+ },
+ {
+ "name": "km",
+ "type": "pure-token",
+ "token": "km"
+ },
+ {
+ "name": "ft",
+ "type": "pure-token",
+ "token": "ft"
+ },
+ {
+ "name": "mi",
+ "type": "pure-token",
+ "token": "mi"
+ }
+ ]
+ },
+ {
+ "name": "withcoord",
+ "token": "WITHCOORD",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "name": "withdist",
+ "token": "WITHDIST",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "name": "withhash",
+ "token": "WITHHASH",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "name": "count",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "token": "COUNT",
+ "name": "count",
+ "type": "integer"
+ },
+ {
+ "name": "any",
+ "token": "ANY",
+ "type": "pure-token",
+ "optional": true,
+ "since": "6.2.0"
+ }
+ ]
+ },
+ {
+ "name": "order",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "asc",
+ "type": "pure-token",
+ "token": "ASC"
+ },
+ {
+ "name": "desc",
+ "type": "pure-token",
+ "token": "DESC"
+ }
+ ]
+ },
+ {
+ "token": "STORE",
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 1,
+ "optional": true
+ },
+ {
+ "token": "STOREDIST",
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 2,
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/georadius_ro.json b/src/commands/georadius_ro.json
new file mode 100644
index 0000000..9859d30
--- /dev/null
+++ b/src/commands/georadius_ro.json
@@ -0,0 +1,146 @@
+{
+ "GEORADIUS_RO": {
+ "summary": "A read-only variant for GEORADIUS",
+ "complexity": "O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.",
+ "group": "geo",
+ "since": "3.2.10",
+ "arity": -6,
+ "function": "georadiusroCommand",
+ "history": [
+ [
+ "6.2.0",
+ "Added the `ANY` option for `COUNT`."
+ ]
+ ],
+ "deprecated_since": "6.2.0",
+ "replaced_by": "`GEOSEARCH` with the `BYRADIUS` argument",
+ "doc_flags": [
+ "DEPRECATED"
+ ],
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "GEO"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "longitude",
+ "type": "double"
+ },
+ {
+ "name": "latitude",
+ "type": "double"
+ },
+ {
+ "name": "radius",
+ "type": "double"
+ },
+ {
+ "name": "unit",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "m",
+ "type": "pure-token",
+ "token": "m"
+ },
+ {
+ "name": "km",
+ "type": "pure-token",
+ "token": "km"
+ },
+ {
+ "name": "ft",
+ "type": "pure-token",
+ "token": "ft"
+ },
+ {
+ "name": "mi",
+ "type": "pure-token",
+ "token": "mi"
+ }
+ ]
+ },
+ {
+ "name": "withcoord",
+ "token": "WITHCOORD",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "name": "withdist",
+ "token": "WITHDIST",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "name": "withhash",
+ "token": "WITHHASH",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "name": "count",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "token": "COUNT",
+ "name": "count",
+ "type": "integer"
+ },
+ {
+ "name": "any",
+ "token": "ANY",
+ "type": "pure-token",
+ "optional": true,
+ "since": "6.2.0"
+ }
+ ]
+ },
+ {
+ "name": "order",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "asc",
+ "type": "pure-token",
+ "token": "ASC"
+ },
+ {
+ "name": "desc",
+ "type": "pure-token",
+ "token": "DESC"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/georadiusbymember.json b/src/commands/georadiusbymember.json
new file mode 100644
index 0000000..d22038a
--- /dev/null
+++ b/src/commands/georadiusbymember.json
@@ -0,0 +1,195 @@
+{
+ "GEORADIUSBYMEMBER": {
+ "summary": "Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a member",
+ "complexity": "O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.",
+ "group": "geo",
+ "since": "3.2.0",
+ "arity": -5,
+ "function": "georadiusbymemberCommand",
+ "get_keys_function": "georadiusGetKeys",
+ "history": [
+ [
+ "7.0.0",
+ "Added support for uppercase unit names."
+ ]
+ ],
+ "deprecated_since": "6.2.0",
+ "replaced_by": "`GEOSEARCH` and `GEOSEARCHSTORE` with the `BYRADIUS` and `FROMMEMBER` arguments",
+ "doc_flags": [
+ "DEPRECATED"
+ ],
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "GEO"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "OW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "keyword": {
+ "keyword": "STORE",
+ "startfrom": 5
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "OW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "keyword": {
+ "keyword": "STOREDIST",
+ "startfrom": 5
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "member",
+ "type": "string"
+ },
+ {
+ "name": "radius",
+ "type": "double"
+ },
+ {
+ "name": "unit",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "m",
+ "type": "pure-token",
+ "token": "m"
+ },
+ {
+ "name": "km",
+ "type": "pure-token",
+ "token": "km"
+ },
+ {
+ "name": "ft",
+ "type": "pure-token",
+ "token": "ft"
+ },
+ {
+ "name": "mi",
+ "type": "pure-token",
+ "token": "mi"
+ }
+ ]
+ },
+ {
+ "name": "withcoord",
+ "token": "WITHCOORD",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "name": "withdist",
+ "token": "WITHDIST",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "name": "withhash",
+ "token": "WITHHASH",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "name": "count",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "token": "COUNT",
+ "name": "count",
+ "type": "integer"
+ },
+ {
+ "name": "any",
+ "token": "ANY",
+ "type": "pure-token",
+ "optional": true
+ }
+ ]
+ },
+ {
+ "name": "order",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "asc",
+ "type": "pure-token",
+ "token": "ASC"
+ },
+ {
+ "name": "desc",
+ "type": "pure-token",
+ "token": "DESC"
+ }
+ ]
+ },
+ {
+ "token": "STORE",
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 1,
+ "optional": true
+ },
+ {
+ "token": "STOREDIST",
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 2,
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/georadiusbymember_ro.json b/src/commands/georadiusbymember_ro.json
new file mode 100644
index 0000000..2a76838
--- /dev/null
+++ b/src/commands/georadiusbymember_ro.json
@@ -0,0 +1,135 @@
+{
+ "GEORADIUSBYMEMBER_RO": {
+ "summary": "A read-only variant for GEORADIUSBYMEMBER",
+ "complexity": "O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.",
+ "group": "geo",
+ "since": "3.2.10",
+ "arity": -5,
+ "function": "georadiusbymemberroCommand",
+ "deprecated_since": "6.2.0",
+ "replaced_by": "`GEOSEARCH` with the `BYRADIUS` and `FROMMEMBER` arguments",
+ "doc_flags": [
+ "DEPRECATED"
+ ],
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "GEO"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "member",
+ "type": "string"
+ },
+ {
+ "name": "radius",
+ "type": "double"
+ },
+ {
+ "name": "unit",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "m",
+ "type": "pure-token",
+ "token": "m"
+ },
+ {
+ "name": "km",
+ "type": "pure-token",
+ "token": "km"
+ },
+ {
+ "name": "ft",
+ "type": "pure-token",
+ "token": "ft"
+ },
+ {
+ "name": "mi",
+ "type": "pure-token",
+ "token": "mi"
+ }
+ ]
+ },
+ {
+ "name": "withcoord",
+ "token": "WITHCOORD",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "name": "withdist",
+ "token": "WITHDIST",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "name": "withhash",
+ "token": "WITHHASH",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "name": "count",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "token": "COUNT",
+ "name": "count",
+ "type": "integer"
+ },
+ {
+ "name": "any",
+ "token": "ANY",
+ "type": "pure-token",
+ "optional": true
+ }
+ ]
+ },
+ {
+ "name": "order",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "asc",
+ "type": "pure-token",
+ "token": "ASC"
+ },
+ {
+ "name": "desc",
+ "type": "pure-token",
+ "token": "DESC"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/geosearch.json b/src/commands/geosearch.json
new file mode 100644
index 0000000..b6e9dc0
--- /dev/null
+++ b/src/commands/geosearch.json
@@ -0,0 +1,212 @@
+{
+ "GEOSEARCH": {
+ "summary": "Query a sorted set representing a geospatial index to fetch members inside an area of a box or a circle.",
+ "complexity": "O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape",
+ "group": "geo",
+ "since": "6.2.0",
+ "arity": -7,
+ "function": "geosearchCommand",
+ "history": [
+ [
+ "7.0.0",
+ "Added support for uppercase unit names."
+ ]
+ ],
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "GEO"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "from",
+ "type": "oneof",
+ "arguments": [
+ {
+ "token": "FROMMEMBER",
+ "name": "member",
+ "type": "string"
+ },
+ {
+ "token": "FROMLONLAT",
+ "name": "longitude_latitude",
+ "type": "block",
+ "arguments": [
+ {
+ "name": "longitude",
+ "type": "double"
+ },
+ {
+ "name": "latitude",
+ "type": "double"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "by",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "circle",
+ "type": "block",
+ "arguments": [
+ {
+ "token": "BYRADIUS",
+ "name": "radius",
+ "type": "double"
+ },
+ {
+ "name": "unit",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "m",
+ "type": "pure-token",
+ "token": "m"
+ },
+ {
+ "name": "km",
+ "type": "pure-token",
+ "token": "km"
+ },
+ {
+ "name": "ft",
+ "type": "pure-token",
+ "token": "ft"
+ },
+ {
+ "name": "mi",
+ "type": "pure-token",
+ "token": "mi"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "box",
+ "type": "block",
+ "arguments": [
+ {
+ "token": "BYBOX",
+ "name": "width",
+ "type": "double"
+ },
+ {
+ "name": "height",
+ "type": "double"
+ },
+ {
+ "name": "unit",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "m",
+ "type": "pure-token",
+ "token": "m"
+ },
+ {
+ "name": "km",
+ "type": "pure-token",
+ "token": "km"
+ },
+ {
+ "name": "ft",
+ "type": "pure-token",
+ "token": "ft"
+ },
+ {
+ "name": "mi",
+ "type": "pure-token",
+ "token": "mi"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "order",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "asc",
+ "type": "pure-token",
+ "token": "ASC"
+ },
+ {
+ "name": "desc",
+ "type": "pure-token",
+ "token": "DESC"
+ }
+ ]
+ },
+ {
+ "name": "count",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "token": "COUNT",
+ "name": "count",
+ "type": "integer"
+ },
+ {
+ "name": "any",
+ "token": "ANY",
+ "type": "pure-token",
+ "optional": true
+ }
+ ]
+ },
+ {
+ "name": "withcoord",
+ "token": "WITHCOORD",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "name": "withdist",
+ "token": "WITHDIST",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "name": "withhash",
+ "token": "WITHHASH",
+ "type": "pure-token",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/geosearchstore.json b/src/commands/geosearchstore.json
new file mode 100644
index 0000000..feaed57
--- /dev/null
+++ b/src/commands/geosearchstore.json
@@ -0,0 +1,224 @@
+{
+ "GEOSEARCHSTORE": {
+ "summary": "Query a sorted set representing a geospatial index to fetch members inside an area of a box or a circle, and store the result in another key.",
+ "complexity": "O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape",
+ "group": "geo",
+ "since": "6.2.0",
+ "arity": -8,
+ "function": "geosearchstoreCommand",
+ "history": [
+ [
+ "7.0.0",
+ "Added support for uppercase unit names."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "GEO"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "OW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "destination",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "source",
+ "type": "key",
+ "key_spec_index": 1
+ },
+ {
+ "name": "from",
+ "type": "oneof",
+ "arguments": [
+ {
+ "token": "FROMMEMBER",
+ "name": "member",
+ "type": "string"
+ },
+ {
+ "token": "FROMLONLAT",
+ "name": "longitude_latitude",
+ "type": "block",
+ "arguments": [
+ {
+ "name": "longitude",
+ "type": "double"
+ },
+ {
+ "name": "latitude",
+ "type": "double"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "by",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "circle",
+ "type": "block",
+ "arguments": [
+ {
+ "token": "BYRADIUS",
+ "name": "radius",
+ "type": "double"
+ },
+ {
+ "name": "unit",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "m",
+ "type": "pure-token",
+ "token": "m"
+ },
+ {
+ "name": "km",
+ "type": "pure-token",
+ "token": "km"
+ },
+ {
+ "name": "ft",
+ "type": "pure-token",
+ "token": "ft"
+ },
+ {
+ "name": "mi",
+ "type": "pure-token",
+ "token": "mi"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "box",
+ "type": "block",
+ "arguments": [
+ {
+ "token": "BYBOX",
+ "name": "width",
+ "type": "double"
+ },
+ {
+ "name": "height",
+ "type": "double"
+ },
+ {
+ "name": "unit",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "m",
+ "type": "pure-token",
+ "token": "m"
+ },
+ {
+ "name": "km",
+ "type": "pure-token",
+ "token": "km"
+ },
+ {
+ "name": "ft",
+ "type": "pure-token",
+ "token": "ft"
+ },
+ {
+ "name": "mi",
+ "type": "pure-token",
+ "token": "mi"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "order",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "asc",
+ "type": "pure-token",
+ "token": "ASC"
+ },
+ {
+ "name": "desc",
+ "type": "pure-token",
+ "token": "DESC"
+ }
+ ]
+ },
+ {
+ "name": "count",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "token": "COUNT",
+ "name": "count",
+ "type": "integer"
+ },
+ {
+ "name": "any",
+ "token": "ANY",
+ "type": "pure-token",
+ "optional": true
+ }
+ ]
+ },
+ {
+ "name": "storedist",
+ "token": "STOREDIST",
+ "type": "pure-token",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/get.json b/src/commands/get.json
new file mode 100644
index 0000000..342e100
--- /dev/null
+++ b/src/commands/get.json
@@ -0,0 +1,44 @@
+{
+ "GET": {
+ "summary": "Get the value of a key",
+ "complexity": "O(1)",
+ "group": "string",
+ "since": "1.0.0",
+ "arity": 2,
+ "function": "getCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "STRING"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/getbit.json b/src/commands/getbit.json
new file mode 100644
index 0000000..759784e
--- /dev/null
+++ b/src/commands/getbit.json
@@ -0,0 +1,48 @@
+{
+ "GETBIT": {
+ "summary": "Returns the bit value at offset in the string value stored at key",
+ "complexity": "O(1)",
+ "group": "bitmap",
+ "since": "2.2.0",
+ "arity": 3,
+ "function": "getbitCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "BITMAP"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "offset",
+ "type": "integer"
+ }
+ ]
+ }
+}
diff --git a/src/commands/getdel.json b/src/commands/getdel.json
new file mode 100644
index 0000000..1d2f56e
--- /dev/null
+++ b/src/commands/getdel.json
@@ -0,0 +1,45 @@
+{
+ "GETDEL": {
+ "summary": "Get the value of a key and delete the key",
+ "complexity": "O(1)",
+ "group": "string",
+ "since": "6.2.0",
+ "arity": 2,
+ "function": "getdelCommand",
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "STRING"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/getex.json b/src/commands/getex.json
new file mode 100644
index 0000000..8557bcd
--- /dev/null
+++ b/src/commands/getex.json
@@ -0,0 +1,78 @@
+{
+ "GETEX": {
+ "summary": "Get the value of a key and optionally set its expiration",
+ "complexity": "O(1)",
+ "group": "string",
+ "since": "6.2.0",
+ "arity": -2,
+ "function": "getexCommand",
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "STRING"
+ ],
+ "key_specs": [
+ {
+ "notes": "RW and UPDATE because it changes the TTL",
+ "flags": [
+ "RW",
+ "ACCESS",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "expiration",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "seconds",
+ "type": "integer",
+ "token": "EX"
+ },
+ {
+ "name": "milliseconds",
+ "type": "integer",
+ "token": "PX"
+ },
+ {
+ "name": "unix-time-seconds",
+ "type": "unix-time",
+ "token": "EXAT"
+ },
+ {
+ "name": "unix-time-milliseconds",
+ "type": "unix-time",
+ "token": "PXAT"
+ },
+ {
+ "name": "persist",
+ "type": "pure-token",
+ "token": "PERSIST"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/getrange.json b/src/commands/getrange.json
new file mode 100644
index 0000000..03eb58e
--- /dev/null
+++ b/src/commands/getrange.json
@@ -0,0 +1,51 @@
+{
+ "GETRANGE": {
+ "summary": "Get a substring of the string stored at a key",
+ "complexity": "O(N) where N is the length of the returned string. The complexity is ultimately determined by the returned length, but because creating a substring from an existing string is very cheap, it can be considered O(1) for small strings.",
+ "group": "string",
+ "since": "2.4.0",
+ "arity": 4,
+ "function": "getrangeCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "STRING"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "start",
+ "type": "integer"
+ },
+ {
+ "name": "end",
+ "type": "integer"
+ }
+ ]
+ }
+}
diff --git a/src/commands/getset.json b/src/commands/getset.json
new file mode 100644
index 0000000..2f6b891
--- /dev/null
+++ b/src/commands/getset.json
@@ -0,0 +1,55 @@
+{
+ "GETSET": {
+ "summary": "Set the string value of a key and return its old value",
+ "complexity": "O(1)",
+ "group": "string",
+ "since": "1.0.0",
+ "arity": 3,
+ "function": "getsetCommand",
+ "deprecated_since": "6.2.0",
+ "replaced_by": "`SET` with the `!GET` argument",
+ "doc_flags": [
+ "DEPRECATED"
+ ],
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "FAST"
+ ],
+ "acl_categories": [
+ "STRING"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "value",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/hdel.json b/src/commands/hdel.json
new file mode 100644
index 0000000..df70430
--- /dev/null
+++ b/src/commands/hdel.json
@@ -0,0 +1,55 @@
+{
+ "HDEL": {
+ "summary": "Delete one or more hash fields",
+ "complexity": "O(N) where N is the number of fields to be removed.",
+ "group": "hash",
+ "since": "2.0.0",
+ "arity": -3,
+ "function": "hdelCommand",
+ "history": [
+ [
+ "2.4.0",
+ "Accepts multiple `field` arguments."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "HASH"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "field",
+ "type": "string",
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/hello.json b/src/commands/hello.json
new file mode 100644
index 0000000..8e80a81
--- /dev/null
+++ b/src/commands/hello.json
@@ -0,0 +1,63 @@
+{
+ "HELLO": {
+ "summary": "Handshake with Redis",
+ "complexity": "O(1)",
+ "group": "connection",
+ "since": "6.0.0",
+ "arity": -1,
+ "function": "helloCommand",
+ "history": [
+ [
+ "6.2.0",
+ "`protover` made optional; when called without arguments the command reports the current connection's context."
+ ]
+ ],
+ "command_flags": [
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "FAST",
+ "NO_AUTH",
+ "SENTINEL",
+ "ALLOW_BUSY"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ],
+ "arguments": [
+ {
+ "name": "arguments",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "protover",
+ "type": "integer"
+ },
+ {
+ "token": "AUTH",
+ "name": "username_password",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "username",
+ "type": "string"
+ },
+ {
+ "name": "password",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "token": "SETNAME",
+ "name": "clientname",
+ "type": "string",
+ "optional": true
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/hexists.json b/src/commands/hexists.json
new file mode 100644
index 0000000..0518e62
--- /dev/null
+++ b/src/commands/hexists.json
@@ -0,0 +1,47 @@
+{
+ "HEXISTS": {
+ "summary": "Determine if a hash field exists",
+ "complexity": "O(1)",
+ "group": "hash",
+ "since": "2.0.0",
+ "arity": 3,
+ "function": "hexistsCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "HASH"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "field",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/hget.json b/src/commands/hget.json
new file mode 100644
index 0000000..12e1fbf
--- /dev/null
+++ b/src/commands/hget.json
@@ -0,0 +1,48 @@
+{
+ "HGET": {
+ "summary": "Get the value of a hash field",
+ "complexity": "O(1)",
+ "group": "hash",
+ "since": "2.0.0",
+ "arity": 3,
+ "function": "hgetCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "HASH"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "field",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/hgetall.json b/src/commands/hgetall.json
new file mode 100644
index 0000000..9fef006
--- /dev/null
+++ b/src/commands/hgetall.json
@@ -0,0 +1,46 @@
+{
+ "HGETALL": {
+ "summary": "Get all the fields and values in a hash",
+ "complexity": "O(N) where N is the size of the hash.",
+ "group": "hash",
+ "since": "2.0.0",
+ "arity": 2,
+ "function": "hgetallCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "HASH"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT_ORDER"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/hincrby.json b/src/commands/hincrby.json
new file mode 100644
index 0000000..124e365
--- /dev/null
+++ b/src/commands/hincrby.json
@@ -0,0 +1,54 @@
+{
+ "HINCRBY": {
+ "summary": "Increment the integer value of a hash field by the given number",
+ "complexity": "O(1)",
+ "group": "hash",
+ "since": "2.0.0",
+ "arity": 4,
+ "function": "hincrbyCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "FAST"
+ ],
+ "acl_categories": [
+ "HASH"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "field",
+ "type": "string"
+ },
+ {
+ "name": "increment",
+ "type": "integer"
+ }
+ ]
+ }
+}
diff --git a/src/commands/hincrbyfloat.json b/src/commands/hincrbyfloat.json
new file mode 100644
index 0000000..b4c81d1
--- /dev/null
+++ b/src/commands/hincrbyfloat.json
@@ -0,0 +1,54 @@
+{
+ "HINCRBYFLOAT": {
+ "summary": "Increment the float value of a hash field by the given amount",
+ "complexity": "O(1)",
+ "group": "hash",
+ "since": "2.6.0",
+ "arity": 4,
+ "function": "hincrbyfloatCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "FAST"
+ ],
+ "acl_categories": [
+ "HASH"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "field",
+ "type": "string"
+ },
+ {
+ "name": "increment",
+ "type": "double"
+ }
+ ]
+ }
+}
diff --git a/src/commands/hkeys.json b/src/commands/hkeys.json
new file mode 100644
index 0000000..243566a
--- /dev/null
+++ b/src/commands/hkeys.json
@@ -0,0 +1,46 @@
+{
+ "HKEYS": {
+ "summary": "Get all the fields in a hash",
+ "complexity": "O(N) where N is the size of the hash.",
+ "group": "hash",
+ "since": "2.0.0",
+ "arity": 2,
+ "function": "hkeysCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "HASH"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT_ORDER"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/hlen.json b/src/commands/hlen.json
new file mode 100644
index 0000000..8320651
--- /dev/null
+++ b/src/commands/hlen.json
@@ -0,0 +1,43 @@
+{
+ "HLEN": {
+ "summary": "Get the number of fields in a hash",
+ "complexity": "O(1)",
+ "group": "hash",
+ "since": "2.0.0",
+ "arity": 2,
+ "function": "hlenCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "HASH"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/hmget.json b/src/commands/hmget.json
new file mode 100644
index 0000000..d7e7c8e
--- /dev/null
+++ b/src/commands/hmget.json
@@ -0,0 +1,49 @@
+{
+ "HMGET": {
+ "summary": "Get the values of all the given hash fields",
+ "complexity": "O(N) where N is the number of fields being requested.",
+ "group": "hash",
+ "since": "2.0.0",
+ "arity": -3,
+ "function": "hmgetCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "HASH"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "field",
+ "type": "string",
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/hmset.json b/src/commands/hmset.json
new file mode 100644
index 0000000..2e962d9
--- /dev/null
+++ b/src/commands/hmset.json
@@ -0,0 +1,65 @@
+{
+ "HMSET": {
+ "summary": "Set multiple hash fields to multiple values",
+ "complexity": "O(N) where N is the number of fields being set.",
+ "group": "hash",
+ "since": "2.0.0",
+ "arity": -4,
+ "function": "hsetCommand",
+ "deprecated_since": "4.0.0",
+ "replaced_by": "`HSET` with multiple field-value pairs",
+ "doc_flags": [
+ "DEPRECATED"
+ ],
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "FAST"
+ ],
+ "acl_categories": [
+ "HASH"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "field_value",
+ "type": "block",
+ "multiple": true,
+ "arguments": [
+ {
+ "name": "field",
+ "type": "string"
+ },
+ {
+ "name": "value",
+ "type": "string"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/hrandfield.json b/src/commands/hrandfield.json
new file mode 100644
index 0000000..ef2ff41
--- /dev/null
+++ b/src/commands/hrandfield.json
@@ -0,0 +1,63 @@
+{
+ "HRANDFIELD": {
+ "summary": "Get one or multiple random fields from a hash",
+ "complexity": "O(N) where N is the number of fields returned",
+ "group": "hash",
+ "since": "6.2.0",
+ "arity": -2,
+ "function": "hrandfieldCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "HASH"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "options",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "count",
+ "type": "integer"
+ },
+ {
+ "name": "withvalues",
+ "token": "WITHVALUES",
+ "type": "pure-token",
+ "optional": true
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/hscan.json b/src/commands/hscan.json
new file mode 100644
index 0000000..7234526
--- /dev/null
+++ b/src/commands/hscan.json
@@ -0,0 +1,62 @@
+{
+ "HSCAN": {
+ "summary": "Incrementally iterate hash fields and associated values",
+ "complexity": "O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection..",
+ "group": "hash",
+ "since": "2.8.0",
+ "arity": -3,
+ "function": "hscanCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "HASH"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "cursor",
+ "type": "integer"
+ },
+ {
+ "token": "MATCH",
+ "name": "pattern",
+ "type": "pattern",
+ "optional": true
+ },
+ {
+ "token": "COUNT",
+ "name": "count",
+ "type": "integer",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/hset.json b/src/commands/hset.json
new file mode 100644
index 0000000..ee5efa7
--- /dev/null
+++ b/src/commands/hset.json
@@ -0,0 +1,66 @@
+{
+ "HSET": {
+ "summary": "Set the string value of a hash field",
+ "complexity": "O(1) for each field/value pair added, so O(N) to add N field/value pairs when the command is called with multiple field/value pairs.",
+ "group": "hash",
+ "since": "2.0.0",
+ "arity": -4,
+ "function": "hsetCommand",
+ "history": [
+ [
+ "4.0.0",
+ "Accepts multiple `field` and `value` arguments."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "FAST"
+ ],
+ "acl_categories": [
+ "HASH"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "field_value",
+ "type": "block",
+ "multiple": true,
+ "arguments": [
+ {
+ "name": "field",
+ "type": "string"
+ },
+ {
+ "name": "value",
+ "type": "string"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/hsetnx.json b/src/commands/hsetnx.json
new file mode 100644
index 0000000..abd0cca
--- /dev/null
+++ b/src/commands/hsetnx.json
@@ -0,0 +1,53 @@
+{
+ "HSETNX": {
+ "summary": "Set the value of a hash field, only if the field does not exist",
+ "complexity": "O(1)",
+ "group": "hash",
+ "since": "2.0.0",
+ "arity": 4,
+ "function": "hsetnxCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "FAST"
+ ],
+ "acl_categories": [
+ "HASH"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "INSERT"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "field",
+ "type": "string"
+ },
+ {
+ "name": "value",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/hstrlen.json b/src/commands/hstrlen.json
new file mode 100644
index 0000000..4ba4df7
--- /dev/null
+++ b/src/commands/hstrlen.json
@@ -0,0 +1,47 @@
+{
+ "HSTRLEN": {
+ "summary": "Get the length of the value of a hash field",
+ "complexity": "O(1)",
+ "group": "hash",
+ "since": "3.2.0",
+ "arity": 3,
+ "function": "hstrlenCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "HASH"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "field",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/hvals.json b/src/commands/hvals.json
new file mode 100644
index 0000000..829f63d
--- /dev/null
+++ b/src/commands/hvals.json
@@ -0,0 +1,46 @@
+{
+ "HVALS": {
+ "summary": "Get all the values in a hash",
+ "complexity": "O(N) where N is the size of the hash.",
+ "group": "hash",
+ "since": "2.0.0",
+ "arity": 2,
+ "function": "hvalsCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "HASH"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT_ORDER"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/incr.json b/src/commands/incr.json
new file mode 100644
index 0000000..09a4960
--- /dev/null
+++ b/src/commands/incr.json
@@ -0,0 +1,46 @@
+{
+ "INCR": {
+ "summary": "Increment the integer value of a key by one",
+ "complexity": "O(1)",
+ "group": "string",
+ "since": "1.0.0",
+ "arity": 2,
+ "function": "incrCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "FAST"
+ ],
+ "acl_categories": [
+ "STRING"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/incrby.json b/src/commands/incrby.json
new file mode 100644
index 0000000..2741811
--- /dev/null
+++ b/src/commands/incrby.json
@@ -0,0 +1,50 @@
+{
+ "INCRBY": {
+ "summary": "Increment the integer value of a key by the given amount",
+ "complexity": "O(1)",
+ "group": "string",
+ "since": "1.0.0",
+ "arity": 3,
+ "function": "incrbyCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "FAST"
+ ],
+ "acl_categories": [
+ "STRING"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "increment",
+ "type": "integer"
+ }
+ ]
+ }
+}
diff --git a/src/commands/incrbyfloat.json b/src/commands/incrbyfloat.json
new file mode 100644
index 0000000..f28b91b
--- /dev/null
+++ b/src/commands/incrbyfloat.json
@@ -0,0 +1,50 @@
+{
+ "INCRBYFLOAT": {
+ "summary": "Increment the float value of a key by the given amount",
+ "complexity": "O(1)",
+ "group": "string",
+ "since": "2.6.0",
+ "arity": 3,
+ "function": "incrbyfloatCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "FAST"
+ ],
+ "acl_categories": [
+ "STRING"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "increment",
+ "type": "double"
+ }
+ ]
+ }
+}
diff --git a/src/commands/info.json b/src/commands/info.json
new file mode 100644
index 0000000..612294d
--- /dev/null
+++ b/src/commands/info.json
@@ -0,0 +1,37 @@
+{
+ "INFO": {
+ "summary": "Get information and statistics about the server",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "1.0.0",
+ "arity": -1,
+ "function": "infoCommand",
+ "history": [
+ [
+ "7.0.0",
+ "Added support for taking multiple section arguments."
+ ]
+ ],
+ "command_flags": [
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "DANGEROUS"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT",
+ "REQUEST_POLICY:ALL_SHARDS",
+ "RESPONSE_POLICY:SPECIAL"
+ ],
+ "arguments": [
+ {
+ "name": "section",
+ "type": "string",
+ "multiple": true,
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/keys.json b/src/commands/keys.json
new file mode 100644
index 0000000..546241f
--- /dev/null
+++ b/src/commands/keys.json
@@ -0,0 +1,27 @@
+{
+ "KEYS": {
+ "summary": "Find all keys matching the given pattern",
+ "complexity": "O(N) with N being the number of keys in the database, under the assumption that the key names in the database and the given pattern have limited length.",
+ "group": "generic",
+ "since": "1.0.0",
+ "arity": 2,
+ "function": "keysCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "KEYSPACE",
+ "DANGEROUS"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:ALL_SHARDS",
+ "NONDETERMINISTIC_OUTPUT_ORDER"
+ ],
+ "arguments": [
+ {
+ "name": "pattern",
+ "type": "pattern"
+ }
+ ]
+ }
+}
diff --git a/src/commands/lastsave.json b/src/commands/lastsave.json
new file mode 100644
index 0000000..9290584
--- /dev/null
+++ b/src/commands/lastsave.json
@@ -0,0 +1,22 @@
+{
+ "LASTSAVE": {
+ "summary": "Get the UNIX time stamp of the last successful save to disk",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "1.0.0",
+ "arity": 1,
+ "function": "lastsaveCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE",
+ "FAST"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "acl_categories": [
+ "ADMIN",
+ "DANGEROUS"
+ ]
+ }
+}
diff --git a/src/commands/latency-doctor.json b/src/commands/latency-doctor.json
new file mode 100644
index 0000000..129b323
--- /dev/null
+++ b/src/commands/latency-doctor.json
@@ -0,0 +1,22 @@
+{
+ "DOCTOR": {
+ "summary": "Return a human readable latency analysis report.",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "2.8.13",
+ "arity": 2,
+ "container": "LATENCY",
+ "function": "latencyCommand",
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT",
+ "REQUEST_POLICY:ALL_NODES",
+ "RESPONSE_POLICY:SPECIAL"
+ ]
+ }
+}
diff --git a/src/commands/latency-graph.json b/src/commands/latency-graph.json
new file mode 100644
index 0000000..0644c1c
--- /dev/null
+++ b/src/commands/latency-graph.json
@@ -0,0 +1,28 @@
+{
+ "GRAPH": {
+ "summary": "Return a latency graph for the event.",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "2.8.13",
+ "arity": 3,
+ "container": "LATENCY",
+ "function": "latencyCommand",
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT",
+ "REQUEST_POLICY:ALL_NODES",
+ "RESPONSE_POLICY:SPECIAL"
+ ],
+ "arguments": [
+ {
+ "name": "event",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/latency-help.json b/src/commands/latency-help.json
new file mode 100644
index 0000000..682beee
--- /dev/null
+++ b/src/commands/latency-help.json
@@ -0,0 +1,15 @@
+{
+ "HELP": {
+ "summary": "Show helpful text about the different subcommands.",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "2.8.13",
+ "arity": 2,
+ "container": "LATENCY",
+ "function": "latencyCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE"
+ ]
+ }
+}
diff --git a/src/commands/latency-histogram.json b/src/commands/latency-histogram.json
new file mode 100644
index 0000000..dc14d47
--- /dev/null
+++ b/src/commands/latency-histogram.json
@@ -0,0 +1,30 @@
+{
+ "HISTOGRAM": {
+ "summary": "Return the cumulative distribution of latencies of a subset of commands or all.",
+ "complexity": "O(N) where N is the number of commands with latency information being retrieved.",
+ "group": "server",
+ "since": "7.0.0",
+ "arity": -2,
+ "container": "LATENCY",
+ "function": "latencyCommand",
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT",
+ "REQUEST_POLICY:ALL_NODES",
+ "RESPONSE_POLICY:SPECIAL"
+ ],
+ "arguments": [
+ {
+ "name": "COMMAND",
+ "type": "string",
+ "optional": true,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/latency-history.json b/src/commands/latency-history.json
new file mode 100644
index 0000000..6d92670
--- /dev/null
+++ b/src/commands/latency-history.json
@@ -0,0 +1,28 @@
+{
+ "HISTORY": {
+ "summary": "Return timestamp-latency samples for the event.",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "2.8.13",
+ "arity": 3,
+ "container": "LATENCY",
+ "function": "latencyCommand",
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT",
+ "REQUEST_POLICY:ALL_NODES",
+ "RESPONSE_POLICY:SPECIAL"
+ ],
+ "arguments": [
+ {
+ "name": "event",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/latency-latest.json b/src/commands/latency-latest.json
new file mode 100644
index 0000000..f513689
--- /dev/null
+++ b/src/commands/latency-latest.json
@@ -0,0 +1,22 @@
+{
+ "LATEST": {
+ "summary": "Return the latest latency samples for all events.",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "2.8.13",
+ "arity": 2,
+ "container": "LATENCY",
+ "function": "latencyCommand",
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT",
+ "REQUEST_POLICY:ALL_NODES",
+ "RESPONSE_POLICY:SPECIAL"
+ ]
+ }
+}
diff --git a/src/commands/latency-reset.json b/src/commands/latency-reset.json
new file mode 100644
index 0000000..30295cc
--- /dev/null
+++ b/src/commands/latency-reset.json
@@ -0,0 +1,29 @@
+{
+ "RESET": {
+ "summary": "Reset latency data for one or more events.",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "2.8.13",
+ "arity": -2,
+ "container": "LATENCY",
+ "function": "latencyCommand",
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:ALL_NODES",
+ "RESPONSE_POLICY:ALL_SUCCEEDED"
+ ],
+ "arguments": [
+ {
+ "name": "event",
+ "type": "string",
+ "optional": true,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/latency.json b/src/commands/latency.json
new file mode 100644
index 0000000..1845fd4
--- /dev/null
+++ b/src/commands/latency.json
@@ -0,0 +1,9 @@
+{
+ "LATENCY": {
+ "summary": "A container for latency diagnostics commands",
+ "complexity": "Depends on subcommand.",
+ "group": "server",
+ "since": "2.8.13",
+ "arity": -2
+ }
+}
diff --git a/src/commands/lcs.json b/src/commands/lcs.json
new file mode 100644
index 0000000..193e6a8
--- /dev/null
+++ b/src/commands/lcs.json
@@ -0,0 +1,72 @@
+{
+ "LCS": {
+ "summary": "Find longest common substring",
+ "complexity": "O(N*M) where N and M are the lengths of s1 and s2, respectively",
+ "group": "string",
+ "since": "7.0.0",
+ "arity": -3,
+ "function": "lcsCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "STRING"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 1,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key1",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "key2",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "len",
+ "token": "LEN",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "name": "idx",
+ "token": "IDX",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "token": "MINMATCHLEN",
+ "name": "len",
+ "type": "integer",
+ "optional": true
+ },
+ {
+ "name": "withmatchlen",
+ "token": "WITHMATCHLEN",
+ "type": "pure-token",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/lindex.json b/src/commands/lindex.json
new file mode 100644
index 0000000..b239724
--- /dev/null
+++ b/src/commands/lindex.json
@@ -0,0 +1,47 @@
+{
+ "LINDEX": {
+ "summary": "Get an element from a list by its index",
+ "complexity": "O(N) where N is the number of elements to traverse to get to the element at index. This makes asking for the first or the last element of the list O(1).",
+ "group": "list",
+ "since": "1.0.0",
+ "arity": 3,
+ "function": "lindexCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "LIST"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "index",
+ "type": "integer"
+ }
+ ]
+ }
+}
diff --git a/src/commands/linsert.json b/src/commands/linsert.json
new file mode 100644
index 0000000..71046fa
--- /dev/null
+++ b/src/commands/linsert.json
@@ -0,0 +1,68 @@
+{
+ "LINSERT": {
+ "summary": "Insert an element before or after another element in a list",
+ "complexity": "O(N) where N is the number of elements to traverse before seeing the value pivot. This means that inserting somewhere on the left end on the list (head) can be considered O(1) and inserting somewhere on the right end (tail) is O(N).",
+ "group": "list",
+ "since": "2.2.0",
+ "arity": 5,
+ "function": "linsertCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "LIST"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "INSERT"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "where",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "before",
+ "type": "pure-token",
+ "token": "BEFORE"
+ },
+ {
+ "name": "after",
+ "type": "pure-token",
+ "token": "AFTER"
+ }
+ ]
+ },
+ {
+ "name": "pivot",
+ "type": "string"
+ },
+ {
+ "name": "element",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/llen.json b/src/commands/llen.json
new file mode 100644
index 0000000..720b237
--- /dev/null
+++ b/src/commands/llen.json
@@ -0,0 +1,43 @@
+{
+ "LLEN": {
+ "summary": "Get the length of a list",
+ "complexity": "O(1)",
+ "group": "list",
+ "since": "1.0.0",
+ "arity": 2,
+ "function": "llenCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "LIST"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/lmove.json b/src/commands/lmove.json
new file mode 100644
index 0000000..060cc7a
--- /dev/null
+++ b/src/commands/lmove.json
@@ -0,0 +1,100 @@
+{
+ "LMOVE": {
+ "summary": "Pop an element from a list, push it to another list and return it",
+ "complexity": "O(1)",
+ "group": "list",
+ "since": "6.2.0",
+ "arity": 5,
+ "function": "lmoveCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "LIST"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "RW",
+ "INSERT"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "source",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "destination",
+ "type": "key",
+ "key_spec_index": 1
+ },
+ {
+ "name": "wherefrom",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "left",
+ "type": "pure-token",
+ "token": "LEFT"
+ },
+ {
+ "name": "right",
+ "type": "pure-token",
+ "token": "RIGHT"
+ }
+ ]
+ },
+ {
+ "name": "whereto",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "left",
+ "type": "pure-token",
+ "token": "LEFT"
+ },
+ {
+ "name": "right",
+ "type": "pure-token",
+ "token": "RIGHT"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/lmpop.json b/src/commands/lmpop.json
new file mode 100644
index 0000000..0821e4c
--- /dev/null
+++ b/src/commands/lmpop.json
@@ -0,0 +1,72 @@
+{
+ "LMPOP": {
+ "summary": "Pop elements from a list",
+ "complexity": "O(N+M) where N is the number of provided keys and M is the number of elements returned.",
+ "group": "list",
+ "since": "7.0.0",
+ "arity": -4,
+ "function": "lmpopCommand",
+ "get_keys_function": "lmpopGetKeys",
+ "command_flags": [
+ "WRITE"
+ ],
+ "acl_categories": [
+ "LIST"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "keynum": {
+ "keynumidx": 0,
+ "firstkey": 1,
+ "step": 1
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "numkeys",
+ "type": "integer"
+ },
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ },
+ {
+ "name": "where",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "left",
+ "type": "pure-token",
+ "token": "LEFT"
+ },
+ {
+ "name": "right",
+ "type": "pure-token",
+ "token": "RIGHT"
+ }
+ ]
+ },
+ {
+ "token": "COUNT",
+ "name": "count",
+ "type": "integer",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/lolwut.json b/src/commands/lolwut.json
new file mode 100644
index 0000000..cf0a985
--- /dev/null
+++ b/src/commands/lolwut.json
@@ -0,0 +1,21 @@
+{
+ "LOLWUT": {
+ "summary": "Display some computer art and the Redis version",
+ "group": "server",
+ "since": "5.0.0",
+ "arity": -1,
+ "function": "lolwutCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "arguments": [
+ {
+ "token": "VERSION",
+ "name": "version",
+ "type": "integer",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/lpop.json b/src/commands/lpop.json
new file mode 100644
index 0000000..cd3de0c
--- /dev/null
+++ b/src/commands/lpop.json
@@ -0,0 +1,57 @@
+{
+ "LPOP": {
+ "summary": "Remove and get the first elements in a list",
+ "complexity": "O(N) where N is the number of elements returned",
+ "group": "list",
+ "since": "1.0.0",
+ "arity": -2,
+ "function": "lpopCommand",
+ "history": [
+ [
+ "6.2.0",
+ "Added the `count` argument."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "LIST"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "count",
+ "type": "integer",
+ "optional": true,
+ "since": "6.2.0"
+ }
+ ]
+ }
+}
diff --git a/src/commands/lpos.json b/src/commands/lpos.json
new file mode 100644
index 0000000..3aea319
--- /dev/null
+++ b/src/commands/lpos.json
@@ -0,0 +1,65 @@
+{
+ "LPOS": {
+ "summary": "Return the index of matching elements on a list",
+ "complexity": "O(N) where N is the number of elements in the list, for the average case. When searching for elements near the head or the tail of the list, or when the MAXLEN option is provided, the command may run in constant time.",
+ "group": "list",
+ "since": "6.0.6",
+ "arity": -3,
+ "function": "lposCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "LIST"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "element",
+ "type": "string"
+ },
+ {
+ "token": "RANK",
+ "name": "rank",
+ "type": "integer",
+ "optional": true
+ },
+ {
+ "token": "COUNT",
+ "name": "num-matches",
+ "type": "integer",
+ "optional": true
+ },
+ {
+ "token": "MAXLEN",
+ "name": "len",
+ "type": "integer",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/lpush.json b/src/commands/lpush.json
new file mode 100644
index 0000000..23a9c36
--- /dev/null
+++ b/src/commands/lpush.json
@@ -0,0 +1,56 @@
+{
+ "LPUSH": {
+ "summary": "Prepend one or multiple elements to a list",
+ "complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.",
+ "group": "list",
+ "since": "1.0.0",
+ "arity": -3,
+ "function": "lpushCommand",
+ "history": [
+ [
+ "2.4.0",
+ "Accepts multiple `element` arguments."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "FAST"
+ ],
+ "acl_categories": [
+ "LIST"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "INSERT"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "element",
+ "type": "string",
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/lpushx.json b/src/commands/lpushx.json
new file mode 100644
index 0000000..b1629b6
--- /dev/null
+++ b/src/commands/lpushx.json
@@ -0,0 +1,56 @@
+{
+ "LPUSHX": {
+ "summary": "Prepend an element to a list, only if the list exists",
+ "complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.",
+ "group": "list",
+ "since": "2.2.0",
+ "arity": -3,
+ "function": "lpushxCommand",
+ "history": [
+ [
+ "4.0.0",
+ "Accepts multiple `element` arguments."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "FAST"
+ ],
+ "acl_categories": [
+ "LIST"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "INSERT"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "element",
+ "type": "string",
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/lrange.json b/src/commands/lrange.json
new file mode 100644
index 0000000..8fa9352
--- /dev/null
+++ b/src/commands/lrange.json
@@ -0,0 +1,51 @@
+{
+ "LRANGE": {
+ "summary": "Get a range of elements from a list",
+ "complexity": "O(S+N) where S is the distance of start offset from HEAD for small lists, from nearest end (HEAD or TAIL) for large lists; and N is the number of elements in the specified range.",
+ "group": "list",
+ "since": "1.0.0",
+ "arity": 4,
+ "function": "lrangeCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "LIST"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "start",
+ "type": "integer"
+ },
+ {
+ "name": "stop",
+ "type": "integer"
+ }
+ ]
+ }
+}
diff --git a/src/commands/lrem.json b/src/commands/lrem.json
new file mode 100644
index 0000000..c845cc0
--- /dev/null
+++ b/src/commands/lrem.json
@@ -0,0 +1,51 @@
+{
+ "LREM": {
+ "summary": "Remove elements from a list",
+ "complexity": "O(N+M) where N is the length of the list and M is the number of elements removed.",
+ "group": "list",
+ "since": "1.0.0",
+ "arity": 4,
+ "function": "lremCommand",
+ "command_flags": [
+ "WRITE"
+ ],
+ "acl_categories": [
+ "LIST"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "count",
+ "type": "integer"
+ },
+ {
+ "name": "element",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/lset.json b/src/commands/lset.json
new file mode 100644
index 0000000..9a9e4fd
--- /dev/null
+++ b/src/commands/lset.json
@@ -0,0 +1,52 @@
+{
+ "LSET": {
+ "summary": "Set the value of an element in a list by its index",
+ "complexity": "O(N) where N is the length of the list. Setting either the first or the last element of the list is O(1).",
+ "group": "list",
+ "since": "1.0.0",
+ "arity": 4,
+ "function": "lsetCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "LIST"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "index",
+ "type": "integer"
+ },
+ {
+ "name": "element",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/ltrim.json b/src/commands/ltrim.json
new file mode 100644
index 0000000..f177d8f
--- /dev/null
+++ b/src/commands/ltrim.json
@@ -0,0 +1,51 @@
+{
+ "LTRIM": {
+ "summary": "Trim a list to the specified range",
+ "complexity": "O(N) where N is the number of elements to be removed by the operation.",
+ "group": "list",
+ "since": "1.0.0",
+ "arity": 4,
+ "function": "ltrimCommand",
+ "command_flags": [
+ "WRITE"
+ ],
+ "acl_categories": [
+ "LIST"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "start",
+ "type": "integer"
+ },
+ {
+ "name": "stop",
+ "type": "integer"
+ }
+ ]
+ }
+}
diff --git a/src/commands/memory-doctor.json b/src/commands/memory-doctor.json
new file mode 100644
index 0000000..b6691df
--- /dev/null
+++ b/src/commands/memory-doctor.json
@@ -0,0 +1,16 @@
+{
+ "DOCTOR": {
+ "summary": "Outputs memory problems report",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "4.0.0",
+ "arity": 2,
+ "container": "MEMORY",
+ "function": "memoryCommand",
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT",
+ "REQUEST_POLICY:ALL_SHARDS",
+ "RESPONSE_POLICY:SPECIAL"
+ ]
+ }
+}
diff --git a/src/commands/memory-help.json b/src/commands/memory-help.json
new file mode 100644
index 0000000..a1cda71
--- /dev/null
+++ b/src/commands/memory-help.json
@@ -0,0 +1,15 @@
+{
+ "HELP": {
+ "summary": "Show helpful text about the different subcommands",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "4.0.0",
+ "arity": 2,
+ "container": "MEMORY",
+ "function": "memoryCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE"
+ ]
+ }
+}
diff --git a/src/commands/memory-malloc-stats.json b/src/commands/memory-malloc-stats.json
new file mode 100644
index 0000000..5106781
--- /dev/null
+++ b/src/commands/memory-malloc-stats.json
@@ -0,0 +1,16 @@
+{
+ "MALLOC-STATS": {
+ "summary": "Show allocator internal stats",
+ "complexity": "Depends on how much memory is allocated, could be slow",
+ "group": "server",
+ "since": "4.0.0",
+ "arity": 2,
+ "container": "MEMORY",
+ "function": "memoryCommand",
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT",
+ "REQUEST_POLICY:ALL_SHARDS",
+ "RESPONSE_POLICY:SPECIAL"
+ ]
+ }
+}
diff --git a/src/commands/memory-purge.json b/src/commands/memory-purge.json
new file mode 100644
index 0000000..b862534
--- /dev/null
+++ b/src/commands/memory-purge.json
@@ -0,0 +1,15 @@
+{
+ "PURGE": {
+ "summary": "Ask the allocator to release memory",
+ "complexity": "Depends on how much memory is allocated, could be slow",
+ "group": "server",
+ "since": "4.0.0",
+ "arity": 2,
+ "container": "MEMORY",
+ "function": "memoryCommand",
+ "command_tips": [
+ "REQUEST_POLICY:ALL_SHARDS",
+ "RESPONSE_POLICY:ALL_SUCCEEDED"
+ ]
+ }
+}
diff --git a/src/commands/memory-stats.json b/src/commands/memory-stats.json
new file mode 100644
index 0000000..76e6baa
--- /dev/null
+++ b/src/commands/memory-stats.json
@@ -0,0 +1,16 @@
+{
+ "STATS": {
+ "summary": "Show memory usage details",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "4.0.0",
+ "arity": 2,
+ "container": "MEMORY",
+ "function": "memoryCommand",
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT",
+ "REQUEST_POLICY:ALL_SHARDS",
+ "RESPONSE_POLICY:SPECIAL"
+ ]
+ }
+}
diff --git a/src/commands/memory-usage.json b/src/commands/memory-usage.json
new file mode 100644
index 0000000..fa6b7c7
--- /dev/null
+++ b/src/commands/memory-usage.json
@@ -0,0 +1,46 @@
+{
+ "USAGE": {
+ "summary": "Estimate the memory usage of a key",
+ "complexity": "O(N) where N is the number of samples.",
+ "group": "server",
+ "since": "4.0.0",
+ "arity": -3,
+ "container": "MEMORY",
+ "function": "memoryCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "token": "SAMPLES",
+ "name": "count",
+ "type": "integer",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/memory.json b/src/commands/memory.json
new file mode 100644
index 0000000..d3fa02f
--- /dev/null
+++ b/src/commands/memory.json
@@ -0,0 +1,9 @@
+{
+ "MEMORY": {
+ "summary": "A container for memory diagnostics commands",
+ "complexity": "Depends on subcommand.",
+ "group": "server",
+ "since": "4.0.0",
+ "arity": -2
+ }
+}
diff --git a/src/commands/mget.json b/src/commands/mget.json
new file mode 100644
index 0000000..fdff809
--- /dev/null
+++ b/src/commands/mget.json
@@ -0,0 +1,48 @@
+{
+ "MGET": {
+ "summary": "Get the values of all the given keys",
+ "complexity": "O(N) where N is the number of keys to retrieve.",
+ "group": "string",
+ "since": "1.0.0",
+ "arity": -2,
+ "function": "mgetCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "STRING"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:MULTI_SHARD"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -1,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/migrate.json b/src/commands/migrate.json
new file mode 100644
index 0000000..b9a52aa
--- /dev/null
+++ b/src/commands/migrate.json
@@ -0,0 +1,169 @@
+{
+ "MIGRATE": {
+ "summary": "Atomically transfer a key from a Redis instance to another one.",
+ "complexity": "This command actually executes a DUMP+DEL in the source instance, and a RESTORE in the target instance. See the pages of these commands for time complexity. Also an O(N) data transfer between the two instances is performed.",
+ "group": "generic",
+ "since": "2.6.0",
+ "arity": -6,
+ "function": "migrateCommand",
+ "get_keys_function": "migrateGetKeys",
+ "history": [
+ [
+ "3.0.0",
+ "Added the `COPY` and `REPLACE` options."
+ ],
+ [
+ "3.0.6",
+ "Added the `KEYS` option."
+ ],
+ [
+ "4.0.7",
+ "Added the `AUTH` option."
+ ],
+ [
+ "6.0.0",
+ "Added the `AUTH2` option."
+ ]
+ ],
+ "command_flags": [
+ "WRITE"
+ ],
+ "acl_categories": [
+ "KEYSPACE",
+ "DANGEROUS"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 3
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE",
+ "INCOMPLETE"
+ ],
+ "begin_search": {
+ "keyword": {
+ "keyword": "KEYS",
+ "startfrom": -2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -1,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "host",
+ "type": "string"
+ },
+ {
+ "name": "port",
+ "type": "integer"
+ },
+ {
+ "name": "key_or_empty_string",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "empty_string",
+ "type": "pure-token",
+ "token": "\"\""
+ }
+ ]
+ },
+ {
+ "name": "destination-db",
+ "type": "integer"
+ },
+ {
+ "name": "timeout",
+ "type": "integer"
+ },
+ {
+ "name": "copy",
+ "token": "COPY",
+ "type": "pure-token",
+ "optional": true,
+ "since": "3.0.0"
+ },
+ {
+ "name": "replace",
+ "token": "REPLACE",
+ "type": "pure-token",
+ "optional": true,
+ "since": "3.0.0"
+ },
+ {
+ "name": "authentication",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "token": "AUTH",
+ "name": "password",
+ "type": "string",
+ "optional": true,
+ "since": "4.0.7"
+ },
+ {
+ "token": "AUTH2",
+ "name": "username_password",
+ "type": "block",
+ "optional": true,
+ "since": "6.0.0",
+ "arguments": [
+ {
+ "name": "username",
+ "type": "string"
+ },
+ {
+ "name": "password",
+ "type": "string"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "token": "KEYS",
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 1,
+ "optional": true,
+ "multiple": true,
+ "since": "3.0.6"
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/src/commands/module-help.json b/src/commands/module-help.json
new file mode 100644
index 0000000..b8db8ae
--- /dev/null
+++ b/src/commands/module-help.json
@@ -0,0 +1,15 @@
+{
+ "HELP": {
+ "summary": "Show helpful text about the different subcommands",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "5.0.0",
+ "arity": 2,
+ "container": "MODULE",
+ "function": "moduleCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE"
+ ]
+ }
+}
diff --git a/src/commands/module-list.json b/src/commands/module-list.json
new file mode 100644
index 0000000..ed6e7d1
--- /dev/null
+++ b/src/commands/module-list.json
@@ -0,0 +1,18 @@
+{
+ "LIST": {
+ "summary": "List all modules loaded by the server",
+ "complexity": "O(N) where N is the number of loaded modules.",
+ "group": "server",
+ "since": "4.0.0",
+ "arity": 2,
+ "container": "MODULE",
+ "function": "moduleCommand",
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT_ORDER"
+ ]
+ }
+}
diff --git a/src/commands/module-load.json b/src/commands/module-load.json
new file mode 100644
index 0000000..84e6d35
--- /dev/null
+++ b/src/commands/module-load.json
@@ -0,0 +1,29 @@
+{
+ "LOAD": {
+ "summary": "Load a module",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "4.0.0",
+ "arity": -3,
+ "container": "MODULE",
+ "function": "moduleCommand",
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "NOSCRIPT",
+ "PROTECTED"
+ ],
+ "arguments": [
+ {
+ "name": "path",
+ "type": "string"
+ },
+ {
+ "name": "arg",
+ "type": "string",
+ "optional": true,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/module-loadex.json b/src/commands/module-loadex.json
new file mode 100644
index 0000000..97e8f2b
--- /dev/null
+++ b/src/commands/module-loadex.json
@@ -0,0 +1,54 @@
+{
+ "LOADEX": {
+ "summary": "Load a module with extended parameters",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "7.0.0",
+ "arity": -3,
+ "container": "MODULE",
+ "function": "moduleCommand",
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "NOSCRIPT",
+ "PROTECTED"
+ ],
+ "arguments": [
+ {
+ "name": "path",
+ "type": "string"
+ },
+ {
+ "name": "configs",
+ "token": "CONFIG",
+ "type": "block",
+ "multiple": true,
+ "multiple_token": true,
+ "optional": true,
+ "arguments": [
+ {
+ "name": "name",
+ "type": "string"
+ },
+ {
+ "name": "value",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "args",
+ "token": "ARGS",
+ "type": "block",
+ "multiple": true,
+ "optional": true,
+ "arguments": [
+ {
+ "name": "arg",
+ "type": "string"
+ }
+ ]
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/src/commands/module-unload.json b/src/commands/module-unload.json
new file mode 100644
index 0000000..8820ba3
--- /dev/null
+++ b/src/commands/module-unload.json
@@ -0,0 +1,23 @@
+{
+ "UNLOAD": {
+ "summary": "Unload a module",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "4.0.0",
+ "arity": 3,
+ "container": "MODULE",
+ "function": "moduleCommand",
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "NOSCRIPT",
+ "PROTECTED"
+ ],
+ "arguments": [
+ {
+ "name": "name",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/module.json b/src/commands/module.json
new file mode 100644
index 0000000..f04d5da
--- /dev/null
+++ b/src/commands/module.json
@@ -0,0 +1,9 @@
+{
+ "MODULE": {
+ "summary": "A container for module commands",
+ "complexity": "Depends on subcommand.",
+ "group": "server",
+ "since": "4.0.0",
+ "arity": -2
+ }
+}
diff --git a/src/commands/monitor.json b/src/commands/monitor.json
new file mode 100644
index 0000000..a305c4f
--- /dev/null
+++ b/src/commands/monitor.json
@@ -0,0 +1,16 @@
+{
+ "MONITOR": {
+ "summary": "Listen for all requests received by the server in real time",
+ "group": "server",
+ "since": "1.0.0",
+ "arity": 1,
+ "function": "monitorCommand",
+ "history": [],
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE"
+ ]
+ }
+}
diff --git a/src/commands/move.json b/src/commands/move.json
new file mode 100644
index 0000000..0c7c71e
--- /dev/null
+++ b/src/commands/move.json
@@ -0,0 +1,49 @@
+{
+ "MOVE": {
+ "summary": "Move a key to another database",
+ "complexity": "O(1)",
+ "group": "generic",
+ "since": "1.0.0",
+ "arity": 3,
+ "function": "moveCommand",
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "db",
+ "type": "integer"
+ }
+ ]
+ }
+}
diff --git a/src/commands/mset.json b/src/commands/mset.json
new file mode 100644
index 0000000..09b9d6d
--- /dev/null
+++ b/src/commands/mset.json
@@ -0,0 +1,59 @@
+{
+ "MSET": {
+ "summary": "Set multiple keys to multiple values",
+ "complexity": "O(N) where N is the number of keys to set.",
+ "group": "string",
+ "since": "1.0.1",
+ "arity": -3,
+ "function": "msetCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "STRING"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:MULTI_SHARD",
+ "RESPONSE_POLICY:ALL_SUCCEEDED"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "OW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -1,
+ "step": 2,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key_value",
+ "type": "block",
+ "multiple": true,
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "value",
+ "type": "string"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/msetnx.json b/src/commands/msetnx.json
new file mode 100644
index 0000000..544ac64
--- /dev/null
+++ b/src/commands/msetnx.json
@@ -0,0 +1,59 @@
+{
+ "MSETNX": {
+ "summary": "Set multiple keys to multiple values, only if none of the keys exist",
+ "complexity": "O(N) where N is the number of keys to set.",
+ "group": "string",
+ "since": "1.0.1",
+ "arity": -3,
+ "function": "msetnxCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "STRING"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:MULTI_SHARD",
+ "RESPONSE_POLICY:AGG_MIN"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "OW",
+ "INSERT"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -1,
+ "step": 2,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key_value",
+ "type": "block",
+ "multiple": true,
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "value",
+ "type": "string"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/multi.json b/src/commands/multi.json
new file mode 100644
index 0000000..f1299a6
--- /dev/null
+++ b/src/commands/multi.json
@@ -0,0 +1,20 @@
+{
+ "MULTI": {
+ "summary": "Mark the start of a transaction block",
+ "complexity": "O(1)",
+ "group": "transactions",
+ "since": "1.2.0",
+ "arity": 1,
+ "function": "multiCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "FAST",
+ "ALLOW_BUSY"
+ ],
+ "acl_categories": [
+ "TRANSACTION"
+ ]
+ }
+}
diff --git a/src/commands/object-encoding.json b/src/commands/object-encoding.json
new file mode 100644
index 0000000..2d39a07
--- /dev/null
+++ b/src/commands/object-encoding.json
@@ -0,0 +1,46 @@
+{
+ "ENCODING": {
+ "summary": "Inspect the internal encoding of a Redis object",
+ "complexity": "O(1)",
+ "group": "generic",
+ "since": "2.2.3",
+ "arity": 3,
+ "container": "OBJECT",
+ "function": "objectCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/object-freq.json b/src/commands/object-freq.json
new file mode 100644
index 0000000..d184f2e
--- /dev/null
+++ b/src/commands/object-freq.json
@@ -0,0 +1,46 @@
+{
+ "FREQ": {
+ "summary": "Get the logarithmic access frequency counter of a Redis object",
+ "complexity": "O(1)",
+ "group": "generic",
+ "since": "4.0.0",
+ "arity": 3,
+ "container": "OBJECT",
+ "function": "objectCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/object-help.json b/src/commands/object-help.json
new file mode 100644
index 0000000..22864ba
--- /dev/null
+++ b/src/commands/object-help.json
@@ -0,0 +1,18 @@
+{
+ "HELP": {
+ "summary": "Show helpful text about the different subcommands",
+ "complexity": "O(1)",
+ "group": "generic",
+ "since": "6.2.0",
+ "arity": 2,
+ "container": "OBJECT",
+ "function": "objectCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ]
+ }
+}
diff --git a/src/commands/object-idletime.json b/src/commands/object-idletime.json
new file mode 100644
index 0000000..162d6f5
--- /dev/null
+++ b/src/commands/object-idletime.json
@@ -0,0 +1,46 @@
+{
+ "IDLETIME": {
+ "summary": "Get the time since a Redis object was last accessed",
+ "complexity": "O(1)",
+ "group": "generic",
+ "since": "2.2.3",
+ "arity": 3,
+ "container": "OBJECT",
+ "function": "objectCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/object-refcount.json b/src/commands/object-refcount.json
new file mode 100644
index 0000000..0f36f50
--- /dev/null
+++ b/src/commands/object-refcount.json
@@ -0,0 +1,46 @@
+{
+ "REFCOUNT": {
+ "summary": "Get the number of references to the value of the key",
+ "complexity": "O(1)",
+ "group": "generic",
+ "since": "2.2.3",
+ "arity": 3,
+ "container": "OBJECT",
+ "function": "objectCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/object.json b/src/commands/object.json
new file mode 100644
index 0000000..f51988c
--- /dev/null
+++ b/src/commands/object.json
@@ -0,0 +1,9 @@
+{
+ "OBJECT": {
+ "summary": "A container for object introspection commands",
+ "complexity": "Depends on subcommand.",
+ "group": "generic",
+ "since": "2.2.3",
+ "arity": -2
+ }
+}
diff --git a/src/commands/persist.json b/src/commands/persist.json
new file mode 100644
index 0000000..f08df4c
--- /dev/null
+++ b/src/commands/persist.json
@@ -0,0 +1,44 @@
+{
+ "PERSIST": {
+ "summary": "Remove the expiration from a key",
+ "complexity": "O(1)",
+ "group": "generic",
+ "since": "2.2.0",
+ "arity": 2,
+ "function": "persistCommand",
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/pexpire.json b/src/commands/pexpire.json
new file mode 100644
index 0000000..9638b8e
--- /dev/null
+++ b/src/commands/pexpire.json
@@ -0,0 +1,82 @@
+{
+ "PEXPIRE": {
+ "summary": "Set a key's time to live in milliseconds",
+ "complexity": "O(1)",
+ "group": "generic",
+ "since": "2.6.0",
+ "arity": -3,
+ "function": "pexpireCommand",
+ "history": [
+ [
+ "7.0.0",
+ "Added options: `NX`, `XX`, `GT` and `LT`."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "milliseconds",
+ "type": "integer"
+ },
+ {
+ "name": "condition",
+ "type": "oneof",
+ "optional": true,
+ "since": "7.0.0",
+ "arguments": [
+ {
+ "name": "nx",
+ "type": "pure-token",
+ "token": "NX"
+ },
+ {
+ "name": "xx",
+ "type": "pure-token",
+ "token": "XX"
+ },
+ {
+ "name": "gt",
+ "type": "pure-token",
+ "token": "GT"
+ },
+ {
+ "name": "lt",
+ "type": "pure-token",
+ "token": "LT"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/pexpireat.json b/src/commands/pexpireat.json
new file mode 100644
index 0000000..c08782c
--- /dev/null
+++ b/src/commands/pexpireat.json
@@ -0,0 +1,82 @@
+{
+ "PEXPIREAT": {
+ "summary": "Set the expiration for a key as a UNIX timestamp specified in milliseconds",
+ "complexity": "O(1)",
+ "group": "generic",
+ "since": "2.6.0",
+ "arity": -3,
+ "function": "pexpireatCommand",
+ "history": [
+ [
+ "7.0.0",
+ "Added options: `NX`, `XX`, `GT` and `LT`."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "unix-time-milliseconds",
+ "type": "unix-time"
+ },
+ {
+ "name": "condition",
+ "type": "oneof",
+ "optional": true,
+ "since": "7.0.0",
+ "arguments": [
+ {
+ "name": "nx",
+ "type": "pure-token",
+ "token": "NX"
+ },
+ {
+ "name": "xx",
+ "type": "pure-token",
+ "token": "XX"
+ },
+ {
+ "name": "gt",
+ "type": "pure-token",
+ "token": "GT"
+ },
+ {
+ "name": "lt",
+ "type": "pure-token",
+ "token": "LT"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/pexpiretime.json b/src/commands/pexpiretime.json
new file mode 100644
index 0000000..6ba9212
--- /dev/null
+++ b/src/commands/pexpiretime.json
@@ -0,0 +1,44 @@
+{
+ "PEXPIRETIME": {
+ "summary": "Get the expiration Unix timestamp for a key in milliseconds",
+ "complexity": "O(1)",
+ "group": "generic",
+ "since": "7.0.0",
+ "arity": 2,
+ "function": "pexpiretimeCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/pfadd.json b/src/commands/pfadd.json
new file mode 100644
index 0000000..8076a76
--- /dev/null
+++ b/src/commands/pfadd.json
@@ -0,0 +1,51 @@
+{
+ "PFADD": {
+ "summary": "Adds the specified elements to the specified HyperLogLog.",
+ "complexity": "O(1) to add every element.",
+ "group": "hyperloglog",
+ "since": "2.8.9",
+ "arity": -2,
+ "function": "pfaddCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "FAST"
+ ],
+ "acl_categories": [
+ "HYPERLOGLOG"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "INSERT"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "element",
+ "type": "string",
+ "optional": true,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/pfcount.json b/src/commands/pfcount.json
new file mode 100644
index 0000000..4d89e1d
--- /dev/null
+++ b/src/commands/pfcount.json
@@ -0,0 +1,46 @@
+{
+ "PFCOUNT": {
+ "summary": "Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s).",
+ "complexity": "O(1) with a very small average constant time when called with a single key. O(N) with N being the number of keys, and much bigger constant times, when called with multiple keys.",
+ "group": "hyperloglog",
+ "since": "2.8.9",
+ "arity": -2,
+ "function": "pfcountCommand",
+ "command_flags": [
+ "READONLY",
+ "MAY_REPLICATE"
+ ],
+ "acl_categories": [
+ "HYPERLOGLOG"
+ ],
+ "key_specs": [
+ {
+ "notes": "RW because it may change the internal representation of the key, and propagate to replicas",
+ "flags": [
+ "RW",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -1,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/pfdebug.json b/src/commands/pfdebug.json
new file mode 100644
index 0000000..b07e725
--- /dev/null
+++ b/src/commands/pfdebug.json
@@ -0,0 +1,52 @@
+{
+ "PFDEBUG": {
+ "summary": "Internal commands for debugging HyperLogLog values",
+ "complexity": "N/A",
+ "group": "hyperloglog",
+ "since": "2.8.9",
+ "arity": 3,
+ "function": "pfdebugCommand",
+ "doc_flags": [
+ "SYSCMD"
+ ],
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "ADMIN"
+ ],
+ "acl_categories": [
+ "HYPERLOGLOG"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "subcommand",
+ "type": "string"
+ },
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/pfmerge.json b/src/commands/pfmerge.json
new file mode 100644
index 0000000..ae18dad
--- /dev/null
+++ b/src/commands/pfmerge.json
@@ -0,0 +1,69 @@
+{
+ "PFMERGE": {
+ "summary": "Merge N different HyperLogLogs into a single one.",
+ "complexity": "O(N) to merge N HyperLogLogs, but with high constant times.",
+ "group": "hyperloglog",
+ "since": "2.8.9",
+ "arity": -2,
+ "function": "pfmergeCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "HYPERLOGLOG"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "INSERT"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -1,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "destkey",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "sourcekey",
+ "type": "key",
+ "key_spec_index": 1,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/pfselftest.json b/src/commands/pfselftest.json
new file mode 100644
index 0000000..b75ce03
--- /dev/null
+++ b/src/commands/pfselftest.json
@@ -0,0 +1,19 @@
+{
+ "PFSELFTEST": {
+ "summary": "An internal command for testing HyperLogLog values",
+ "complexity": "N/A",
+ "group": "hyperloglog",
+ "since": "2.8.9",
+ "arity": 1,
+ "function": "pfselftestCommand",
+ "doc_flags": [
+ "SYSCMD"
+ ],
+ "command_flags": [
+ "ADMIN"
+ ],
+ "acl_categories": [
+ "HYPERLOGLOG"
+ ]
+ }
+}
diff --git a/src/commands/ping.json b/src/commands/ping.json
new file mode 100644
index 0000000..e7db2c3
--- /dev/null
+++ b/src/commands/ping.json
@@ -0,0 +1,28 @@
+{
+ "PING": {
+ "summary": "Ping the server",
+ "complexity": "O(1)",
+ "group": "connection",
+ "since": "1.0.0",
+ "arity": -1,
+ "function": "pingCommand",
+ "command_flags": [
+ "FAST",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:ALL_SHARDS",
+ "RESPONSE_POLICY:ALL_SUCCEEDED"
+ ],
+ "arguments": [
+ {
+ "name": "message",
+ "type": "string",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/psetex.json b/src/commands/psetex.json
new file mode 100644
index 0000000..b746a7b
--- /dev/null
+++ b/src/commands/psetex.json
@@ -0,0 +1,52 @@
+{
+ "PSETEX": {
+ "summary": "Set the value and expiration in milliseconds of a key",
+ "complexity": "O(1)",
+ "group": "string",
+ "since": "2.6.0",
+ "arity": 4,
+ "function": "psetexCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "STRING"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "OW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "milliseconds",
+ "type": "integer"
+ },
+ {
+ "name": "value",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/psubscribe.json b/src/commands/psubscribe.json
new file mode 100644
index 0000000..707fdf4
--- /dev/null
+++ b/src/commands/psubscribe.json
@@ -0,0 +1,30 @@
+{
+ "PSUBSCRIBE": {
+ "summary": "Listen for messages published to channels matching the given patterns",
+ "complexity": "O(N) where N is the number of patterns the client is already subscribed to.",
+ "group": "pubsub",
+ "since": "2.0.0",
+ "arity": -2,
+ "function": "psubscribeCommand",
+ "command_flags": [
+ "PUBSUB",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "pattern",
+ "type": "block",
+ "multiple": true,
+ "arguments": [
+ {
+ "name": "pattern",
+ "type": "pattern"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/psync.json b/src/commands/psync.json
new file mode 100644
index 0000000..91175a1
--- /dev/null
+++ b/src/commands/psync.json
@@ -0,0 +1,25 @@
+{
+ "PSYNC": {
+ "summary": "Internal command used for replication",
+ "group": "server",
+ "since": "2.8.0",
+ "arity": -3,
+ "function": "syncCommand",
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "NO_MULTI",
+ "NOSCRIPT"
+ ],
+ "arguments": [
+ {
+ "name": "replicationid",
+ "type": "string"
+ },
+ {
+ "name": "offset",
+ "type": "integer"
+ }
+ ]
+ }
+}
diff --git a/src/commands/pttl.json b/src/commands/pttl.json
new file mode 100644
index 0000000..1d37b9a
--- /dev/null
+++ b/src/commands/pttl.json
@@ -0,0 +1,53 @@
+{
+ "PTTL": {
+ "summary": "Get the time to live for a key in milliseconds",
+ "complexity": "O(1)",
+ "group": "generic",
+ "since": "2.6.0",
+ "arity": 2,
+ "function": "pttlCommand",
+ "history": [
+ [
+ "2.8.0",
+ "Added the -2 reply."
+ ]
+ ],
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/publish.json b/src/commands/publish.json
new file mode 100644
index 0000000..3c9b12f
--- /dev/null
+++ b/src/commands/publish.json
@@ -0,0 +1,28 @@
+{
+ "PUBLISH": {
+ "summary": "Post a message to a channel",
+ "complexity": "O(N+M) where N is the number of clients subscribed to the receiving channel and M is the total number of subscribed patterns (by any client).",
+ "group": "pubsub",
+ "since": "2.0.0",
+ "arity": 3,
+ "function": "publishCommand",
+ "command_flags": [
+ "PUBSUB",
+ "LOADING",
+ "STALE",
+ "FAST",
+ "MAY_REPLICATE",
+ "SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "channel",
+ "type": "string"
+ },
+ {
+ "name": "message",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/pubsub-channels.json b/src/commands/pubsub-channels.json
new file mode 100644
index 0000000..0522504
--- /dev/null
+++ b/src/commands/pubsub-channels.json
@@ -0,0 +1,23 @@
+{
+ "CHANNELS": {
+ "summary": "List active channels",
+ "complexity": "O(N) where N is the number of active channels, and assuming constant time pattern matching (relatively short channels and patterns)",
+ "group": "pubsub",
+ "since": "2.8.0",
+ "arity": -2,
+ "container": "PUBSUB",
+ "function": "pubsubCommand",
+ "command_flags": [
+ "PUBSUB",
+ "LOADING",
+ "STALE"
+ ],
+ "arguments": [
+ {
+ "name": "pattern",
+ "type": "pattern",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/pubsub-help.json b/src/commands/pubsub-help.json
new file mode 100644
index 0000000..e0c2a61
--- /dev/null
+++ b/src/commands/pubsub-help.json
@@ -0,0 +1,15 @@
+{
+ "HELP": {
+ "summary": "Show helpful text about the different subcommands",
+ "complexity": "O(1)",
+ "group": "pubsub",
+ "since": "6.2.0",
+ "arity": 2,
+ "container": "PUBSUB",
+ "function": "pubsubCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE"
+ ]
+ }
+}
diff --git a/src/commands/pubsub-numpat.json b/src/commands/pubsub-numpat.json
new file mode 100644
index 0000000..382ec1b
--- /dev/null
+++ b/src/commands/pubsub-numpat.json
@@ -0,0 +1,16 @@
+{
+ "NUMPAT": {
+ "summary": "Get the count of unique patterns pattern subscriptions",
+ "complexity": "O(1)",
+ "group": "pubsub",
+ "since": "2.8.0",
+ "arity": 2,
+ "container": "PUBSUB",
+ "function": "pubsubCommand",
+ "command_flags": [
+ "PUBSUB",
+ "LOADING",
+ "STALE"
+ ]
+ }
+}
diff --git a/src/commands/pubsub-numsub.json b/src/commands/pubsub-numsub.json
new file mode 100644
index 0000000..fae05c8
--- /dev/null
+++ b/src/commands/pubsub-numsub.json
@@ -0,0 +1,24 @@
+{
+ "NUMSUB": {
+ "summary": "Get the count of subscribers for channels",
+ "complexity": "O(N) for the NUMSUB subcommand, where N is the number of requested channels",
+ "group": "pubsub",
+ "since": "2.8.0",
+ "arity": -2,
+ "container": "PUBSUB",
+ "function": "pubsubCommand",
+ "command_flags": [
+ "PUBSUB",
+ "LOADING",
+ "STALE"
+ ],
+ "arguments": [
+ {
+ "name": "channel",
+ "type": "string",
+ "optional": true,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/pubsub-shardchannels.json b/src/commands/pubsub-shardchannels.json
new file mode 100644
index 0000000..90b907d
--- /dev/null
+++ b/src/commands/pubsub-shardchannels.json
@@ -0,0 +1,23 @@
+{
+ "SHARDCHANNELS": {
+ "summary": "List active shard channels",
+ "complexity": "O(N) where N is the number of active shard channels, and assuming constant time pattern matching (relatively short shard channels).",
+ "group": "pubsub",
+ "since": "7.0.0",
+ "arity": -2,
+ "container": "PUBSUB",
+ "function": "pubsubCommand",
+ "command_flags": [
+ "PUBSUB",
+ "LOADING",
+ "STALE"
+ ],
+ "arguments": [
+ {
+ "name": "pattern",
+ "type": "pattern",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/pubsub-shardnumsub.json b/src/commands/pubsub-shardnumsub.json
new file mode 100644
index 0000000..8918769
--- /dev/null
+++ b/src/commands/pubsub-shardnumsub.json
@@ -0,0 +1,24 @@
+{
+ "SHARDNUMSUB": {
+ "summary": "Get the count of subscribers for shard channels",
+ "complexity": "O(N) for the SHARDNUMSUB subcommand, where N is the number of requested shard channels",
+ "group": "pubsub",
+ "since": "7.0.0",
+ "arity": -2,
+ "container": "PUBSUB",
+ "function": "pubsubCommand",
+ "command_flags": [
+ "PUBSUB",
+ "LOADING",
+ "STALE"
+ ],
+ "arguments": [
+ {
+ "name": "shardchannel",
+ "type": "string",
+ "optional": true,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/pubsub.json b/src/commands/pubsub.json
new file mode 100644
index 0000000..e31bd40
--- /dev/null
+++ b/src/commands/pubsub.json
@@ -0,0 +1,9 @@
+{
+ "PUBSUB": {
+ "summary": "A container for Pub/Sub commands",
+ "complexity": "Depends on subcommand.",
+ "group": "pubsub",
+ "since": "2.8.0",
+ "arity": -2
+ }
+}
diff --git a/src/commands/punsubscribe.json b/src/commands/punsubscribe.json
new file mode 100644
index 0000000..30136b3
--- /dev/null
+++ b/src/commands/punsubscribe.json
@@ -0,0 +1,25 @@
+{
+ "PUNSUBSCRIBE": {
+ "summary": "Stop listening for messages posted to channels matching the given patterns",
+ "complexity": "O(N+M) where N is the number of patterns the client is already subscribed and M is the number of total patterns subscribed in the system (by any client).",
+ "group": "pubsub",
+ "since": "2.0.0",
+ "arity": -1,
+ "function": "punsubscribeCommand",
+ "command_flags": [
+ "PUBSUB",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "pattern",
+ "type": "pattern",
+ "optional": true,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/quit.json b/src/commands/quit.json
new file mode 100644
index 0000000..cf13f1e
--- /dev/null
+++ b/src/commands/quit.json
@@ -0,0 +1,21 @@
+{
+ "QUIT": {
+ "summary": "Close the connection",
+ "complexity": "O(1)",
+ "group": "connection",
+ "since": "1.0.0",
+ "arity": -1,
+ "function": "quitCommand",
+ "command_flags": [
+ "ALLOW_BUSY",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "FAST",
+ "NO_AUTH"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ]
+ }
+}
diff --git a/src/commands/randomkey.json b/src/commands/randomkey.json
new file mode 100644
index 0000000..ceaa3c8
--- /dev/null
+++ b/src/commands/randomkey.json
@@ -0,0 +1,21 @@
+{
+ "RANDOMKEY": {
+ "summary": "Return a random key from the keyspace",
+ "complexity": "O(1)",
+ "group": "generic",
+ "since": "1.0.0",
+ "arity": 1,
+ "function": "randomkeyCommand",
+ "command_flags": [
+ "READONLY",
+ "TOUCHES_ARBITRARY_KEYS"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:ALL_SHARDS",
+ "NONDETERMINISTIC_OUTPUT"
+ ]
+ }
+}
diff --git a/src/commands/readonly.json b/src/commands/readonly.json
new file mode 100644
index 0000000..1bbc220
--- /dev/null
+++ b/src/commands/readonly.json
@@ -0,0 +1,18 @@
+{
+ "READONLY": {
+ "summary": "Enables read queries for a connection to a cluster replica node",
+ "complexity": "O(1)",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": 1,
+ "function": "readonlyCommand",
+ "command_flags": [
+ "FAST",
+ "LOADING",
+ "STALE"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ]
+ }
+}
diff --git a/src/commands/readwrite.json b/src/commands/readwrite.json
new file mode 100644
index 0000000..81e505f
--- /dev/null
+++ b/src/commands/readwrite.json
@@ -0,0 +1,18 @@
+{
+ "READWRITE": {
+ "summary": "Disables read queries for a connection to a cluster replica node",
+ "complexity": "O(1)",
+ "group": "cluster",
+ "since": "3.0.0",
+ "arity": 1,
+ "function": "readwriteCommand",
+ "command_flags": [
+ "FAST",
+ "LOADING",
+ "STALE"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ]
+ }
+}
diff --git a/src/commands/rename.json b/src/commands/rename.json
new file mode 100644
index 0000000..561bf22
--- /dev/null
+++ b/src/commands/rename.json
@@ -0,0 +1,69 @@
+{
+ "RENAME": {
+ "summary": "Rename a key",
+ "complexity": "O(1)",
+ "group": "generic",
+ "since": "1.0.0",
+ "arity": 3,
+ "function": "renameCommand",
+ "history": [],
+ "command_flags": [
+ "WRITE"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "OW",
+ "UPDATE"
+
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "newkey",
+ "type": "key",
+ "key_spec_index": 1
+ }
+ ]
+ }
+}
diff --git a/src/commands/renamenx.json b/src/commands/renamenx.json
new file mode 100644
index 0000000..afa4f65
--- /dev/null
+++ b/src/commands/renamenx.json
@@ -0,0 +1,74 @@
+{
+ "RENAMENX": {
+ "summary": "Rename a key, only if the new key does not exist",
+ "complexity": "O(1)",
+ "group": "generic",
+ "since": "1.0.0",
+ "arity": 3,
+ "function": "renamenxCommand",
+ "history": [
+ [
+ "3.2.0",
+ "The command no longer returns an error when source and destination names are the same."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "OW",
+ "INSERT"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "newkey",
+ "type": "key",
+ "key_spec_index": 1
+ }
+ ]
+ }
+}
diff --git a/src/commands/replconf.json b/src/commands/replconf.json
new file mode 100644
index 0000000..630b621
--- /dev/null
+++ b/src/commands/replconf.json
@@ -0,0 +1,20 @@
+{
+ "REPLCONF": {
+ "summary": "An internal command for configuring the replication stream",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "3.0.0",
+ "arity": -1,
+ "function": "replconfCommand",
+ "doc_flags": [
+ "SYSCMD"
+ ],
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "ALLOW_BUSY"
+ ]
+ }
+}
diff --git a/src/commands/replicaof.json b/src/commands/replicaof.json
new file mode 100644
index 0000000..c9a0dce
--- /dev/null
+++ b/src/commands/replicaof.json
@@ -0,0 +1,54 @@
+{
+ "REPLICAOF": {
+ "summary": "Make the server a replica of another instance, or promote it as master.",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "5.0.0",
+ "arity": 3,
+ "function": "replicaofCommand",
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "NOSCRIPT",
+ "STALE"
+ ],
+ "arguments": [
+ {
+ "name": "args",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "host-port",
+ "type": "block",
+ "arguments": [
+ {
+ "name": "host",
+ "type": "string"
+ },
+ {
+ "name": "port",
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "name": "no-one",
+ "type": "block",
+ "arguments": [
+ {
+ "name": "no",
+ "type": "pure-token",
+ "token": "NO"
+ },
+ {
+ "name": "one",
+ "type": "pure-token",
+ "token": "ONE"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/reset.json b/src/commands/reset.json
new file mode 100644
index 0000000..40041cd
--- /dev/null
+++ b/src/commands/reset.json
@@ -0,0 +1,21 @@
+{
+ "RESET": {
+ "summary": "Reset the connection",
+ "complexity": "O(1)",
+ "group": "connection",
+ "since": "6.2.0",
+ "arity": 1,
+ "function": "resetCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "FAST",
+ "NO_AUTH",
+ "ALLOW_BUSY"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ]
+ }
+}
diff --git a/src/commands/restore-asking.json b/src/commands/restore-asking.json
new file mode 100644
index 0000000..f4602f9
--- /dev/null
+++ b/src/commands/restore-asking.json
@@ -0,0 +1,99 @@
+{
+ "RESTORE-ASKING": {
+ "summary": "An internal command for migrating keys in a cluster",
+ "complexity": "O(1) to create the new key and additional O(N*M) to reconstruct the serialized value, where N is the number of Redis objects composing the value and M their average size. For small string values the time complexity is thus O(1)+O(1*M) where M is small, so simply O(1). However for sorted set values the complexity is O(N*M*log(N)) because inserting values into sorted sets is O(log(N)).",
+ "group": "server",
+ "since": "3.0.0",
+ "arity": -4,
+ "function": "restoreCommand",
+ "history": [
+ [
+ "3.0.0",
+ "Added the `REPLACE` modifier."
+ ],
+ [
+ "5.0.0",
+ "Added the `ABSTTL` modifier."
+ ],
+ [
+ "5.0.0",
+ "Added the `IDLETIME` and `FREQ` options."
+ ]
+ ],
+ "doc_flags": [
+ "SYSCMD"
+ ],
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "ASKING"
+ ],
+ "acl_categories": [
+ "KEYSPACE",
+ "DANGEROUS"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "OW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "ttl",
+ "type": "integer"
+ },
+ {
+ "name": "serialized-value",
+ "type": "string"
+ },
+ {
+ "name": "replace",
+ "token": "REPLACE",
+ "type": "pure-token",
+ "optional": true,
+ "since": "3.0.0"
+ },
+ {
+ "name": "absttl",
+ "token": "ABSTTL",
+ "type": "pure-token",
+ "optional": true,
+ "since": "5.0.0"
+ },
+ {
+ "token": "IDLETIME",
+ "name": "seconds",
+ "type": "integer",
+ "optional": true,
+ "since": "5.0.0"
+ },
+ {
+ "token": "FREQ",
+ "name": "frequency",
+ "type": "integer",
+ "optional": true,
+ "since": "5.0.0"
+ }
+ ]
+ }
+}
diff --git a/src/commands/restore.json b/src/commands/restore.json
new file mode 100644
index 0000000..d6cebf5
--- /dev/null
+++ b/src/commands/restore.json
@@ -0,0 +1,95 @@
+{
+ "RESTORE": {
+ "summary": "Create a key using the provided serialized value, previously obtained using DUMP.",
+ "complexity": "O(1) to create the new key and additional O(N*M) to reconstruct the serialized value, where N is the number of Redis objects composing the value and M their average size. For small string values the time complexity is thus O(1)+O(1*M) where M is small, so simply O(1). However for sorted set values the complexity is O(N*M*log(N)) because inserting values into sorted sets is O(log(N)).",
+ "group": "generic",
+ "since": "2.6.0",
+ "arity": -4,
+ "function": "restoreCommand",
+ "history": [
+ [
+ "3.0.0",
+ "Added the `REPLACE` modifier."
+ ],
+ [
+ "5.0.0",
+ "Added the `ABSTTL` modifier."
+ ],
+ [
+ "5.0.0",
+ "Added the `IDLETIME` and `FREQ` options."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "KEYSPACE",
+ "DANGEROUS"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "OW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "ttl",
+ "type": "integer"
+ },
+ {
+ "name": "serialized-value",
+ "type": "string"
+ },
+ {
+ "name": "replace",
+ "token": "REPLACE",
+ "type": "pure-token",
+ "optional": true,
+ "since": "3.0.0"
+ },
+ {
+ "name": "absttl",
+ "token": "ABSTTL",
+ "type": "pure-token",
+ "optional": true,
+ "since": "5.0.0"
+ },
+ {
+ "token": "IDLETIME",
+ "name": "seconds",
+ "type": "integer",
+ "optional": true,
+ "since": "5.0.0"
+ },
+ {
+ "token": "FREQ",
+ "name": "frequency",
+ "type": "integer",
+ "optional": true,
+ "since": "5.0.0"
+ }
+ ]
+ }
+}
diff --git a/src/commands/role.json b/src/commands/role.json
new file mode 100644
index 0000000..4d470e3
--- /dev/null
+++ b/src/commands/role.json
@@ -0,0 +1,21 @@
+{
+ "ROLE": {
+ "summary": "Return the role of the instance in the context of replication",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "2.8.12",
+ "arity": 1,
+ "function": "roleCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "FAST",
+ "SENTINEL"
+ ],
+ "acl_categories": [
+ "ADMIN",
+ "DANGEROUS"
+ ]
+ }
+}
diff --git a/src/commands/rpop.json b/src/commands/rpop.json
new file mode 100644
index 0000000..10518a8
--- /dev/null
+++ b/src/commands/rpop.json
@@ -0,0 +1,57 @@
+{
+ "RPOP": {
+ "summary": "Remove and get the last elements in a list",
+ "complexity": "O(N) where N is the number of elements returned",
+ "group": "list",
+ "since": "1.0.0",
+ "arity": -2,
+ "function": "rpopCommand",
+ "history": [
+ [
+ "6.2.0",
+ "Added the `count` argument."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "LIST"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "count",
+ "type": "integer",
+ "optional": true,
+ "since": "6.2.0"
+ }
+ ]
+ }
+}
diff --git a/src/commands/rpoplpush.json b/src/commands/rpoplpush.json
new file mode 100644
index 0000000..ea3c774
--- /dev/null
+++ b/src/commands/rpoplpush.json
@@ -0,0 +1,73 @@
+{
+ "RPOPLPUSH": {
+ "summary": "Remove the last element in a list, prepend it to another list and return it",
+ "complexity": "O(1)",
+ "group": "list",
+ "since": "1.2.0",
+ "arity": 3,
+ "function": "rpoplpushCommand",
+ "deprecated_since": "6.2.0",
+ "replaced_by": "`LMOVE` with the `RIGHT` and `LEFT` arguments",
+ "doc_flags": [
+ "DEPRECATED"
+ ],
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "LIST"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "RW",
+ "INSERT"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "source",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "destination",
+ "type": "key",
+ "key_spec_index": 1
+ }
+ ]
+ }
+}
diff --git a/src/commands/rpush.json b/src/commands/rpush.json
new file mode 100644
index 0000000..03c1f86
--- /dev/null
+++ b/src/commands/rpush.json
@@ -0,0 +1,56 @@
+{
+ "RPUSH": {
+ "summary": "Append one or multiple elements to a list",
+ "complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.",
+ "group": "list",
+ "since": "1.0.0",
+ "arity": -3,
+ "function": "rpushCommand",
+ "history": [
+ [
+ "2.4.0",
+ "Accepts multiple `element` arguments."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "FAST"
+ ],
+ "acl_categories": [
+ "LIST"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "INSERT"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "element",
+ "type": "string",
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/rpushx.json b/src/commands/rpushx.json
new file mode 100644
index 0000000..9d8c14e
--- /dev/null
+++ b/src/commands/rpushx.json
@@ -0,0 +1,56 @@
+{
+ "RPUSHX": {
+ "summary": "Append an element to a list, only if the list exists",
+ "complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.",
+ "group": "list",
+ "since": "2.2.0",
+ "arity": -3,
+ "function": "rpushxCommand",
+ "history": [
+ [
+ "4.0.0",
+ "Accepts multiple `element` arguments."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "FAST"
+ ],
+ "acl_categories": [
+ "LIST"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "INSERT"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "element",
+ "type": "string",
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/sadd.json b/src/commands/sadd.json
new file mode 100644
index 0000000..841eb1f
--- /dev/null
+++ b/src/commands/sadd.json
@@ -0,0 +1,56 @@
+{
+ "SADD": {
+ "summary": "Add one or more members to a set",
+ "complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.",
+ "group": "set",
+ "since": "1.0.0",
+ "arity": -3,
+ "function": "saddCommand",
+ "history": [
+ [
+ "2.4.0",
+ "Accepts multiple `member` arguments."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "FAST"
+ ],
+ "acl_categories": [
+ "SET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "INSERT"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "member",
+ "type": "string",
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/save.json b/src/commands/save.json
new file mode 100644
index 0000000..7cf5cd2
--- /dev/null
+++ b/src/commands/save.json
@@ -0,0 +1,16 @@
+{
+ "SAVE": {
+ "summary": "Synchronously save the dataset to disk",
+ "complexity": "O(N) where N is the total number of keys in all databases",
+ "group": "server",
+ "since": "1.0.0",
+ "arity": 1,
+ "function": "saveCommand",
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "NOSCRIPT",
+ "NO_MULTI"
+ ]
+ }
+}
diff --git a/src/commands/scan.json b/src/commands/scan.json
new file mode 100644
index 0000000..e0856d0
--- /dev/null
+++ b/src/commands/scan.json
@@ -0,0 +1,52 @@
+{
+ "SCAN": {
+ "summary": "Incrementally iterate the keys space",
+ "complexity": "O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection.",
+ "group": "generic",
+ "since": "2.8.0",
+ "arity": -2,
+ "function": "scanCommand",
+ "history": [
+ [
+ "6.0.0",
+ "Added the `TYPE` subcommand."
+ ]
+ ],
+ "command_flags": [
+ "READONLY",
+ "TOUCHES_ARBITRARY_KEYS"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT",
+ "REQUEST_POLICY:SPECIAL"
+ ],
+ "arguments": [
+ {
+ "name": "cursor",
+ "type": "integer"
+ },
+ {
+ "token": "MATCH",
+ "name": "pattern",
+ "type": "pattern",
+ "optional": true
+ },
+ {
+ "token": "COUNT",
+ "name": "count",
+ "type": "integer",
+ "optional": true
+ },
+ {
+ "token": "TYPE",
+ "name": "type",
+ "type": "string",
+ "optional": true,
+ "since": "6.0.0"
+ }
+ ]
+ }
+}
diff --git a/src/commands/scard.json b/src/commands/scard.json
new file mode 100644
index 0000000..a1f1f8e
--- /dev/null
+++ b/src/commands/scard.json
@@ -0,0 +1,43 @@
+{
+ "SCARD": {
+ "summary": "Get the number of members in a set",
+ "complexity": "O(1)",
+ "group": "set",
+ "since": "1.0.0",
+ "arity": 2,
+ "function": "scardCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "SET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/script-debug.json b/src/commands/script-debug.json
new file mode 100644
index 0000000..a69ddca
--- /dev/null
+++ b/src/commands/script-debug.json
@@ -0,0 +1,40 @@
+{
+ "DEBUG": {
+ "summary": "Set the debug mode for executed scripts.",
+ "complexity": "O(1)",
+ "group": "scripting",
+ "since": "3.2.0",
+ "arity": 3,
+ "container": "SCRIPT",
+ "function": "scriptCommand",
+ "command_flags": [
+ "NOSCRIPT"
+ ],
+ "acl_categories": [
+ "SCRIPTING"
+ ],
+ "arguments": [
+ {
+ "name": "mode",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "yes",
+ "type": "pure-token",
+ "token": "YES"
+ },
+ {
+ "name": "sync",
+ "type": "pure-token",
+ "token": "SYNC"
+ },
+ {
+ "name": "no",
+ "type": "pure-token",
+ "token": "NO"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/script-exists.json b/src/commands/script-exists.json
new file mode 100644
index 0000000..e4070f2
--- /dev/null
+++ b/src/commands/script-exists.json
@@ -0,0 +1,28 @@
+{
+ "EXISTS": {
+ "summary": "Check existence of scripts in the script cache.",
+ "complexity": "O(N) with N being the number of scripts to check (so checking a single script is an O(1) operation).",
+ "group": "scripting",
+ "since": "2.6.0",
+ "arity": -3,
+ "container": "SCRIPT",
+ "function": "scriptCommand",
+ "command_flags": [
+ "NOSCRIPT"
+ ],
+ "acl_categories": [
+ "SCRIPTING"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:ALL_SHARDS",
+ "RESPONSE_POLICY:AGG_LOGICAL_AND"
+ ],
+ "arguments": [
+ {
+ "name": "sha1",
+ "type": "string",
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/script-flush.json b/src/commands/script-flush.json
new file mode 100644
index 0000000..b246bde
--- /dev/null
+++ b/src/commands/script-flush.json
@@ -0,0 +1,47 @@
+{
+ "FLUSH": {
+ "summary": "Remove all the scripts from the script cache.",
+ "complexity": "O(N) with N being the number of scripts in cache",
+ "group": "scripting",
+ "since": "2.6.0",
+ "arity": -2,
+ "container": "SCRIPT",
+ "function": "scriptCommand",
+ "history": [
+ [
+ "6.2.0",
+ "Added the `ASYNC` and `SYNC` flushing mode modifiers."
+ ]
+ ],
+ "command_flags": [
+ "NOSCRIPT"
+ ],
+ "acl_categories": [
+ "SCRIPTING"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:ALL_NODES",
+ "RESPONSE_POLICY:ALL_SUCCEEDED"
+ ],
+ "arguments": [
+ {
+ "name": "async",
+ "type": "oneof",
+ "optional": true,
+ "since": "6.2.0",
+ "arguments": [
+ {
+ "name": "async",
+ "type": "pure-token",
+ "token": "ASYNC"
+ },
+ {
+ "name": "sync",
+ "type": "pure-token",
+ "token": "SYNC"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/script-help.json b/src/commands/script-help.json
new file mode 100644
index 0000000..7b3bc89
--- /dev/null
+++ b/src/commands/script-help.json
@@ -0,0 +1,18 @@
+{
+ "HELP": {
+ "summary": "Show helpful text about the different subcommands",
+ "complexity": "O(1)",
+ "group": "scripting",
+ "since": "5.0.0",
+ "arity": 2,
+ "container": "SCRIPT",
+ "function": "scriptCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE"
+ ],
+ "acl_categories": [
+ "SCRIPTING"
+ ]
+ }
+}
diff --git a/src/commands/script-kill.json b/src/commands/script-kill.json
new file mode 100644
index 0000000..970ccd4
--- /dev/null
+++ b/src/commands/script-kill.json
@@ -0,0 +1,22 @@
+{
+ "KILL": {
+ "summary": "Kill the script currently in execution.",
+ "complexity": "O(1)",
+ "group": "scripting",
+ "since": "2.6.0",
+ "arity": 2,
+ "container": "SCRIPT",
+ "function": "scriptCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "ALLOW_BUSY"
+ ],
+ "acl_categories": [
+ "SCRIPTING"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:ALL_SHARDS",
+ "RESPONSE_POLICY:ONE_SUCCEEDED"
+ ]
+ }
+}
diff --git a/src/commands/script-load.json b/src/commands/script-load.json
new file mode 100644
index 0000000..b0b4e67
--- /dev/null
+++ b/src/commands/script-load.json
@@ -0,0 +1,28 @@
+{
+ "LOAD": {
+ "summary": "Load the specified Lua script into the script cache.",
+ "complexity": "O(N) with N being the length in bytes of the script body.",
+ "group": "scripting",
+ "since": "2.6.0",
+ "arity": 3,
+ "container": "SCRIPT",
+ "function": "scriptCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "STALE"
+ ],
+ "acl_categories": [
+ "SCRIPTING"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:ALL_NODES",
+ "RESPONSE_POLICY:ALL_SUCCEEDED"
+ ],
+ "arguments": [
+ {
+ "name": "script",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/script.json b/src/commands/script.json
new file mode 100644
index 0000000..16e307a
--- /dev/null
+++ b/src/commands/script.json
@@ -0,0 +1,9 @@
+{
+ "SCRIPT": {
+ "summary": "A container for Lua scripts management commands",
+ "complexity": "Depends on subcommand.",
+ "group": "scripting",
+ "since": "2.6.0",
+ "arity": -2
+ }
+}
diff --git a/src/commands/sdiff.json b/src/commands/sdiff.json
new file mode 100644
index 0000000..6f5fd0a
--- /dev/null
+++ b/src/commands/sdiff.json
@@ -0,0 +1,47 @@
+{
+ "SDIFF": {
+ "summary": "Subtract multiple sets",
+ "complexity": "O(N) where N is the total number of elements in all given sets.",
+ "group": "set",
+ "since": "1.0.0",
+ "arity": -2,
+ "function": "sdiffCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "SET"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT_ORDER"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -1,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/sdiffstore.json b/src/commands/sdiffstore.json
new file mode 100644
index 0000000..c78cd89
--- /dev/null
+++ b/src/commands/sdiffstore.json
@@ -0,0 +1,68 @@
+{
+ "SDIFFSTORE": {
+ "summary": "Subtract multiple sets and store the resulting set in a key",
+ "complexity": "O(N) where N is the total number of elements in all given sets.",
+ "group": "set",
+ "since": "1.0.0",
+ "arity": -3,
+ "function": "sdiffstoreCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "SET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "OW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -1,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "destination",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 1,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/select.json b/src/commands/select.json
new file mode 100644
index 0000000..4375cac
--- /dev/null
+++ b/src/commands/select.json
@@ -0,0 +1,24 @@
+{
+ "SELECT": {
+ "summary": "Change the selected database for the current connection",
+ "complexity": "O(1)",
+ "group": "connection",
+ "since": "1.0.0",
+ "arity": 2,
+ "function": "selectCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ],
+ "arguments": [
+ {
+ "name": "index",
+ "type": "integer"
+ }
+ ]
+ }
+}
diff --git a/src/commands/sentinel-ckquorum.json b/src/commands/sentinel-ckquorum.json
new file mode 100644
index 0000000..6180614
--- /dev/null
+++ b/src/commands/sentinel-ckquorum.json
@@ -0,0 +1,21 @@
+{
+ "CKQUORUM": {
+ "summary": "Check for a Sentinel quorum",
+ "group": "sentinel",
+ "since": "2.8.4",
+ "arity": 3,
+ "container": "SENTINEL",
+ "function": "sentinelCommand",
+ "command_flags": [
+ "ADMIN",
+ "SENTINEL",
+ "ONLY_SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "master-name",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/sentinel-config.json b/src/commands/sentinel-config.json
new file mode 100644
index 0000000..74bcdbd
--- /dev/null
+++ b/src/commands/sentinel-config.json
@@ -0,0 +1,46 @@
+{
+ "CONFIG": {
+ "summary": "Configure Sentinel",
+ "complexity": "O(1)",
+ "group": "sentinel",
+ "since": "6.2.0",
+ "arity": -3,
+ "container": "SENTINEL",
+ "function": "sentinelCommand",
+ "command_flags": [
+ "ADMIN",
+ "SENTINEL",
+ "ONLY_SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name":"set_or_get",
+ "type":"oneof",
+ "arguments":[
+ {
+ "name":"set_param_value",
+ "token":"SET",
+ "type":"block",
+ "multiple":true,
+ "arguments":[
+ {
+ "name":"parameter",
+ "type":"string"
+ },
+ {
+ "name":"value",
+ "type":"string"
+ }
+ ]
+ },
+ {
+ "token":"GET",
+ "multiple":true,
+ "name":"parameter",
+ "type":"string"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/sentinel-debug.json b/src/commands/sentinel-debug.json
new file mode 100644
index 0000000..b333540
--- /dev/null
+++ b/src/commands/sentinel-debug.json
@@ -0,0 +1,33 @@
+{
+ "DEBUG": {
+ "summary": "List or update the current configurable parameters",
+ "complexity": "O(N) where N is the number of configurable parameters",
+ "group": "sentinel",
+ "since": "7.0.0",
+ "arity": -2,
+ "container": "SENTINEL",
+ "function": "sentinelCommand",
+ "command_flags": [
+ "ADMIN",
+ "SENTINEL",
+ "ONLY_SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "parameter_value",
+ "type": "block",
+ "multiple": true,
+ "arguments": [
+ {
+ "name": "parameter",
+ "type": "string"
+ },
+ {
+ "name": "value",
+ "type": "string"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/sentinel-failover.json b/src/commands/sentinel-failover.json
new file mode 100644
index 0000000..f664016
--- /dev/null
+++ b/src/commands/sentinel-failover.json
@@ -0,0 +1,21 @@
+{
+ "FAILOVER": {
+ "summary": "Force a failover",
+ "group": "sentinel",
+ "since": "2.8.4",
+ "arity": 3,
+ "container": "SENTINEL",
+ "function": "sentinelCommand",
+ "command_flags": [
+ "ADMIN",
+ "SENTINEL",
+ "ONLY_SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "master-name",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/sentinel-flushconfig.json b/src/commands/sentinel-flushconfig.json
new file mode 100644
index 0000000..7d48cd4
--- /dev/null
+++ b/src/commands/sentinel-flushconfig.json
@@ -0,0 +1,16 @@
+{
+ "FLUSHCONFIG": {
+ "summary": "Rewrite configuration file",
+ "complexity": "O(1)",
+ "group": "sentinel",
+ "since": "2.8.4",
+ "arity": 2,
+ "container": "SENTINEL",
+ "function": "sentinelCommand",
+ "command_flags": [
+ "ADMIN",
+ "SENTINEL",
+ "ONLY_SENTINEL"
+ ]
+ }
+}
diff --git a/src/commands/sentinel-get-master-addr-by-name.json b/src/commands/sentinel-get-master-addr-by-name.json
new file mode 100644
index 0000000..e0fde85
--- /dev/null
+++ b/src/commands/sentinel-get-master-addr-by-name.json
@@ -0,0 +1,22 @@
+{
+ "GET-MASTER-ADDR-BY-NAME": {
+ "summary": "Get port and address of a master",
+ "complexity": "O(1)",
+ "group": "sentinel",
+ "since": "2.8.4",
+ "arity": 3,
+ "container": "SENTINEL",
+ "function": "sentinelCommand",
+ "command_flags": [
+ "ADMIN",
+ "SENTINEL",
+ "ONLY_SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "master-name",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/sentinel-help.json b/src/commands/sentinel-help.json
new file mode 100644
index 0000000..4c20313
--- /dev/null
+++ b/src/commands/sentinel-help.json
@@ -0,0 +1,17 @@
+{
+ "HELP": {
+ "summary": "Show helpful text about the different subcommands",
+ "complexity": "O(1)",
+ "group": "sentinel",
+ "since": "6.2.0",
+ "arity": 2,
+ "container": "SENTINEL",
+ "function": "sentinelCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE",
+ "SENTINEL",
+ "ONLY_SENTINEL"
+ ]
+ }
+}
diff --git a/src/commands/sentinel-info-cache.json b/src/commands/sentinel-info-cache.json
new file mode 100644
index 0000000..5c78556
--- /dev/null
+++ b/src/commands/sentinel-info-cache.json
@@ -0,0 +1,23 @@
+{
+ "INFO-CACHE": {
+ "summary": "Get cached INFO from the instances in the deployment",
+ "complexity": "O(N) where N is the number of instances",
+ "group": "sentinel",
+ "since": "3.2.0",
+ "arity": -3,
+ "container": "SENTINEL",
+ "function": "sentinelCommand",
+ "command_flags": [
+ "ADMIN",
+ "SENTINEL",
+ "ONLY_SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "nodename",
+ "type": "string",
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/sentinel-is-master-down-by-addr.json b/src/commands/sentinel-is-master-down-by-addr.json
new file mode 100644
index 0000000..456ad18
--- /dev/null
+++ b/src/commands/sentinel-is-master-down-by-addr.json
@@ -0,0 +1,34 @@
+{
+ "IS-MASTER-DOWN-BY-ADDR": {
+ "summary": "Check if a master is down",
+ "complexity": "O(1)",
+ "group": "sentinel",
+ "since": "2.8.4",
+ "arity": 6,
+ "container": "SENTINEL",
+ "function": "sentinelCommand",
+ "command_flags": [
+ "ADMIN",
+ "SENTINEL",
+ "ONLY_SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "ip",
+ "type": "string"
+ },
+ {
+ "name": "port",
+ "type": "integer"
+ },
+ {
+ "name": "current-epoch",
+ "type": "integer"
+ },
+ {
+ "name": "runid",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/sentinel-master.json b/src/commands/sentinel-master.json
new file mode 100644
index 0000000..ec10f43
--- /dev/null
+++ b/src/commands/sentinel-master.json
@@ -0,0 +1,22 @@
+{
+ "MASTER": {
+ "summary": "Shows the state of a master",
+ "complexity": "O(1)",
+ "group": "sentinel",
+ "since": "2.8.4",
+ "arity": 3,
+ "container": "SENTINEL",
+ "function": "sentinelCommand",
+ "command_flags": [
+ "ADMIN",
+ "SENTINEL",
+ "ONLY_SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "master-name",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/sentinel-masters.json b/src/commands/sentinel-masters.json
new file mode 100644
index 0000000..abfb0b5
--- /dev/null
+++ b/src/commands/sentinel-masters.json
@@ -0,0 +1,16 @@
+{
+ "MASTERS": {
+ "summary": "List the monitored masters",
+ "complexity": "O(N) where N is the number of masters",
+ "group": "sentinel",
+ "since": "2.8.4",
+ "arity": 2,
+ "container": "SENTINEL",
+ "function": "sentinelCommand",
+ "command_flags": [
+ "ADMIN",
+ "SENTINEL",
+ "ONLY_SENTINEL"
+ ]
+ }
+}
diff --git a/src/commands/sentinel-monitor.json b/src/commands/sentinel-monitor.json
new file mode 100644
index 0000000..2c01df9
--- /dev/null
+++ b/src/commands/sentinel-monitor.json
@@ -0,0 +1,34 @@
+{
+ "MONITOR": {
+ "summary": "Start monitoring",
+ "complexity": "O(1)",
+ "group": "sentinel",
+ "since": "2.8.4",
+ "arity": 6,
+ "container": "SENTINEL",
+ "function": "sentinelCommand",
+ "command_flags": [
+ "ADMIN",
+ "SENTINEL",
+ "ONLY_SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "name",
+ "type": "string"
+ },
+ {
+ "name": "ip",
+ "type": "string"
+ },
+ {
+ "name": "port",
+ "type": "integer"
+ },
+ {
+ "name": "quorum",
+ "type": "integer"
+ }
+ ]
+ }
+}
diff --git a/src/commands/sentinel-myid.json b/src/commands/sentinel-myid.json
new file mode 100644
index 0000000..1f85859
--- /dev/null
+++ b/src/commands/sentinel-myid.json
@@ -0,0 +1,16 @@
+{
+ "MYID": {
+ "summary": "Get the Sentinel instance ID",
+ "complexity": "O(1)",
+ "group": "sentinel",
+ "since": "6.2.0",
+ "arity": 2,
+ "container": "SENTINEL",
+ "function": "sentinelCommand",
+ "command_flags": [
+ "ADMIN",
+ "SENTINEL",
+ "ONLY_SENTINEL"
+ ]
+ }
+}
diff --git a/src/commands/sentinel-pending-scripts.json b/src/commands/sentinel-pending-scripts.json
new file mode 100644
index 0000000..6ef33ec
--- /dev/null
+++ b/src/commands/sentinel-pending-scripts.json
@@ -0,0 +1,15 @@
+{
+ "PENDING-SCRIPTS": {
+ "summary": "Get information about pending scripts",
+ "group": "sentinel",
+ "since": "2.8.4",
+ "arity": 2,
+ "container": "SENTINEL",
+ "function": "sentinelCommand",
+ "command_flags": [
+ "ADMIN",
+ "SENTINEL",
+ "ONLY_SENTINEL"
+ ]
+ }
+}
diff --git a/src/commands/sentinel-remove.json b/src/commands/sentinel-remove.json
new file mode 100644
index 0000000..2e655e7
--- /dev/null
+++ b/src/commands/sentinel-remove.json
@@ -0,0 +1,22 @@
+{
+ "REMOVE": {
+ "summary": "Stop monitoring",
+ "complexity": "O(1)",
+ "group": "sentinel",
+ "since": "2.8.4",
+ "arity": 3,
+ "container": "SENTINEL",
+ "function": "sentinelCommand",
+ "command_flags": [
+ "ADMIN",
+ "SENTINEL",
+ "ONLY_SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "master-name",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/sentinel-replicas.json b/src/commands/sentinel-replicas.json
new file mode 100644
index 0000000..dc175a7
--- /dev/null
+++ b/src/commands/sentinel-replicas.json
@@ -0,0 +1,22 @@
+{
+ "REPLICAS": {
+ "summary": "List the monitored replicas",
+ "complexity": "O(N) where N is the number of replicas",
+ "group": "sentinel",
+ "since": "5.0.0",
+ "arity": 3,
+ "container": "SENTINEL",
+ "function": "sentinelCommand",
+ "command_flags": [
+ "ADMIN",
+ "SENTINEL",
+ "ONLY_SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "master-name",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/sentinel-reset.json b/src/commands/sentinel-reset.json
new file mode 100644
index 0000000..9c60c6b
--- /dev/null
+++ b/src/commands/sentinel-reset.json
@@ -0,0 +1,22 @@
+{
+ "RESET": {
+ "summary": "Reset masters by name pattern",
+ "complexity": "O(N) where N is the number of monitored masters",
+ "group": "sentinel",
+ "since": "2.8.4",
+ "arity": 3,
+ "container": "SENTINEL",
+ "function": "sentinelCommand",
+ "command_flags": [
+ "ADMIN",
+ "SENTINEL",
+ "ONLY_SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "pattern",
+ "type": "pattern"
+ }
+ ]
+ }
+}
diff --git a/src/commands/sentinel-sentinels.json b/src/commands/sentinel-sentinels.json
new file mode 100644
index 0000000..01319ce
--- /dev/null
+++ b/src/commands/sentinel-sentinels.json
@@ -0,0 +1,22 @@
+{
+ "SENTINELS": {
+ "summary": "List the Sentinel instances",
+ "complexity": "O(N) where N is the number of Sentinels",
+ "group": "sentinel",
+ "since": "2.8.4",
+ "arity": 3,
+ "container": "SENTINEL",
+ "function": "sentinelCommand",
+ "command_flags": [
+ "ADMIN",
+ "SENTINEL",
+ "ONLY_SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "master-name",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/sentinel-set.json b/src/commands/sentinel-set.json
new file mode 100644
index 0000000..afe0360
--- /dev/null
+++ b/src/commands/sentinel-set.json
@@ -0,0 +1,37 @@
+{
+ "SET": {
+ "summary": "Change the configuration of a monitored master",
+ "complexity": "O(1)",
+ "group": "sentinel",
+ "since": "2.8.4",
+ "arity": -5,
+ "container": "SENTINEL",
+ "function": "sentinelCommand",
+ "command_flags": [
+ "ADMIN",
+ "SENTINEL",
+ "ONLY_SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "master-name",
+ "type": "string"
+ },
+ {
+ "name": "option_value",
+ "type": "block",
+ "multiple": true,
+ "arguments": [
+ {
+ "name": "option",
+ "type": "string"
+ },
+ {
+ "name": "value",
+ "type": "string"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/sentinel-simulate-failure.json b/src/commands/sentinel-simulate-failure.json
new file mode 100644
index 0000000..4912a8b
--- /dev/null
+++ b/src/commands/sentinel-simulate-failure.json
@@ -0,0 +1,37 @@
+{
+ "SIMULATE-FAILURE": {
+ "summary": "Simulate failover scenarios",
+ "group": "sentinel",
+ "since": "3.2.0",
+ "arity": -3,
+ "container": "SENTINEL",
+ "function": "sentinelCommand",
+ "command_flags": [
+ "ADMIN",
+ "SENTINEL",
+ "ONLY_SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "mode",
+ "type": "oneof",
+ "optional":true,
+ "multiple":true,
+ "arguments": [
+ {
+ "name": "crash-after-election",
+ "type": "pure-token"
+ },
+ {
+ "name": "crash-after-promotion",
+ "type": "pure-token"
+ },
+ {
+ "name": "help",
+ "type": "pure-token"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/sentinel-slaves.json b/src/commands/sentinel-slaves.json
new file mode 100644
index 0000000..bce5c76
--- /dev/null
+++ b/src/commands/sentinel-slaves.json
@@ -0,0 +1,27 @@
+{
+ "SLAVES": {
+ "summary": "List the monitored slaves",
+ "complexity": "O(N) where N is the number of slaves",
+ "group": "sentinel",
+ "since": "2.8.0",
+ "arity": 3,
+ "container": "SENTINEL",
+ "function": "sentinelCommand",
+ "deprecated_since": "5.0.0",
+ "replaced_by": "`SENTINEL REPLICAS`",
+ "doc_flags": [
+ "DEPRECATED"
+ ],
+ "command_flags": [
+ "ADMIN",
+ "SENTINEL",
+ "ONLY_SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "master-name",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/sentinel.json b/src/commands/sentinel.json
new file mode 100644
index 0000000..81466e2
--- /dev/null
+++ b/src/commands/sentinel.json
@@ -0,0 +1,14 @@
+{
+ "SENTINEL": {
+ "summary": "A container for Sentinel commands",
+ "complexity": "Depends on subcommand.",
+ "group": "sentinel",
+ "since": "2.8.4",
+ "arity": -2,
+ "command_flags": [
+ "ADMIN",
+ "SENTINEL",
+ "ONLY_SENTINEL"
+ ]
+ }
+}
diff --git a/src/commands/set.json b/src/commands/set.json
new file mode 100644
index 0000000..688d534
--- /dev/null
+++ b/src/commands/set.json
@@ -0,0 +1,132 @@
+{
+ "SET": {
+ "summary": "Set the string value of a key",
+ "complexity": "O(1)",
+ "group": "string",
+ "since": "1.0.0",
+ "arity": -3,
+ "function": "setCommand",
+ "get_keys_function": "setGetKeys",
+ "history": [
+ [
+ "2.6.12",
+ "Added the `EX`, `PX`, `NX` and `XX` options."
+ ],
+ [
+ "6.0.0",
+ "Added the `KEEPTTL` option."
+ ],
+ [
+ "6.2.0",
+ "Added the `GET`, `EXAT` and `PXAT` option."
+ ],
+ [
+ "7.0.0",
+ "Allowed the `NX` and `GET` options to be used together."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "STRING"
+ ],
+ "key_specs": [
+ {
+ "notes": "RW and ACCESS due to the optional `GET` argument",
+ "flags": [
+ "RW",
+ "ACCESS",
+ "UPDATE",
+ "VARIABLE_FLAGS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "value",
+ "type": "string"
+ },
+ {
+ "name": "condition",
+ "type": "oneof",
+ "optional": true,
+ "since": "2.6.12",
+ "arguments": [
+ {
+ "name": "nx",
+ "type": "pure-token",
+ "token": "NX"
+ },
+ {
+ "name": "xx",
+ "type": "pure-token",
+ "token": "XX"
+ }
+ ]
+ },
+ {
+ "name": "get",
+ "token": "GET",
+ "type": "pure-token",
+ "optional": true,
+ "since": "6.2.0"
+ },
+ {
+ "name": "expiration",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "seconds",
+ "type": "integer",
+ "token": "EX",
+ "since": "2.6.12"
+ },
+ {
+ "name": "milliseconds",
+ "type": "integer",
+ "token": "PX",
+ "since": "2.6.12"
+ },
+ {
+ "name": "unix-time-seconds",
+ "type": "unix-time",
+ "token": "EXAT",
+ "since": "6.2.0"
+ },
+ {
+ "name": "unix-time-milliseconds",
+ "type": "unix-time",
+ "token": "PXAT",
+ "since": "6.2.0"
+ },
+ {
+ "name": "keepttl",
+ "type": "pure-token",
+ "token": "KEEPTTL",
+ "since": "6.0.0"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/setbit.json b/src/commands/setbit.json
new file mode 100644
index 0000000..723dfd8
--- /dev/null
+++ b/src/commands/setbit.json
@@ -0,0 +1,53 @@
+{
+ "SETBIT": {
+ "summary": "Sets or clears the bit at offset in the string value stored at key",
+ "complexity": "O(1)",
+ "group": "bitmap",
+ "since": "2.2.0",
+ "arity": 4,
+ "function": "setbitCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "BITMAP"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "offset",
+ "type": "integer"
+ },
+ {
+ "name": "value",
+ "type": "integer"
+ }
+ ]
+ }
+}
diff --git a/src/commands/setex.json b/src/commands/setex.json
new file mode 100644
index 0000000..b7c43db
--- /dev/null
+++ b/src/commands/setex.json
@@ -0,0 +1,52 @@
+{
+ "SETEX": {
+ "summary": "Set the value and expiration of a key",
+ "complexity": "O(1)",
+ "group": "string",
+ "since": "2.0.0",
+ "arity": 4,
+ "function": "setexCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "STRING"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "OW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "seconds",
+ "type": "integer"
+ },
+ {
+ "name": "value",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/setnx.json b/src/commands/setnx.json
new file mode 100644
index 0000000..5332a13
--- /dev/null
+++ b/src/commands/setnx.json
@@ -0,0 +1,49 @@
+{
+ "SETNX": {
+ "summary": "Set the value of a key, only if the key does not exist",
+ "complexity": "O(1)",
+ "group": "string",
+ "since": "1.0.0",
+ "arity": 3,
+ "function": "setnxCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "FAST"
+ ],
+ "acl_categories": [
+ "STRING"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "OW",
+ "INSERT"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "value",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/setrange.json b/src/commands/setrange.json
new file mode 100644
index 0000000..d133671
--- /dev/null
+++ b/src/commands/setrange.json
@@ -0,0 +1,52 @@
+{
+ "SETRANGE": {
+ "summary": "Overwrite part of a string at key starting at the specified offset",
+ "complexity": "O(1), not counting the time taken to copy the new string in place. Usually, this string is very small so the amortized complexity is O(1). Otherwise, complexity is O(M) with M being the length of the value argument.",
+ "group": "string",
+ "since": "2.2.0",
+ "arity": 4,
+ "function": "setrangeCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "STRING"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "offset",
+ "type": "integer"
+ },
+ {
+ "name": "value",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/shutdown.json b/src/commands/shutdown.json
new file mode 100644
index 0000000..63da3ca
--- /dev/null
+++ b/src/commands/shutdown.json
@@ -0,0 +1,65 @@
+{
+ "SHUTDOWN": {
+ "summary": "Synchronously save the dataset to disk and then shut down the server",
+ "complexity": "O(N) when saving, where N is the total number of keys in all databases when saving data, otherwise O(1)",
+ "group": "server",
+ "since": "1.0.0",
+ "arity": -1,
+ "function": "shutdownCommand",
+ "history": [
+ [
+ "7.0.0",
+ "Added the `NOW`, `FORCE` and `ABORT` modifiers."
+ ]
+ ],
+ "command_flags": [
+ "ADMIN",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "NO_MULTI",
+ "SENTINEL",
+ "ALLOW_BUSY"
+ ],
+ "arguments": [
+ {
+ "name": "nosave_save",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "nosave",
+ "type": "pure-token",
+ "token": "NOSAVE"
+ },
+ {
+ "name": "save",
+ "type": "pure-token",
+ "token": "SAVE"
+ }
+ ]
+ },
+ {
+ "name": "now",
+ "type": "pure-token",
+ "token": "NOW",
+ "optional": true,
+ "since": "7.0.0"
+ },
+ {
+ "name": "force",
+ "type": "pure-token",
+ "token": "FORCE",
+ "optional": true,
+ "since": "7.0.0"
+ },
+ {
+ "name": "abort",
+ "type": "pure-token",
+ "token": "ABORT",
+ "optional": true,
+ "since": "7.0.0"
+ }
+ ]
+ }
+}
diff --git a/src/commands/sinter.json b/src/commands/sinter.json
new file mode 100644
index 0000000..63f9e86
--- /dev/null
+++ b/src/commands/sinter.json
@@ -0,0 +1,47 @@
+{
+ "SINTER": {
+ "summary": "Intersect multiple sets",
+ "complexity": "O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.",
+ "group": "set",
+ "since": "1.0.0",
+ "arity": -2,
+ "function": "sinterCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "SET"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT_ORDER"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -1,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/sintercard.json b/src/commands/sintercard.json
new file mode 100644
index 0000000..8047f7a
--- /dev/null
+++ b/src/commands/sintercard.json
@@ -0,0 +1,55 @@
+{
+ "SINTERCARD": {
+ "summary": "Intersect multiple sets and return the cardinality of the result",
+ "complexity": "O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.",
+ "group": "set",
+ "since": "7.0.0",
+ "arity": -3,
+ "function": "sinterCardCommand",
+ "get_keys_function": "sintercardGetKeys",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "SET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "keynum": {
+ "keynumidx": 0,
+ "firstkey": 1,
+ "step": 1
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "numkeys",
+ "type": "integer"
+ },
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ },
+ {
+ "token": "LIMIT",
+ "name": "limit",
+ "type": "integer",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/sinterstore.json b/src/commands/sinterstore.json
new file mode 100644
index 0000000..85e462e
--- /dev/null
+++ b/src/commands/sinterstore.json
@@ -0,0 +1,68 @@
+{
+ "SINTERSTORE": {
+ "summary": "Intersect multiple sets and store the resulting set in a key",
+ "complexity": "O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.",
+ "group": "set",
+ "since": "1.0.0",
+ "arity": -3,
+ "function": "sinterstoreCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "SET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -1,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "destination",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 1,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/sismember.json b/src/commands/sismember.json
new file mode 100644
index 0000000..7a814b8
--- /dev/null
+++ b/src/commands/sismember.json
@@ -0,0 +1,47 @@
+{
+ "SISMEMBER": {
+ "summary": "Determine if a given value is a member of a set",
+ "complexity": "O(1)",
+ "group": "set",
+ "since": "1.0.0",
+ "arity": 3,
+ "function": "sismemberCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "SET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "member",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/slaveof.json b/src/commands/slaveof.json
new file mode 100644
index 0000000..bc99989
--- /dev/null
+++ b/src/commands/slaveof.json
@@ -0,0 +1,59 @@
+{
+ "SLAVEOF": {
+ "summary": "Make the server a replica of another instance, or promote it as master.",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "1.0.0",
+ "arity": 3,
+ "function": "replicaofCommand",
+ "deprecated_since": "5.0.0",
+ "replaced_by": "`REPLICAOF`",
+ "doc_flags": [
+ "DEPRECATED"
+ ],
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "NOSCRIPT",
+ "STALE"
+ ],
+ "arguments": [
+ {
+ "name": "args",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "host-port",
+ "type": "block",
+ "arguments": [
+ {
+ "name": "host",
+ "type": "string"
+ },
+ {
+ "name": "port",
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "name": "no-one",
+ "type": "block",
+ "arguments": [
+ {
+ "name": "no",
+ "type": "pure-token",
+ "token": "NO"
+ },
+ {
+ "name": "one",
+ "type": "pure-token",
+ "token": "ONE"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/slowlog-get.json b/src/commands/slowlog-get.json
new file mode 100644
index 0000000..1121264
--- /dev/null
+++ b/src/commands/slowlog-get.json
@@ -0,0 +1,33 @@
+{
+ "GET": {
+ "summary": "Get the slow log's entries",
+ "complexity": "O(N) where N is the number of entries returned",
+ "group": "server",
+ "since": "2.2.12",
+ "arity": -2,
+ "container": "SLOWLOG",
+ "function": "slowlogCommand",
+ "history": [
+ [
+ "4.0.0",
+ "Added client IP address, port and name to the reply."
+ ]
+ ],
+ "command_flags": [
+ "ADMIN",
+ "LOADING",
+ "STALE"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:ALL_NODES",
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "arguments": [
+ {
+ "name": "count",
+ "type": "integer",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/slowlog-help.json b/src/commands/slowlog-help.json
new file mode 100644
index 0000000..cf2707d
--- /dev/null
+++ b/src/commands/slowlog-help.json
@@ -0,0 +1,15 @@
+{
+ "HELP": {
+ "summary": "Show helpful text about the different subcommands",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "6.2.0",
+ "arity": 2,
+ "container": "SLOWLOG",
+ "function": "slowlogCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE"
+ ]
+ }
+}
diff --git a/src/commands/slowlog-len.json b/src/commands/slowlog-len.json
new file mode 100644
index 0000000..9a8969b
--- /dev/null
+++ b/src/commands/slowlog-len.json
@@ -0,0 +1,21 @@
+{
+ "LEN": {
+ "summary": "Get the slow log's length",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "2.2.12",
+ "arity": 2,
+ "container": "SLOWLOG",
+ "function": "slowlogCommand",
+ "command_flags": [
+ "ADMIN",
+ "LOADING",
+ "STALE"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:ALL_NODES",
+ "RESPONSE_POLICY:AGG_SUM",
+ "NONDETERMINISTIC_OUTPUT"
+ ]
+ }
+}
diff --git a/src/commands/slowlog-reset.json b/src/commands/slowlog-reset.json
new file mode 100644
index 0000000..36c0241
--- /dev/null
+++ b/src/commands/slowlog-reset.json
@@ -0,0 +1,20 @@
+{
+ "RESET": {
+ "summary": "Clear all entries from the slow log",
+ "complexity": "O(N) where N is the number of entries in the slowlog",
+ "group": "server",
+ "since": "2.2.12",
+ "arity": 2,
+ "container": "SLOWLOG",
+ "function": "slowlogCommand",
+ "command_flags": [
+ "ADMIN",
+ "LOADING",
+ "STALE"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:ALL_NODES",
+ "RESPONSE_POLICY:ALL_SUCCEEDED"
+ ]
+ }
+}
diff --git a/src/commands/slowlog.json b/src/commands/slowlog.json
new file mode 100644
index 0000000..fab266c
--- /dev/null
+++ b/src/commands/slowlog.json
@@ -0,0 +1,9 @@
+{
+ "SLOWLOG": {
+ "summary": "A container for slow log commands",
+ "complexity": "Depends on subcommand.",
+ "group": "server",
+ "since": "2.2.12",
+ "arity": -2
+ }
+}
diff --git a/src/commands/smembers.json b/src/commands/smembers.json
new file mode 100644
index 0000000..b5d4ff2
--- /dev/null
+++ b/src/commands/smembers.json
@@ -0,0 +1,46 @@
+{
+ "SMEMBERS": {
+ "summary": "Get all the members in a set",
+ "complexity": "O(N) where N is the set cardinality.",
+ "group": "set",
+ "since": "1.0.0",
+ "arity": 2,
+ "function": "sinterCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "SET"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT_ORDER"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/smismember.json b/src/commands/smismember.json
new file mode 100644
index 0000000..cb4dd2e
--- /dev/null
+++ b/src/commands/smismember.json
@@ -0,0 +1,49 @@
+{
+ "SMISMEMBER": {
+ "summary": "Returns the membership associated with the given elements for a set",
+ "complexity": "O(N) where N is the number of elements being checked for membership",
+ "group": "set",
+ "since": "6.2.0",
+ "arity": -3,
+ "function": "smismemberCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "SET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "member",
+ "type": "string",
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/smove.json b/src/commands/smove.json
new file mode 100644
index 0000000..de5756d
--- /dev/null
+++ b/src/commands/smove.json
@@ -0,0 +1,72 @@
+{
+ "SMOVE": {
+ "summary": "Move a member from one set to another",
+ "complexity": "O(1)",
+ "group": "set",
+ "since": "1.0.0",
+ "arity": 4,
+ "function": "smoveCommand",
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "SET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "RW",
+ "INSERT"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "source",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "destination",
+ "type": "key",
+ "key_spec_index": 1
+ },
+ {
+ "name": "member",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/sort.json b/src/commands/sort.json
new file mode 100644
index 0000000..3f077e0
--- /dev/null
+++ b/src/commands/sort.json
@@ -0,0 +1,136 @@
+{
+ "SORT": {
+ "summary": "Sort the elements in a list, set or sorted set",
+ "complexity": "O(N+M*log(M)) where N is the number of elements in the list or set to sort, and M the number of returned elements. When the elements are not sorted, complexity is O(N).",
+ "group": "generic",
+ "since": "1.0.0",
+ "arity": -2,
+ "function": "sortCommand",
+ "get_keys_function": "sortGetKeys",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "SET",
+ "SORTEDSET",
+ "LIST",
+ "DANGEROUS"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "notes": "For the optional BY/GET keyword. It is marked 'unknown' because the key names derive from the content of the key we sort",
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "unknown": null
+ },
+ "find_keys": {
+ "unknown": null
+ }
+ },
+ {
+ "notes": "For the optional STORE keyword. It is marked 'unknown' because the keyword can appear anywhere in the argument array",
+ "flags": [
+ "OW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "unknown": null
+ },
+ "find_keys": {
+ "unknown": null
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "token": "BY",
+ "name": "pattern",
+ "type": "pattern",
+ "key_spec_index": 1,
+ "optional": true
+ },
+ {
+ "token": "LIMIT",
+ "name": "offset_count",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "offset",
+ "type": "integer"
+ },
+ {
+ "name": "count",
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "token": "GET",
+ "name": "pattern",
+ "key_spec_index": 1,
+ "type": "pattern",
+ "optional": true,
+ "multiple": true,
+ "multiple_token": true
+ },
+ {
+ "name": "order",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "asc",
+ "type": "pure-token",
+ "token": "ASC"
+ },
+ {
+ "name": "desc",
+ "type": "pure-token",
+ "token": "DESC"
+ }
+ ]
+ },
+ {
+ "name": "sorting",
+ "token": "ALPHA",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "token": "STORE",
+ "name": "destination",
+ "type": "key",
+ "key_spec_index": 2,
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/sort_ro.json b/src/commands/sort_ro.json
new file mode 100644
index 0000000..83b48d1
--- /dev/null
+++ b/src/commands/sort_ro.json
@@ -0,0 +1,115 @@
+{
+ "SORT_RO": {
+ "summary": "Sort the elements in a list, set or sorted set. Read-only variant of SORT.",
+ "complexity": "O(N+M*log(M)) where N is the number of elements in the list or set to sort, and M the number of returned elements. When the elements are not sorted, complexity is O(N).",
+ "group": "generic",
+ "since": "7.0.0",
+ "arity": -2,
+ "function": "sortroCommand",
+ "get_keys_function": "sortROGetKeys",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "SET",
+ "SORTEDSET",
+ "LIST",
+ "DANGEROUS"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "notes": "For the optional BY/GET keyword. It is marked 'unknown' because the key names derive from the content of the key we sort",
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "unknown": null
+ },
+ "find_keys": {
+ "unknown": null
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "token": "BY",
+ "name": "pattern",
+ "type": "pattern",
+ "key_spec_index": 1,
+ "optional": true
+ },
+ {
+ "token": "LIMIT",
+ "name": "offset_count",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "offset",
+ "type": "integer"
+ },
+ {
+ "name": "count",
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "token": "GET",
+ "name": "pattern",
+ "key_spec_index": 1,
+ "type": "pattern",
+ "optional": true,
+ "multiple": true,
+ "multiple_token": true
+ },
+ {
+ "name": "order",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "asc",
+ "type": "pure-token",
+ "token": "ASC"
+ },
+ {
+ "name": "desc",
+ "type": "pure-token",
+ "token": "DESC"
+ }
+ ]
+ },
+ {
+ "name": "sorting",
+ "token": "ALPHA",
+ "type": "pure-token",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/spop.json b/src/commands/spop.json
new file mode 100644
index 0000000..c93e426
--- /dev/null
+++ b/src/commands/spop.json
@@ -0,0 +1,60 @@
+{
+ "SPOP": {
+ "summary": "Remove and return one or multiple random members from a set",
+ "complexity": "Without the count argument O(1), otherwise O(N) where N is the value of the passed count.",
+ "group": "set",
+ "since": "1.0.0",
+ "arity": -2,
+ "function": "spopCommand",
+ "history": [
+ [
+ "3.2.0",
+ "Added the `count` argument."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "SET"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "count",
+ "type": "integer",
+ "optional": true,
+ "since": "3.2.0"
+ }
+ ]
+ }
+}
diff --git a/src/commands/spublish.json b/src/commands/spublish.json
new file mode 100644
index 0000000..6ed748f
--- /dev/null
+++ b/src/commands/spublish.json
@@ -0,0 +1,46 @@
+{
+ "SPUBLISH": {
+ "summary": "Post a message to a shard channel",
+ "complexity": "O(N) where N is the number of clients subscribed to the receiving shard channel.",
+ "group": "pubsub",
+ "since": "7.0.0",
+ "arity": 3,
+ "function": "spublishCommand",
+ "command_flags": [
+ "PUBSUB",
+ "LOADING",
+ "STALE",
+ "FAST",
+ "MAY_REPLICATE"
+ ],
+ "arguments": [
+ {
+ "name": "shardchannel",
+ "type": "string"
+ },
+ {
+ "name": "message",
+ "type": "string"
+ }
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "NOT_KEY"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ]
+ }
+}
diff --git a/src/commands/srandmember.json b/src/commands/srandmember.json
new file mode 100644
index 0000000..67efc87
--- /dev/null
+++ b/src/commands/srandmember.json
@@ -0,0 +1,58 @@
+{
+ "SRANDMEMBER": {
+ "summary": "Get one or multiple random members from a set",
+ "complexity": "Without the count argument O(1), otherwise O(N) where N is the absolute value of the passed count.",
+ "group": "set",
+ "since": "1.0.0",
+ "arity": -2,
+ "function": "srandmemberCommand",
+ "history": [
+ [
+ "2.6.0",
+ "Added the optional `count` argument."
+ ]
+ ],
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "SET"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "count",
+ "type": "integer",
+ "optional": true,
+ "since": "2.6.0"
+ }
+ ]
+ }
+}
diff --git a/src/commands/srem.json b/src/commands/srem.json
new file mode 100644
index 0000000..82433a4
--- /dev/null
+++ b/src/commands/srem.json
@@ -0,0 +1,55 @@
+{
+ "SREM": {
+ "summary": "Remove one or more members from a set",
+ "complexity": "O(N) where N is the number of members to be removed.",
+ "group": "set",
+ "since": "1.0.0",
+ "arity": -3,
+ "function": "sremCommand",
+ "history": [
+ [
+ "2.4.0",
+ "Accepts multiple `member` arguments."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "SET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "member",
+ "type": "string",
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/sscan.json b/src/commands/sscan.json
new file mode 100644
index 0000000..f8f21ad
--- /dev/null
+++ b/src/commands/sscan.json
@@ -0,0 +1,62 @@
+{
+ "SSCAN": {
+ "summary": "Incrementally iterate Set elements",
+ "complexity": "O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection..",
+ "group": "set",
+ "since": "2.8.0",
+ "arity": -3,
+ "function": "sscanCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "SET"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "cursor",
+ "type": "integer"
+ },
+ {
+ "token": "MATCH",
+ "name": "pattern",
+ "type": "pattern",
+ "optional": true
+ },
+ {
+ "token": "COUNT",
+ "name": "count",
+ "type": "integer",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/ssubscribe.json b/src/commands/ssubscribe.json
new file mode 100644
index 0000000..a63d520
--- /dev/null
+++ b/src/commands/ssubscribe.json
@@ -0,0 +1,42 @@
+{
+ "SSUBSCRIBE": {
+ "summary": "Listen for messages published to the given shard channels",
+ "complexity": "O(N) where N is the number of shard channels to subscribe to.",
+ "group": "pubsub",
+ "since": "7.0.0",
+ "arity": -2,
+ "function": "ssubscribeCommand",
+ "command_flags": [
+ "PUBSUB",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE"
+ ],
+ "arguments": [
+ {
+ "name": "shardchannel",
+ "type": "string",
+ "multiple": true
+ }
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "NOT_KEY"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -1,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ]
+ }
+}
diff --git a/src/commands/strlen.json b/src/commands/strlen.json
new file mode 100644
index 0000000..a5e2d6f
--- /dev/null
+++ b/src/commands/strlen.json
@@ -0,0 +1,43 @@
+{
+ "STRLEN": {
+ "summary": "Get the length of the value stored in a key",
+ "complexity": "O(1)",
+ "group": "string",
+ "since": "2.2.0",
+ "arity": 2,
+ "function": "strlenCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "STRING"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/subscribe.json b/src/commands/subscribe.json
new file mode 100644
index 0000000..fa6ac07
--- /dev/null
+++ b/src/commands/subscribe.json
@@ -0,0 +1,25 @@
+{
+ "SUBSCRIBE": {
+ "summary": "Listen for messages published to the given channels",
+ "complexity": "O(N) where N is the number of channels to subscribe to.",
+ "group": "pubsub",
+ "since": "2.0.0",
+ "arity": -2,
+ "function": "subscribeCommand",
+ "history": [],
+ "command_flags": [
+ "PUBSUB",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "channel",
+ "type": "string",
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/substr.json b/src/commands/substr.json
new file mode 100644
index 0000000..9f3f2bf
--- /dev/null
+++ b/src/commands/substr.json
@@ -0,0 +1,56 @@
+{
+ "SUBSTR": {
+ "summary": "Get a substring of the string stored at a key",
+ "complexity": "O(N) where N is the length of the returned string. The complexity is ultimately determined by the returned length, but because creating a substring from an existing string is very cheap, it can be considered O(1) for small strings.",
+ "group": "string",
+ "since": "1.0.0",
+ "arity": 4,
+ "function": "getrangeCommand",
+ "deprecated_since": "2.0.0",
+ "replaced_by": "`GETRANGE`",
+ "doc_flags": [
+ "DEPRECATED"
+ ],
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "STRING"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "start",
+ "type": "integer"
+ },
+ {
+ "name": "end",
+ "type": "integer"
+ }
+ ]
+ }
+}
diff --git a/src/commands/sunion.json b/src/commands/sunion.json
new file mode 100644
index 0000000..9bdccac
--- /dev/null
+++ b/src/commands/sunion.json
@@ -0,0 +1,47 @@
+{
+ "SUNION": {
+ "summary": "Add multiple sets",
+ "complexity": "O(N) where N is the total number of elements in all given sets.",
+ "group": "set",
+ "since": "1.0.0",
+ "arity": -2,
+ "function": "sunionCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "SET"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT_ORDER"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -1,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/sunionstore.json b/src/commands/sunionstore.json
new file mode 100644
index 0000000..f4ef0b3
--- /dev/null
+++ b/src/commands/sunionstore.json
@@ -0,0 +1,68 @@
+{
+ "SUNIONSTORE": {
+ "summary": "Add multiple sets and store the resulting set in a key",
+ "complexity": "O(N) where N is the total number of elements in all given sets.",
+ "group": "set",
+ "since": "1.0.0",
+ "arity": -3,
+ "function": "sunionstoreCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "SET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "OW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -1,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "destination",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 1,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/sunsubscribe.json b/src/commands/sunsubscribe.json
new file mode 100644
index 0000000..df9ae9c
--- /dev/null
+++ b/src/commands/sunsubscribe.json
@@ -0,0 +1,43 @@
+{
+ "SUNSUBSCRIBE": {
+ "summary": "Stop listening for messages posted to the given shard channels",
+ "complexity": "O(N) where N is the number of clients already subscribed to a shard channel.",
+ "group": "pubsub",
+ "since": "7.0.0",
+ "arity": -1,
+ "function": "sunsubscribeCommand",
+ "command_flags": [
+ "PUBSUB",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE"
+ ],
+ "arguments": [
+ {
+ "name": "shardchannel",
+ "type": "string",
+ "optional": true,
+ "multiple": true
+ }
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "NOT_KEY"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -1,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ]
+ }
+}
diff --git a/src/commands/swapdb.json b/src/commands/swapdb.json
new file mode 100644
index 0000000..6ea2bae
--- /dev/null
+++ b/src/commands/swapdb.json
@@ -0,0 +1,28 @@
+{
+ "SWAPDB": {
+ "summary": "Swaps two Redis databases",
+ "complexity": "O(N) where N is the count of clients watching or blocking on keys from both databases.",
+ "group": "server",
+ "since": "4.0.0",
+ "arity": 3,
+ "function": "swapdbCommand",
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "KEYSPACE",
+ "DANGEROUS"
+ ],
+ "arguments": [
+ {
+ "name": "index1",
+ "type": "integer"
+ },
+ {
+ "name": "index2",
+ "type": "integer"
+ }
+ ]
+ }
+}
diff --git a/src/commands/sync.json b/src/commands/sync.json
new file mode 100644
index 0000000..85672d6
--- /dev/null
+++ b/src/commands/sync.json
@@ -0,0 +1,15 @@
+{
+ "SYNC": {
+ "summary": "Internal command used for replication",
+ "group": "server",
+ "since": "1.0.0",
+ "arity": 1,
+ "function": "syncCommand",
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "NO_MULTI",
+ "NOSCRIPT"
+ ]
+ }
+}
diff --git a/src/commands/time.json b/src/commands/time.json
new file mode 100644
index 0000000..b5711a3
--- /dev/null
+++ b/src/commands/time.json
@@ -0,0 +1,18 @@
+{
+ "TIME": {
+ "summary": "Return the current server time",
+ "complexity": "O(1)",
+ "group": "server",
+ "since": "2.6.0",
+ "arity": 1,
+ "function": "timeCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE",
+ "FAST"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ]
+ }
+}
diff --git a/src/commands/touch.json b/src/commands/touch.json
new file mode 100644
index 0000000..ef4c1c9
--- /dev/null
+++ b/src/commands/touch.json
@@ -0,0 +1,48 @@
+{
+ "TOUCH": {
+ "summary": "Alters the last access time of a key(s). Returns the number of existing keys specified.",
+ "complexity": "O(N) where N is the number of keys that will be touched.",
+ "group": "generic",
+ "since": "3.2.1",
+ "arity": -2,
+ "function": "touchCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:MULTI_SHARD",
+ "RESPONSE_POLICY:AGG_SUM"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -1,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/ttl.json b/src/commands/ttl.json
new file mode 100644
index 0000000..36297ee
--- /dev/null
+++ b/src/commands/ttl.json
@@ -0,0 +1,53 @@
+{
+ "TTL": {
+ "summary": "Get the time to live for a key in seconds",
+ "complexity": "O(1)",
+ "group": "generic",
+ "since": "1.0.0",
+ "arity": 2,
+ "function": "ttlCommand",
+ "history": [
+ [
+ "2.8.0",
+ "Added the -2 reply."
+ ]
+ ],
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/type.json b/src/commands/type.json
new file mode 100644
index 0000000..df8e453
--- /dev/null
+++ b/src/commands/type.json
@@ -0,0 +1,43 @@
+{
+ "TYPE": {
+ "summary": "Determine the type stored at key",
+ "complexity": "O(1)",
+ "group": "generic",
+ "since": "1.0.0",
+ "arity": 2,
+ "function": "typeCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/unlink.json b/src/commands/unlink.json
new file mode 100644
index 0000000..511e728
--- /dev/null
+++ b/src/commands/unlink.json
@@ -0,0 +1,49 @@
+{
+ "UNLINK": {
+ "summary": "Delete a key asynchronously in another thread. Otherwise it is just as DEL, but non blocking.",
+ "complexity": "O(1) for each key removed regardless of its size. Then the command does O(N) work in a different thread in order to reclaim memory, where N is the number of allocations the deleted objects where composed of.",
+ "group": "generic",
+ "since": "4.0.0",
+ "arity": -2,
+ "function": "unlinkCommand",
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "KEYSPACE"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:MULTI_SHARD",
+ "RESPONSE_POLICY:AGG_SUM"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RM",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -1,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/unsubscribe.json b/src/commands/unsubscribe.json
new file mode 100644
index 0000000..d98aaa2
--- /dev/null
+++ b/src/commands/unsubscribe.json
@@ -0,0 +1,25 @@
+{
+ "UNSUBSCRIBE": {
+ "summary": "Stop listening for messages posted to the given channels",
+ "complexity": "O(N) where N is the number of clients already subscribed to a channel.",
+ "group": "pubsub",
+ "since": "2.0.0",
+ "arity": -1,
+ "function": "unsubscribeCommand",
+ "command_flags": [
+ "PUBSUB",
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "SENTINEL"
+ ],
+ "arguments": [
+ {
+ "name": "channel",
+ "type": "string",
+ "optional": true,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/unwatch.json b/src/commands/unwatch.json
new file mode 100644
index 0000000..820ea5b
--- /dev/null
+++ b/src/commands/unwatch.json
@@ -0,0 +1,20 @@
+{
+ "UNWATCH": {
+ "summary": "Forget about all watched keys",
+ "complexity": "O(1)",
+ "group": "transactions",
+ "since": "2.2.0",
+ "arity": 1,
+ "function": "unwatchCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "FAST",
+ "ALLOW_BUSY"
+ ],
+ "acl_categories": [
+ "TRANSACTION"
+ ]
+ }
+}
diff --git a/src/commands/wait.json b/src/commands/wait.json
new file mode 100644
index 0000000..4930932
--- /dev/null
+++ b/src/commands/wait.json
@@ -0,0 +1,30 @@
+{
+ "WAIT": {
+ "summary": "Wait for the synchronous replication of all the write commands sent in the context of the current connection",
+ "complexity": "O(1)",
+ "group": "generic",
+ "since": "3.0.0",
+ "arity": 3,
+ "function": "waitCommand",
+ "command_flags": [
+ "NOSCRIPT"
+ ],
+ "acl_categories": [
+ "CONNECTION"
+ ],
+ "command_tips": [
+ "REQUEST_POLICY:ALL_SHARDS",
+ "RESPONSE_POLICY:AGG_MIN"
+ ],
+ "arguments": [
+ {
+ "name": "numreplicas",
+ "type": "integer"
+ },
+ {
+ "name": "timeout",
+ "type": "integer"
+ }
+ ]
+ }
+}
diff --git a/src/commands/watch.json b/src/commands/watch.json
new file mode 100644
index 0000000..0a9e370
--- /dev/null
+++ b/src/commands/watch.json
@@ -0,0 +1,47 @@
+{
+ "WATCH": {
+ "summary": "Watch the given keys to determine execution of the MULTI/EXEC block",
+ "complexity": "O(1) for every key.",
+ "group": "transactions",
+ "since": "2.2.0",
+ "arity": -2,
+ "function": "watchCommand",
+ "command_flags": [
+ "NOSCRIPT",
+ "LOADING",
+ "STALE",
+ "FAST",
+ "ALLOW_BUSY"
+ ],
+ "acl_categories": [
+ "TRANSACTION"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -1,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/xack.json b/src/commands/xack.json
new file mode 100644
index 0000000..b9d0aa4
--- /dev/null
+++ b/src/commands/xack.json
@@ -0,0 +1,53 @@
+{
+ "XACK": {
+ "summary": "Marks a pending message as correctly processed, effectively removing it from the pending entries list of the consumer group. Return value of the command is the number of messages successfully acknowledged, that is, the IDs we were actually able to resolve in the PEL.",
+ "complexity": "O(1) for each message ID processed.",
+ "group": "stream",
+ "since": "5.0.0",
+ "arity": -4,
+ "function": "xackCommand",
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "STREAM"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "group",
+ "type": "string"
+ },
+ {
+ "name": "ID",
+ "type": "string",
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/xadd.json b/src/commands/xadd.json
new file mode 100644
index 0000000..e8914eb
--- /dev/null
+++ b/src/commands/xadd.json
@@ -0,0 +1,148 @@
+{
+ "XADD": {
+ "summary": "Appends a new entry to a stream",
+ "complexity": "O(1) when adding a new entry, O(N) when trimming where N being the number of entries evicted.",
+ "group": "stream",
+ "since": "5.0.0",
+ "arity": -5,
+ "function": "xaddCommand",
+ "history": [
+ [
+ "6.2.0",
+ "Added the `NOMKSTREAM` option, `MINID` trimming strategy and the `LIMIT` option."
+ ],
+ [
+ "7.0.0",
+ "Added support for the `<ms>-*` explicit ID form."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "FAST"
+ ],
+ "acl_categories": [
+ "STREAM"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "key_specs": [
+ {
+ "notes": "UPDATE instead of INSERT because of the optional trimming feature",
+ "flags": [
+ "RW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "token": "NOMKSTREAM",
+ "name": "nomkstream",
+ "type": "pure-token",
+ "optional": true,
+ "since": "6.2.0"
+ },
+ {
+ "name": "trim",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "strategy",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "maxlen",
+ "type": "pure-token",
+ "token": "MAXLEN"
+ },
+ {
+ "name": "minid",
+ "type": "pure-token",
+ "token": "MINID",
+ "since": "6.2.0"
+ }
+ ]
+ },
+ {
+ "name": "operator",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "equal",
+ "type": "pure-token",
+ "token": "="
+ },
+ {
+ "name": "approximately",
+ "type": "pure-token",
+ "token": "~"
+ }
+ ]
+ },
+ {
+ "name": "threshold",
+ "type": "string"
+ },
+ {
+ "token": "LIMIT",
+ "name": "count",
+ "type": "integer",
+ "optional": true,
+ "since": "6.2.0"
+ }
+ ]
+ },
+ {
+ "name": "id_or_auto",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "auto_id",
+ "type": "pure-token",
+ "token": "*"
+ },
+ {
+ "name": "ID",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "field_value",
+ "type": "block",
+ "multiple": true,
+ "arguments": [
+ {
+ "name": "field",
+ "type": "string"
+ },
+ {
+ "name": "value",
+ "type": "string"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/xautoclaim.json b/src/commands/xautoclaim.json
new file mode 100644
index 0000000..726bf38
--- /dev/null
+++ b/src/commands/xautoclaim.json
@@ -0,0 +1,81 @@
+{
+ "XAUTOCLAIM": {
+ "summary": "Changes (or acquires) ownership of messages in a consumer group, as if the messages were delivered to the specified consumer.",
+ "complexity": "O(1) if COUNT is small.",
+ "group": "stream",
+ "since": "6.2.0",
+ "arity": -6,
+ "function": "xautoclaimCommand",
+ "history": [
+ [
+ "7.0.0",
+ "Added an element to the reply array, containing deleted entries the command cleared from the PEL"
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "STREAM"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "group",
+ "type": "string"
+ },
+ {
+ "name": "consumer",
+ "type": "string"
+ },
+ {
+ "name": "min-idle-time",
+ "type": "string"
+ },
+ {
+ "name": "start",
+ "type": "string"
+ },
+ {
+ "token": "COUNT",
+ "name": "count",
+ "type": "integer",
+ "optional": true
+ },
+ {
+ "name": "justid",
+ "token": "JUSTID",
+ "type": "pure-token",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/xclaim.json b/src/commands/xclaim.json
new file mode 100644
index 0000000..0456109
--- /dev/null
+++ b/src/commands/xclaim.json
@@ -0,0 +1,100 @@
+{
+ "XCLAIM": {
+ "summary": "Changes (or acquires) ownership of a message in a consumer group, as if the message was delivered to the specified consumer.",
+ "complexity": "O(log N) with N being the number of messages in the PEL of the consumer group.",
+ "group": "stream",
+ "since": "5.0.0",
+ "arity": -6,
+ "function": "xclaimCommand",
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "STREAM"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "group",
+ "type": "string"
+ },
+ {
+ "name": "consumer",
+ "type": "string"
+ },
+ {
+ "name": "min-idle-time",
+ "type": "string"
+ },
+ {
+ "name": "ID",
+ "type": "string",
+ "multiple": true
+ },
+ {
+ "token": "IDLE",
+ "name": "ms",
+ "type": "integer",
+ "optional": true
+ },
+ {
+ "token": "TIME",
+ "name": "unix-time-milliseconds",
+ "type": "unix-time",
+ "optional": true
+ },
+ {
+ "token": "RETRYCOUNT",
+ "name": "count",
+ "type": "integer",
+ "optional": true
+ },
+ {
+ "name": "force",
+ "token": "FORCE",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "name": "justid",
+ "token": "JUSTID",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "name": "id",
+ "token": "LASTID",
+ "type": "string",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/xdel.json b/src/commands/xdel.json
new file mode 100644
index 0000000..061ea80
--- /dev/null
+++ b/src/commands/xdel.json
@@ -0,0 +1,49 @@
+{
+ "XDEL": {
+ "summary": "Removes the specified entries from the stream. Returns the number of items actually deleted, that may be different from the number of IDs passed in case certain IDs do not exist.",
+ "complexity": "O(1) for each single item to delete in the stream, regardless of the stream size.",
+ "group": "stream",
+ "since": "5.0.0",
+ "arity": -3,
+ "function": "xdelCommand",
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "STREAM"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "ID",
+ "type": "string",
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/xgroup-create.json b/src/commands/xgroup-create.json
new file mode 100644
index 0000000..2b1ee03
--- /dev/null
+++ b/src/commands/xgroup-create.json
@@ -0,0 +1,82 @@
+{
+ "CREATE": {
+ "summary": "Create a consumer group.",
+ "complexity": "O(1)",
+ "group": "stream",
+ "since": "5.0.0",
+ "arity": -5,
+ "container": "XGROUP",
+ "function": "xgroupCommand",
+ "history": [
+ [
+ "7.0.0",
+ "Added the `entries_read` named argument."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "STREAM"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "INSERT"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "groupname",
+ "type": "string"
+ },
+ {
+ "name": "id",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "ID",
+ "type": "string"
+ },
+ {
+ "name": "new_id",
+ "type": "pure-token",
+ "token": "$"
+ }
+ ]
+ },
+ {
+ "token": "MKSTREAM",
+ "name": "mkstream",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "token": "ENTRIESREAD",
+ "name": "entries_read",
+ "type": "integer",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/xgroup-createconsumer.json b/src/commands/xgroup-createconsumer.json
new file mode 100644
index 0000000..30c450e
--- /dev/null
+++ b/src/commands/xgroup-createconsumer.json
@@ -0,0 +1,53 @@
+{
+ "CREATECONSUMER": {
+ "summary": "Create a consumer in a consumer group.",
+ "complexity": "O(1)",
+ "group": "stream",
+ "since": "6.2.0",
+ "arity": 5,
+ "container": "XGROUP",
+ "function": "xgroupCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "STREAM"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "INSERT"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "groupname",
+ "type": "string"
+ },
+ {
+ "name": "consumername",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/xgroup-delconsumer.json b/src/commands/xgroup-delconsumer.json
new file mode 100644
index 0000000..e98c3bb
--- /dev/null
+++ b/src/commands/xgroup-delconsumer.json
@@ -0,0 +1,52 @@
+{
+ "DELCONSUMER": {
+ "summary": "Delete a consumer from a consumer group.",
+ "complexity": "O(1)",
+ "group": "stream",
+ "since": "5.0.0",
+ "arity": 5,
+ "container": "XGROUP",
+ "function": "xgroupCommand",
+ "command_flags": [
+ "WRITE"
+ ],
+ "acl_categories": [
+ "STREAM"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "groupname",
+ "type": "string"
+ },
+ {
+ "name": "consumername",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/xgroup-destroy.json b/src/commands/xgroup-destroy.json
new file mode 100644
index 0000000..79be27a
--- /dev/null
+++ b/src/commands/xgroup-destroy.json
@@ -0,0 +1,48 @@
+{
+ "DESTROY": {
+ "summary": "Destroy a consumer group.",
+ "complexity": "O(N) where N is the number of entries in the group's pending entries list (PEL).",
+ "group": "stream",
+ "since": "5.0.0",
+ "arity": 4,
+ "container": "XGROUP",
+ "function": "xgroupCommand",
+ "command_flags": [
+ "WRITE"
+ ],
+ "acl_categories": [
+ "STREAM"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "groupname",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/xgroup-help.json b/src/commands/xgroup-help.json
new file mode 100644
index 0000000..4c5a2b9
--- /dev/null
+++ b/src/commands/xgroup-help.json
@@ -0,0 +1,18 @@
+{
+ "HELP": {
+ "summary": "Show helpful text about the different subcommands",
+ "complexity": "O(1)",
+ "group": "stream",
+ "since": "5.0.0",
+ "arity": 2,
+ "container": "XGROUP",
+ "function": "xgroupCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE"
+ ],
+ "acl_categories": [
+ "STREAM"
+ ]
+ }
+}
diff --git a/src/commands/xgroup-setid.json b/src/commands/xgroup-setid.json
new file mode 100644
index 0000000..af4b83c
--- /dev/null
+++ b/src/commands/xgroup-setid.json
@@ -0,0 +1,75 @@
+{
+ "SETID": {
+ "summary": "Set a consumer group to an arbitrary last delivered ID value.",
+ "complexity": "O(1)",
+ "group": "stream",
+ "since": "5.0.0",
+ "arity": -5,
+ "container": "XGROUP",
+ "function": "xgroupCommand",
+ "history": [
+ [
+ "7.0.0",
+ "Added the optional `entries_read` argument."
+ ]
+ ],
+ "command_flags": [
+ "WRITE"
+ ],
+ "acl_categories": [
+ "STREAM"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "groupname",
+ "type": "string"
+ },
+ {
+ "name": "id",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "ID",
+ "type": "string"
+ },
+ {
+ "name": "new_id",
+ "type": "pure-token",
+ "token": "$"
+ }
+ ]
+ },
+ {
+ "name": "entries_read",
+ "token": "ENTRIESREAD",
+ "type": "integer",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/xgroup.json b/src/commands/xgroup.json
new file mode 100644
index 0000000..2af53cf
--- /dev/null
+++ b/src/commands/xgroup.json
@@ -0,0 +1,9 @@
+{
+ "XGROUP": {
+ "summary": "A container for consumer groups commands",
+ "complexity": "Depends on subcommand.",
+ "group": "stream",
+ "since": "5.0.0",
+ "arity": -2
+ }
+}
diff --git a/src/commands/xinfo-consumers.json b/src/commands/xinfo-consumers.json
new file mode 100644
index 0000000..634b528
--- /dev/null
+++ b/src/commands/xinfo-consumers.json
@@ -0,0 +1,51 @@
+{
+ "CONSUMERS": {
+ "summary": "List the consumers in a consumer group",
+ "complexity": "O(1)",
+ "group": "stream",
+ "since": "5.0.0",
+ "arity": 4,
+ "container": "XINFO",
+ "function": "xinfoCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "STREAM"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "groupname",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/xinfo-groups.json b/src/commands/xinfo-groups.json
new file mode 100644
index 0000000..e9b61ba
--- /dev/null
+++ b/src/commands/xinfo-groups.json
@@ -0,0 +1,50 @@
+{
+ "GROUPS": {
+ "summary": "List the consumer groups of a stream",
+ "complexity": "O(1)",
+ "group": "stream",
+ "since": "5.0.0",
+ "arity": 3,
+ "container": "XINFO",
+ "history": [
+ [
+ "7.0.0",
+ "Added the `entries-read` and `lag` fields"
+ ]
+ ],
+ "function": "xinfoCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "STREAM"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/xinfo-help.json b/src/commands/xinfo-help.json
new file mode 100644
index 0000000..e114683
--- /dev/null
+++ b/src/commands/xinfo-help.json
@@ -0,0 +1,18 @@
+{
+ "HELP": {
+ "summary": "Show helpful text about the different subcommands",
+ "complexity": "O(1)",
+ "group": "stream",
+ "since": "5.0.0",
+ "arity": 2,
+ "container": "XINFO",
+ "function": "xinfoCommand",
+ "command_flags": [
+ "LOADING",
+ "STALE"
+ ],
+ "acl_categories": [
+ "STREAM"
+ ]
+ }
+}
diff --git a/src/commands/xinfo-stream.json b/src/commands/xinfo-stream.json
new file mode 100644
index 0000000..36c427f
--- /dev/null
+++ b/src/commands/xinfo-stream.json
@@ -0,0 +1,68 @@
+{
+ "STREAM": {
+ "summary": "Get information about a stream",
+ "complexity": "O(1)",
+ "group": "stream",
+ "since": "5.0.0",
+ "arity": -3,
+ "container": "XINFO",
+ "history": [
+ [
+ "6.0.0",
+ "Added the `FULL` modifier."
+ ],
+ [
+ "7.0.0",
+ "Added the `max-deleted-entry-id`, `entries-added`, `recorded-first-entry-id`, `entries-read` and `lag` fields"
+ ]
+ ],
+ "function": "xinfoCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "STREAM"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "full",
+ "token": "FULL",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "token": "COUNT",
+ "name": "count",
+ "type": "integer",
+ "optional": true
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/xinfo.json b/src/commands/xinfo.json
new file mode 100644
index 0000000..c969e59
--- /dev/null
+++ b/src/commands/xinfo.json
@@ -0,0 +1,9 @@
+{
+ "XINFO": {
+ "summary": "A container for stream introspection commands",
+ "complexity": "Depends on subcommand.",
+ "group": "stream",
+ "since": "5.0.0",
+ "arity": -2
+ }
+}
diff --git a/src/commands/xlen.json b/src/commands/xlen.json
new file mode 100644
index 0000000..9adc261
--- /dev/null
+++ b/src/commands/xlen.json
@@ -0,0 +1,43 @@
+{
+ "XLEN": {
+ "summary": "Return the number of entries in a stream",
+ "complexity": "O(1)",
+ "group": "stream",
+ "since": "5.0.0",
+ "arity": 2,
+ "function": "xlenCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "STREAM"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/xpending.json b/src/commands/xpending.json
new file mode 100644
index 0000000..cd8ee8d
--- /dev/null
+++ b/src/commands/xpending.json
@@ -0,0 +1,87 @@
+{
+ "XPENDING": {
+ "summary": "Return information and entries from a stream consumer group pending entries list, that are messages fetched but never acknowledged.",
+ "complexity": "O(N) with N being the number of elements returned, so asking for a small fixed number of entries per call is O(1). O(M), where M is the total number of entries scanned when used with the IDLE filter. When the command returns just the summary and the list of consumers is small, it runs in O(1) time; otherwise, an additional O(N) time for iterating every consumer.",
+ "group": "stream",
+ "since": "5.0.0",
+ "arity": -3,
+ "function": "xpendingCommand",
+ "history": [
+ [
+ "6.2.0",
+ "Added the `IDLE` option and exclusive range intervals."
+ ]
+ ],
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "STREAM"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "group",
+ "type": "string"
+ },
+ {
+ "name": "filters",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "token": "IDLE",
+ "name": "min-idle-time",
+ "type": "integer",
+ "optional": true,
+ "since": "6.2.0"
+ },
+ {
+ "name": "start",
+ "type": "string"
+ },
+ {
+ "name": "end",
+ "type": "string"
+ },
+ {
+ "name": "count",
+ "type": "integer"
+ },
+ {
+ "name": "consumer",
+ "type": "string",
+ "optional": true
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/xrange.json b/src/commands/xrange.json
new file mode 100644
index 0000000..9a3ddea
--- /dev/null
+++ b/src/commands/xrange.json
@@ -0,0 +1,63 @@
+{
+ "XRANGE": {
+ "summary": "Return a range of elements in a stream, with IDs matching the specified IDs interval",
+ "complexity": "O(N) with N being the number of elements being returned. If N is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1).",
+ "group": "stream",
+ "since": "5.0.0",
+ "arity": -4,
+ "function": "xrangeCommand",
+ "history": [
+ [
+ "6.2.0",
+ "Added exclusive ranges."
+ ]
+ ],
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "STREAM"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "start",
+ "type": "string"
+ },
+ {
+ "name": "end",
+ "type": "string"
+ },
+ {
+ "token": "COUNT",
+ "name": "count",
+ "type": "integer",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/xread.json b/src/commands/xread.json
new file mode 100644
index 0000000..8f66d7e
--- /dev/null
+++ b/src/commands/xread.json
@@ -0,0 +1,72 @@
+{
+ "XREAD": {
+ "summary": "Return never seen elements in multiple streams, with IDs greater than the ones reported by the caller for each stream. Can block.",
+ "complexity": "For each stream mentioned: O(N) with N being the number of elements being returned, it means that XREAD-ing with a fixed COUNT is O(1). Note that when the BLOCK option is used, XADD will pay O(M) time in order to serve the M clients blocked on the stream getting new data.",
+ "group": "stream",
+ "since": "5.0.0",
+ "arity": -4,
+ "function": "xreadCommand",
+ "get_keys_function": "xreadGetKeys",
+ "command_flags": [
+ "BLOCKING",
+ "READONLY",
+ "BLOCKING"
+ ],
+ "acl_categories": [
+ "STREAM"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "keyword": {
+ "keyword": "STREAMS",
+ "startfrom": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -1,
+ "step": 1,
+ "limit": 2
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "token": "COUNT",
+ "name": "count",
+ "type": "integer",
+ "optional": true
+ },
+ {
+ "token": "BLOCK",
+ "name": "milliseconds",
+ "type": "integer",
+ "optional": true
+ },
+ {
+ "name": "streams",
+ "token": "STREAMS",
+ "type": "block",
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ },
+ {
+ "name": "ID",
+ "type": "string",
+ "multiple": true
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/xreadgroup.json b/src/commands/xreadgroup.json
new file mode 100644
index 0000000..a148147
--- /dev/null
+++ b/src/commands/xreadgroup.json
@@ -0,0 +1,92 @@
+{
+ "XREADGROUP": {
+ "summary": "Return new entries from a stream using a consumer group, or access the history of the pending entries for a given consumer. Can block.",
+ "complexity": "For each stream mentioned: O(M) with M being the number of elements returned. If M is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1). On the other side when XREADGROUP blocks, XADD will pay the O(N) time in order to serve the N clients blocked on the stream getting new data.",
+ "group": "stream",
+ "since": "5.0.0",
+ "arity": -7,
+ "function": "xreadCommand",
+ "get_keys_function": "xreadGetKeys",
+ "command_flags": [
+ "BLOCKING",
+ "WRITE"
+ ],
+ "acl_categories": [
+ "STREAM"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "keyword": {
+ "keyword": "STREAMS",
+ "startfrom": 4
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -1,
+ "step": 1,
+ "limit": 2
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "token": "GROUP",
+ "name": "group_consumer",
+ "type": "block",
+ "arguments": [
+ {
+ "name": "group",
+ "type": "string"
+ },
+ {
+ "name": "consumer",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "token": "COUNT",
+ "name": "count",
+ "type": "integer",
+ "optional": true
+ },
+ {
+ "token": "BLOCK",
+ "name": "milliseconds",
+ "type": "integer",
+ "optional": true
+ },
+ {
+ "name": "noack",
+ "token": "NOACK",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "name": "streams",
+ "token": "STREAMS",
+ "type": "block",
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ },
+ {
+ "name": "ID",
+ "type": "string",
+ "multiple": true
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/xrevrange.json b/src/commands/xrevrange.json
new file mode 100644
index 0000000..65d81db
--- /dev/null
+++ b/src/commands/xrevrange.json
@@ -0,0 +1,63 @@
+{
+ "XREVRANGE": {
+ "summary": "Return a range of elements in a stream, with IDs matching the specified IDs interval, in reverse order (from greater to smaller IDs) compared to XRANGE",
+ "complexity": "O(N) with N being the number of elements returned. If N is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1).",
+ "group": "stream",
+ "since": "5.0.0",
+ "arity": -4,
+ "function": "xrevrangeCommand",
+ "history": [
+ [
+ "6.2.0",
+ "Added exclusive ranges."
+ ]
+ ],
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "STREAM"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "end",
+ "type": "string"
+ },
+ {
+ "name": "start",
+ "type": "string"
+ },
+ {
+ "token": "COUNT",
+ "name": "count",
+ "type": "integer",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/xsetid.json b/src/commands/xsetid.json
new file mode 100644
index 0000000..ace0c4b
--- /dev/null
+++ b/src/commands/xsetid.json
@@ -0,0 +1,69 @@
+{
+ "XSETID": {
+ "summary": "An internal command for replicating stream values",
+ "complexity": "O(1)",
+ "group": "stream",
+ "since": "5.0.0",
+ "arity": -3,
+ "function": "xsetidCommand",
+ "history": [
+ [
+ "7.0.0",
+ "Added the `entries_added` and `max_deleted_entry_id` arguments."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "FAST"
+ ],
+ "acl_categories": [
+ "STREAM"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "last-id",
+ "type": "string"
+ },
+ {
+ "name": "entries_added",
+ "token": "ENTRIESADDED",
+ "type": "integer",
+ "optional": true,
+ "since": "7.0.0"
+ },
+ {
+ "name": "max_deleted_entry_id",
+ "token": "MAXDELETEDID",
+ "type": "string",
+ "optional": true,
+ "since": "7.0.0"
+ }
+ ]
+ }
+}
diff --git a/src/commands/xtrim.json b/src/commands/xtrim.json
new file mode 100644
index 0000000..03c48eb
--- /dev/null
+++ b/src/commands/xtrim.json
@@ -0,0 +1,103 @@
+{
+ "XTRIM": {
+ "summary": "Trims the stream to (approximately if '~' is passed) a certain size",
+ "complexity": "O(N), with N being the number of evicted entries. Constant times are very small however, since entries are organized in macro nodes containing multiple entries that can be released with a single deallocation.",
+ "group": "stream",
+ "since": "5.0.0",
+ "arity": -4,
+ "function": "xtrimCommand",
+ "history": [
+ [
+ "6.2.0",
+ "Added the `MINID` trimming strategy and the `LIMIT` option."
+ ]
+ ],
+ "command_flags": [
+ "WRITE"
+ ],
+ "acl_categories": [
+ "STREAM"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "trim",
+ "type": "block",
+ "arguments": [
+ {
+ "name": "strategy",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "maxlen",
+ "type": "pure-token",
+ "token": "MAXLEN"
+ },
+ {
+ "name": "minid",
+ "type": "pure-token",
+ "token": "MINID",
+ "since": "6.2.0"
+ }
+ ]
+ },
+ {
+ "name": "operator",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "equal",
+ "type": "pure-token",
+ "token": "="
+ },
+ {
+ "name": "approximately",
+ "type": "pure-token",
+ "token": "~"
+ }
+ ]
+ },
+ {
+ "name": "threshold",
+ "type": "string"
+ },
+ {
+ "token": "LIMIT",
+ "name": "count",
+ "type": "integer",
+ "optional": true,
+ "since": "6.2.0"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/zadd.json b/src/commands/zadd.json
new file mode 100644
index 0000000..300db11
--- /dev/null
+++ b/src/commands/zadd.json
@@ -0,0 +1,124 @@
+{
+ "ZADD": {
+ "summary": "Add one or more members to a sorted set, or update its score if it already exists",
+ "complexity": "O(log(N)) for each item added, where N is the number of elements in the sorted set.",
+ "group": "sorted_set",
+ "since": "1.2.0",
+ "arity": -4,
+ "function": "zaddCommand",
+ "history": [
+ [
+ "2.4.0",
+ "Accepts multiple elements."
+ ],
+ [
+ "3.0.2",
+ "Added the `XX`, `NX`, `CH` and `INCR` options."
+ ],
+ [
+ "6.2.0",
+ "Added the `GT` and `LT` options."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "FAST"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "condition",
+ "type": "oneof",
+ "optional": true,
+ "since": "3.0.2",
+ "arguments": [
+ {
+ "name": "nx",
+ "type": "pure-token",
+ "token": "NX"
+ },
+ {
+ "name": "xx",
+ "type": "pure-token",
+ "token": "XX"
+ }
+ ]
+ },
+ {
+ "name": "comparison",
+ "type": "oneof",
+ "optional": true,
+ "since": "6.2.0",
+ "arguments": [
+ {
+ "name": "gt",
+ "type": "pure-token",
+ "token": "GT"
+ },
+ {
+ "name": "lt",
+ "type": "pure-token",
+ "token": "LT"
+ }
+ ]
+ },
+ {
+ "name": "change",
+ "token": "CH",
+ "type": "pure-token",
+ "optional": true,
+ "since": "3.0.2"
+ },
+ {
+ "name": "increment",
+ "token": "INCR",
+ "type": "pure-token",
+ "optional": true,
+ "since": "3.0.2"
+ },
+ {
+ "name": "score_member",
+ "type": "block",
+ "multiple": true,
+ "arguments": [
+ {
+ "name": "score",
+ "type": "double"
+ },
+ {
+ "name": "member",
+ "type": "string"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/zcard.json b/src/commands/zcard.json
new file mode 100644
index 0000000..84022a7
--- /dev/null
+++ b/src/commands/zcard.json
@@ -0,0 +1,43 @@
+{
+ "ZCARD": {
+ "summary": "Get the number of members in a sorted set",
+ "complexity": "O(1)",
+ "group": "sorted_set",
+ "since": "1.2.0",
+ "arity": 2,
+ "function": "zcardCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ }
+ ]
+ }
+}
diff --git a/src/commands/zcount.json b/src/commands/zcount.json
new file mode 100644
index 0000000..6572d4a
--- /dev/null
+++ b/src/commands/zcount.json
@@ -0,0 +1,52 @@
+{
+ "ZCOUNT": {
+ "summary": "Count the members in a sorted set with scores within the given values",
+ "complexity": "O(log(N)) with N being the number of elements in the sorted set.",
+ "group": "sorted_set",
+ "since": "2.0.0",
+ "arity": 4,
+ "function": "zcountCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "min",
+ "type": "double"
+ },
+ {
+ "name": "max",
+ "type": "double"
+ }
+ ]
+ }
+}
diff --git a/src/commands/zdiff.json b/src/commands/zdiff.json
new file mode 100644
index 0000000..3eee289
--- /dev/null
+++ b/src/commands/zdiff.json
@@ -0,0 +1,55 @@
+{
+ "ZDIFF": {
+ "summary": "Subtract multiple sorted sets",
+ "complexity": "O(L + (N-K)log(N)) worst case where L is the total number of elements in all the sets, N is the size of the first set, and K is the size of the result set.",
+ "group": "sorted_set",
+ "since": "6.2.0",
+ "arity": -3,
+ "function": "zdiffCommand",
+ "get_keys_function": "zunionInterDiffGetKeys",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "keynum": {
+ "keynumidx": 0,
+ "firstkey": 1,
+ "step": 1
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "numkeys",
+ "type": "integer"
+ },
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ },
+ {
+ "name": "withscores",
+ "token": "WITHSCORES",
+ "type": "pure-token",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/zdiffstore.json b/src/commands/zdiffstore.json
new file mode 100644
index 0000000..7fc0102
--- /dev/null
+++ b/src/commands/zdiffstore.json
@@ -0,0 +1,73 @@
+{
+ "ZDIFFSTORE": {
+ "summary": "Subtract multiple sorted sets and store the resulting sorted set in a new key",
+ "complexity": "O(L + (N-K)log(N)) worst case where L is the total number of elements in all the sets, N is the size of the first set, and K is the size of the result set.",
+ "group": "sorted_set",
+ "since": "6.2.0",
+ "arity": -4,
+ "function": "zdiffstoreCommand",
+ "get_keys_function": "zunionInterDiffStoreGetKeys",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "OW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "keynum": {
+ "keynumidx": 0,
+ "firstkey": 1,
+ "step": 1
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "destination",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "numkeys",
+ "type": "integer"
+ },
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 1,
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/zincrby.json b/src/commands/zincrby.json
new file mode 100644
index 0000000..2ebafe0
--- /dev/null
+++ b/src/commands/zincrby.json
@@ -0,0 +1,54 @@
+{
+ "ZINCRBY": {
+ "summary": "Increment the score of a member in a sorted set",
+ "complexity": "O(log(N)) where N is the number of elements in the sorted set.",
+ "group": "sorted_set",
+ "since": "1.2.0",
+ "arity": 4,
+ "function": "zincrbyCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM",
+ "FAST"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "increment",
+ "type": "integer"
+ },
+ {
+ "name": "member",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/zinter.json b/src/commands/zinter.json
new file mode 100644
index 0000000..b05dc8d
--- /dev/null
+++ b/src/commands/zinter.json
@@ -0,0 +1,85 @@
+{
+ "ZINTER": {
+ "summary": "Intersect multiple sorted sets",
+ "complexity": "O(N*K)+O(M*log(M)) worst case with N being the smallest input sorted set, K being the number of input sorted sets and M being the number of elements in the resulting sorted set.",
+ "group": "sorted_set",
+ "since": "6.2.0",
+ "arity": -3,
+ "function": "zinterCommand",
+ "get_keys_function": "zunionInterDiffGetKeys",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "keynum": {
+ "keynumidx": 0,
+ "firstkey": 1,
+ "step": 1
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "numkeys",
+ "type": "integer"
+ },
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ },
+ {
+ "token": "WEIGHTS",
+ "name": "weight",
+ "type": "integer",
+ "optional": true,
+ "multiple": true
+ },
+ {
+ "token": "AGGREGATE",
+ "name": "aggregate",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "sum",
+ "type": "pure-token",
+ "token": "SUM"
+ },
+ {
+ "name": "min",
+ "type": "pure-token",
+ "token": "MIN"
+ },
+ {
+ "name": "max",
+ "type": "pure-token",
+ "token": "MAX"
+ }
+ ]
+ },
+ {
+ "name": "withscores",
+ "token": "WITHSCORES",
+ "type": "pure-token",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/zintercard.json b/src/commands/zintercard.json
new file mode 100644
index 0000000..2c23599
--- /dev/null
+++ b/src/commands/zintercard.json
@@ -0,0 +1,55 @@
+{
+ "ZINTERCARD": {
+ "summary": "Intersect multiple sorted sets and return the cardinality of the result",
+ "complexity": "O(N*K) worst case with N being the smallest input sorted set, K being the number of input sorted sets.",
+ "group": "sorted_set",
+ "since": "7.0.0",
+ "arity": -3,
+ "function": "zinterCardCommand",
+ "get_keys_function": "zunionInterDiffGetKeys",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "keynum": {
+ "keynumidx": 0,
+ "firstkey": 1,
+ "step": 1
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "numkeys",
+ "type": "integer"
+ },
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ },
+ {
+ "token": "LIMIT",
+ "name": "limit",
+ "type": "integer",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/zinterstore.json b/src/commands/zinterstore.json
new file mode 100644
index 0000000..bd40460
--- /dev/null
+++ b/src/commands/zinterstore.json
@@ -0,0 +1,103 @@
+{
+ "ZINTERSTORE": {
+ "summary": "Intersect multiple sorted sets and store the resulting sorted set in a new key",
+ "complexity": "O(N*K)+O(M*log(M)) worst case with N being the smallest input sorted set, K being the number of input sorted sets and M being the number of elements in the resulting sorted set.",
+ "group": "sorted_set",
+ "since": "2.0.0",
+ "arity": -4,
+ "function": "zinterstoreCommand",
+ "get_keys_function": "zunionInterDiffStoreGetKeys",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "OW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "keynum": {
+ "keynumidx": 0,
+ "firstkey": 1,
+ "step": 1
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "destination",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "numkeys",
+ "type": "integer"
+ },
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 1,
+ "multiple": true
+ },
+ {
+ "token": "WEIGHTS",
+ "name": "weight",
+ "type": "integer",
+ "optional": true,
+ "multiple": true
+ },
+ {
+ "token": "AGGREGATE",
+ "name": "aggregate",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "sum",
+ "type": "pure-token",
+ "token": "SUM"
+ },
+ {
+ "name": "min",
+ "type": "pure-token",
+ "token": "MIN"
+ },
+ {
+ "name": "max",
+ "type": "pure-token",
+ "token": "MAX"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/zlexcount.json b/src/commands/zlexcount.json
new file mode 100644
index 0000000..5dff46e
--- /dev/null
+++ b/src/commands/zlexcount.json
@@ -0,0 +1,52 @@
+{
+ "ZLEXCOUNT": {
+ "summary": "Count the number of members in a sorted set between a given lexicographical range",
+ "complexity": "O(log(N)) with N being the number of elements in the sorted set.",
+ "group": "sorted_set",
+ "since": "2.8.9",
+ "arity": 4,
+ "function": "zlexcountCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "min",
+ "type": "string"
+ },
+ {
+ "name": "max",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/zmpop.json b/src/commands/zmpop.json
new file mode 100644
index 0000000..2edeaf2
--- /dev/null
+++ b/src/commands/zmpop.json
@@ -0,0 +1,72 @@
+{
+ "ZMPOP": {
+ "summary": "Remove and return members with scores in a sorted set",
+ "complexity": "O(K) + O(M*log(N)) where K is the number of provided keys, N being the number of elements in the sorted set, and M being the number of elements popped.",
+ "group": "sorted_set",
+ "since": "7.0.0",
+ "arity": -4,
+ "function": "zmpopCommand",
+ "get_keys_function": "zmpopGetKeys",
+ "command_flags": [
+ "WRITE"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "keynum": {
+ "keynumidx": 0,
+ "firstkey": 1,
+ "step": 1
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "numkeys",
+ "type": "integer"
+ },
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ },
+ {
+ "name": "where",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "min",
+ "type": "pure-token",
+ "token": "MIN"
+ },
+ {
+ "name": "max",
+ "type": "pure-token",
+ "token": "MAX"
+ }
+ ]
+ },
+ {
+ "token": "COUNT",
+ "name": "count",
+ "type": "integer",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/zmscore.json b/src/commands/zmscore.json
new file mode 100644
index 0000000..4db291f
--- /dev/null
+++ b/src/commands/zmscore.json
@@ -0,0 +1,49 @@
+{
+ "ZMSCORE": {
+ "summary": "Get the score associated with the given members in a sorted set",
+ "complexity": "O(N) where N is the number of members being requested.",
+ "group": "sorted_set",
+ "since": "6.2.0",
+ "arity": -3,
+ "function": "zmscoreCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "member",
+ "type": "string",
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/zpopmax.json b/src/commands/zpopmax.json
new file mode 100644
index 0000000..2e79243
--- /dev/null
+++ b/src/commands/zpopmax.json
@@ -0,0 +1,50 @@
+{
+ "ZPOPMAX": {
+ "summary": "Remove and return members with the highest scores in a sorted set",
+ "complexity": "O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped.",
+ "group": "sorted_set",
+ "since": "5.0.0",
+ "arity": -2,
+ "function": "zpopmaxCommand",
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "count",
+ "type": "integer",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/zpopmin.json b/src/commands/zpopmin.json
new file mode 100644
index 0000000..9ccce2f
--- /dev/null
+++ b/src/commands/zpopmin.json
@@ -0,0 +1,50 @@
+{
+ "ZPOPMIN": {
+ "summary": "Remove and return members with the lowest scores in a sorted set",
+ "complexity": "O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped.",
+ "group": "sorted_set",
+ "since": "5.0.0",
+ "arity": -2,
+ "function": "zpopminCommand",
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "count",
+ "type": "integer",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/zrandmember.json b/src/commands/zrandmember.json
new file mode 100644
index 0000000..e602a15
--- /dev/null
+++ b/src/commands/zrandmember.json
@@ -0,0 +1,63 @@
+{
+ "ZRANDMEMBER": {
+ "summary": "Get one or multiple random elements from a sorted set",
+ "complexity": "O(N) where N is the number of elements returned",
+ "group": "sorted_set",
+ "since": "6.2.0",
+ "arity": -2,
+ "function": "zrandmemberCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "options",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "count",
+ "type": "integer"
+ },
+ {
+ "name": "withscores",
+ "token": "WITHSCORES",
+ "type": "pure-token",
+ "optional": true
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/zrange.json b/src/commands/zrange.json
new file mode 100644
index 0000000..63fb01a
--- /dev/null
+++ b/src/commands/zrange.json
@@ -0,0 +1,105 @@
+{
+ "ZRANGE": {
+ "summary": "Return a range of members in a sorted set",
+ "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.",
+ "group": "sorted_set",
+ "since": "1.2.0",
+ "arity": -4,
+ "function": "zrangeCommand",
+ "history": [
+ [
+ "6.2.0",
+ "Added the `REV`, `BYSCORE`, `BYLEX` and `LIMIT` options."
+ ]
+ ],
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "start",
+ "type": "string"
+ },
+ {
+ "name": "stop",
+ "type": "string"
+ },
+ {
+ "name": "sortby",
+ "type": "oneof",
+ "optional": true,
+ "since": "6.2.0",
+ "arguments": [
+ {
+ "name": "byscore",
+ "type": "pure-token",
+ "token": "BYSCORE"
+ },
+ {
+ "name": "bylex",
+ "type": "pure-token",
+ "token": "BYLEX"
+ }
+ ]
+ },
+ {
+ "name": "rev",
+ "token": "REV",
+ "type": "pure-token",
+ "optional": true,
+ "since": "6.2.0"
+ },
+ {
+ "token": "LIMIT",
+ "name": "offset_count",
+ "type": "block",
+ "optional": true,
+ "since": "6.2.0",
+ "arguments": [
+ {
+ "name": "offset",
+ "type": "integer"
+ },
+ {
+ "name": "count",
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "name": "withscores",
+ "token": "WITHSCORES",
+ "type": "pure-token",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/zrangebylex.json b/src/commands/zrangebylex.json
new file mode 100644
index 0000000..75e82bc
--- /dev/null
+++ b/src/commands/zrangebylex.json
@@ -0,0 +1,72 @@
+{
+ "ZRANGEBYLEX": {
+ "summary": "Return a range of members in a sorted set, by lexicographical range",
+ "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)).",
+ "group": "sorted_set",
+ "since": "2.8.9",
+ "arity": -4,
+ "function": "zrangebylexCommand",
+ "deprecated_since": "6.2.0",
+ "replaced_by": "`ZRANGE` with the `BYLEX` argument",
+ "doc_flags": [
+ "DEPRECATED"
+ ],
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "min",
+ "type": "string"
+ },
+ {
+ "name": "max",
+ "type": "string"
+ },
+ {
+ "token": "LIMIT",
+ "name": "offset_count",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "offset",
+ "type": "integer"
+ },
+ {
+ "name": "count",
+ "type": "integer"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/zrangebyscore.json b/src/commands/zrangebyscore.json
new file mode 100644
index 0000000..d067877
--- /dev/null
+++ b/src/commands/zrangebyscore.json
@@ -0,0 +1,85 @@
+{
+ "ZRANGEBYSCORE": {
+ "summary": "Return a range of members in a sorted set, by score",
+ "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)).",
+ "group": "sorted_set",
+ "since": "1.0.5",
+ "arity": -4,
+ "function": "zrangebyscoreCommand",
+ "history": [
+ [
+ "2.0.0",
+ "Added the `WITHSCORES` modifier."
+ ]
+ ],
+ "deprecated_since": "6.2.0",
+ "replaced_by": "`ZRANGE` with the `BYSCORE` argument",
+ "doc_flags": [
+ "DEPRECATED"
+ ],
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "min",
+ "type": "double"
+ },
+ {
+ "name": "max",
+ "type": "double"
+ },
+ {
+ "name": "withscores",
+ "token": "WITHSCORES",
+ "type": "pure-token",
+ "optional": true,
+ "since": "2.0.0"
+ },
+ {
+ "token": "LIMIT",
+ "name": "offset_count",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "offset",
+ "type": "integer"
+ },
+ {
+ "name": "count",
+ "type": "integer"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/zrangestore.json b/src/commands/zrangestore.json
new file mode 100644
index 0000000..25d9dd7
--- /dev/null
+++ b/src/commands/zrangestore.json
@@ -0,0 +1,114 @@
+{
+ "ZRANGESTORE": {
+ "summary": "Store a range of members from sorted set into another key",
+ "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements stored into the destination key.",
+ "group": "sorted_set",
+ "since": "6.2.0",
+ "arity": -5,
+ "function": "zrangestoreCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "OW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "dst",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "src",
+ "type": "key",
+ "key_spec_index": 1
+ },
+ {
+ "name": "min",
+ "type": "string"
+ },
+ {
+ "name": "max",
+ "type": "string"
+ },
+ {
+ "name": "sortby",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "byscore",
+ "type": "pure-token",
+ "token": "BYSCORE"
+ },
+ {
+ "name": "bylex",
+ "type": "pure-token",
+ "token": "BYLEX"
+ }
+ ]
+ },
+ {
+ "name": "rev",
+ "token": "REV",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "token": "LIMIT",
+ "name": "offset_count",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "offset",
+ "type": "integer"
+ },
+ {
+ "name": "count",
+ "type": "integer"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/zrank.json b/src/commands/zrank.json
new file mode 100644
index 0000000..6d51547
--- /dev/null
+++ b/src/commands/zrank.json
@@ -0,0 +1,48 @@
+{
+ "ZRANK": {
+ "summary": "Determine the index of a member in a sorted set",
+ "complexity": "O(log(N))",
+ "group": "sorted_set",
+ "since": "2.0.0",
+ "arity": 3,
+ "function": "zrankCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "member",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/zrem.json b/src/commands/zrem.json
new file mode 100644
index 0000000..a899400
--- /dev/null
+++ b/src/commands/zrem.json
@@ -0,0 +1,55 @@
+{
+ "ZREM": {
+ "summary": "Remove one or more members from a sorted set",
+ "complexity": "O(M*log(N)) with N being the number of elements in the sorted set and M the number of elements to be removed.",
+ "group": "sorted_set",
+ "since": "1.2.0",
+ "arity": -3,
+ "function": "zremCommand",
+ "history": [
+ [
+ "2.4.0",
+ "Accepts multiple elements."
+ ]
+ ],
+ "command_flags": [
+ "WRITE",
+ "FAST"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "member",
+ "type": "string",
+ "multiple": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/zremrangebylex.json b/src/commands/zremrangebylex.json
new file mode 100644
index 0000000..ad72777
--- /dev/null
+++ b/src/commands/zremrangebylex.json
@@ -0,0 +1,51 @@
+{
+ "ZREMRANGEBYLEX": {
+ "summary": "Remove all members in a sorted set between the given lexicographical range",
+ "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.",
+ "group": "sorted_set",
+ "since": "2.8.9",
+ "arity": 4,
+ "function": "zremrangebylexCommand",
+ "command_flags": [
+ "WRITE"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "min",
+ "type": "string"
+ },
+ {
+ "name": "max",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/zremrangebyrank.json b/src/commands/zremrangebyrank.json
new file mode 100644
index 0000000..62e5055
--- /dev/null
+++ b/src/commands/zremrangebyrank.json
@@ -0,0 +1,51 @@
+{
+ "ZREMRANGEBYRANK": {
+ "summary": "Remove all members in a sorted set within the given indexes",
+ "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.",
+ "group": "sorted_set",
+ "since": "2.0.0",
+ "arity": 4,
+ "function": "zremrangebyrankCommand",
+ "command_flags": [
+ "WRITE"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "start",
+ "type": "integer"
+ },
+ {
+ "name": "stop",
+ "type": "integer"
+ }
+ ]
+ }
+}
diff --git a/src/commands/zremrangebyscore.json b/src/commands/zremrangebyscore.json
new file mode 100644
index 0000000..3f84c33
--- /dev/null
+++ b/src/commands/zremrangebyscore.json
@@ -0,0 +1,51 @@
+{
+ "ZREMRANGEBYSCORE": {
+ "summary": "Remove all members in a sorted set within the given scores",
+ "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.",
+ "group": "sorted_set",
+ "since": "1.2.0",
+ "arity": 4,
+ "function": "zremrangebyscoreCommand",
+ "command_flags": [
+ "WRITE"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "min",
+ "type": "double"
+ },
+ {
+ "name": "max",
+ "type": "double"
+ }
+ ]
+ }
+}
diff --git a/src/commands/zrevrange.json b/src/commands/zrevrange.json
new file mode 100644
index 0000000..66ddc11
--- /dev/null
+++ b/src/commands/zrevrange.json
@@ -0,0 +1,62 @@
+{
+ "ZREVRANGE": {
+ "summary": "Return a range of members in a sorted set, by index, with scores ordered from high to low",
+ "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.",
+ "group": "sorted_set",
+ "since": "1.2.0",
+ "arity": -4,
+ "function": "zrevrangeCommand",
+ "deprecated_since": "6.2.0",
+ "replaced_by": "`ZRANGE` with the `REV` argument",
+ "doc_flags": [
+ "DEPRECATED"
+ ],
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "start",
+ "type": "integer"
+ },
+ {
+ "name": "stop",
+ "type": "integer"
+ },
+ {
+ "name": "withscores",
+ "token": "WITHSCORES",
+ "type": "pure-token",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/zrevrangebylex.json b/src/commands/zrevrangebylex.json
new file mode 100644
index 0000000..34faa93
--- /dev/null
+++ b/src/commands/zrevrangebylex.json
@@ -0,0 +1,72 @@
+{
+ "ZREVRANGEBYLEX": {
+ "summary": "Return a range of members in a sorted set, by lexicographical range, ordered from higher to lower strings.",
+ "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)).",
+ "group": "sorted_set",
+ "since": "2.8.9",
+ "arity": -4,
+ "function": "zrevrangebylexCommand",
+ "deprecated_since": "6.2.0",
+ "replaced_by": "`ZRANGE` with the `REV` and `BYLEX` arguments",
+ "doc_flags": [
+ "DEPRECATED"
+ ],
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "max",
+ "type": "string"
+ },
+ {
+ "name": "min",
+ "type": "string"
+ },
+ {
+ "token": "LIMIT",
+ "name": "offset_count",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "offset",
+ "type": "integer"
+ },
+ {
+ "name": "count",
+ "type": "integer"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/zrevrangebyscore.json b/src/commands/zrevrangebyscore.json
new file mode 100644
index 0000000..9a0152c
--- /dev/null
+++ b/src/commands/zrevrangebyscore.json
@@ -0,0 +1,84 @@
+{
+ "ZREVRANGEBYSCORE": {
+ "summary": "Return a range of members in a sorted set, by score, with scores ordered from high to low",
+ "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)).",
+ "group": "sorted_set",
+ "since": "2.2.0",
+ "arity": -4,
+ "function": "zrevrangebyscoreCommand",
+ "history": [
+ [
+ "2.1.6",
+ "`min` and `max` can be exclusive."
+ ]
+ ],
+ "deprecated_since": "6.2.0",
+ "replaced_by": "`ZRANGE` with the `REV` and `BYSCORE` arguments",
+ "doc_flags": [
+ "DEPRECATED"
+ ],
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "max",
+ "type": "double"
+ },
+ {
+ "name": "min",
+ "type": "double"
+ },
+ {
+ "name": "withscores",
+ "token": "WITHSCORES",
+ "type": "pure-token",
+ "optional": true
+ },
+ {
+ "token": "LIMIT",
+ "name": "offset_count",
+ "type": "block",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "offset",
+ "type": "integer"
+ },
+ {
+ "name": "count",
+ "type": "integer"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/src/commands/zrevrank.json b/src/commands/zrevrank.json
new file mode 100644
index 0000000..bcd4876
--- /dev/null
+++ b/src/commands/zrevrank.json
@@ -0,0 +1,48 @@
+{
+ "ZREVRANK": {
+ "summary": "Determine the index of a member in a sorted set, with scores ordered from high to low",
+ "complexity": "O(log(N))",
+ "group": "sorted_set",
+ "since": "2.0.0",
+ "arity": 3,
+ "function": "zrevrankCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "member",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/zscan.json b/src/commands/zscan.json
new file mode 100644
index 0000000..6cb9a8d
--- /dev/null
+++ b/src/commands/zscan.json
@@ -0,0 +1,62 @@
+{
+ "ZSCAN": {
+ "summary": "Incrementally iterate sorted sets elements and associated scores",
+ "complexity": "O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection..",
+ "group": "sorted_set",
+ "since": "2.8.0",
+ "arity": -3,
+ "function": "zscanCommand",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "cursor",
+ "type": "integer"
+ },
+ {
+ "token": "MATCH",
+ "name": "pattern",
+ "type": "pattern",
+ "optional": true
+ },
+ {
+ "token": "COUNT",
+ "name": "count",
+ "type": "integer",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/zscore.json b/src/commands/zscore.json
new file mode 100644
index 0000000..5ed3575
--- /dev/null
+++ b/src/commands/zscore.json
@@ -0,0 +1,48 @@
+{
+ "ZSCORE": {
+ "summary": "Get the score associated with the given member in a sorted set",
+ "complexity": "O(1)",
+ "group": "sorted_set",
+ "since": "1.2.0",
+ "arity": 3,
+ "function": "zscoreCommand",
+ "command_flags": [
+ "READONLY",
+ "FAST"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "member",
+ "type": "string"
+ }
+ ]
+ }
+}
diff --git a/src/commands/zunion.json b/src/commands/zunion.json
new file mode 100644
index 0000000..cc6c66c
--- /dev/null
+++ b/src/commands/zunion.json
@@ -0,0 +1,85 @@
+{
+ "ZUNION": {
+ "summary": "Add multiple sorted sets",
+ "complexity": "O(N)+O(M*log(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set.",
+ "group": "sorted_set",
+ "since": "6.2.0",
+ "arity": -3,
+ "function": "zunionCommand",
+ "get_keys_function": "zunionInterDiffGetKeys",
+ "command_flags": [
+ "READONLY"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "keynum": {
+ "keynumidx": 0,
+ "firstkey": 1,
+ "step": 1
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "numkeys",
+ "type": "integer"
+ },
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0,
+ "multiple": true
+ },
+ {
+ "token": "WEIGHTS",
+ "name": "weight",
+ "type": "integer",
+ "optional": true,
+ "multiple": true
+ },
+ {
+ "token": "AGGREGATE",
+ "name": "aggregate",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "sum",
+ "type": "pure-token",
+ "token": "SUM"
+ },
+ {
+ "name": "min",
+ "type": "pure-token",
+ "token": "MIN"
+ },
+ {
+ "name": "max",
+ "type": "pure-token",
+ "token": "MAX"
+ }
+ ]
+ },
+ {
+ "name": "withscores",
+ "token": "WITHSCORES",
+ "type": "pure-token",
+ "optional": true
+ }
+ ]
+ }
+}
diff --git a/src/commands/zunionstore.json b/src/commands/zunionstore.json
new file mode 100644
index 0000000..257b06d
--- /dev/null
+++ b/src/commands/zunionstore.json
@@ -0,0 +1,103 @@
+{
+ "ZUNIONSTORE": {
+ "summary": "Add multiple sorted sets and store the resulting sorted set in a new key",
+ "complexity": "O(N)+O(M log(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set.",
+ "group": "sorted_set",
+ "since": "2.0.0",
+ "arity": -4,
+ "function": "zunionstoreCommand",
+ "get_keys_function": "zunionInterDiffStoreGetKeys",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "SORTEDSET"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "OW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "RO",
+ "ACCESS"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 2
+ }
+ },
+ "find_keys": {
+ "keynum": {
+ "keynumidx": 0,
+ "firstkey": 1,
+ "step": 1
+ }
+ }
+ }
+ ],
+ "arguments": [
+ {
+ "name": "destination",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "numkeys",
+ "type": "integer"
+ },
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 1,
+ "multiple": true
+ },
+ {
+ "token": "WEIGHTS",
+ "name": "weight",
+ "type": "integer",
+ "optional": true,
+ "multiple": true
+ },
+ {
+ "token": "AGGREGATE",
+ "name": "aggregate",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "name": "sum",
+ "type": "pure-token",
+ "token": "SUM"
+ },
+ {
+ "name": "min",
+ "type": "pure-token",
+ "token": "MIN"
+ },
+ {
+ "name": "max",
+ "type": "pure-token",
+ "token": "MAX"
+ }
+ ]
+ }
+ ]
+ }
+}