updateAt: 2022-05-15
Core
Bitmap
BITCOUNT key [start end [BYTE|BIT]]
Count set bits in a stringBITFIELD key GET encoding offset|[OVERFLOW WRAP|SAT|FAIL] SET encoding offset value|INCRBY encoding offset increment [GET encoding offset|[OVERFLOW WRAP|SAT|FAIL] SET encoding offset value|INCRBY encoding offset increment ...]
Perform arbitrary bitfield integer operations on stringsBITFIELD_RO key GET encoding offset [encoding offset ...]
Perform arbitrary bitfield integer operations on strings. Read-only variant of BITFIELDBITOP operation destkey key [key ...]
Perform bitwise operations between stringsBITPOS key bit [start [end [BYTE|BIT]]]
Find first bit set or clear in a stringGETBIT key offset
Returns the bit value at offset in the string value stored at keySETBIT key offset value
Sets or clears the bit at offset in the string value stored at key
Cluster management
ASKING
Sent by cluster clients after an -ASK redirectCLUSTER
A container for cluster commandsCLUSTER ADDSLOTS slot [slot ...]
Assign new hash slots to receiving nodeCLUSTER ADDSLOTSRANGE start-slot end-slot [start-slot end-slot ...]
Assign new hash slots to receiving nodeCLUSTER BUMPEPOCH
Advance the cluster config epochCLUSTER COUNT-FAILURE-REPORTS node-id
Return the number of failure reports active for a given nodeCLUSTER COUNTKEYSINSLOT slot
Return the number of local keys in the specified hash slotCLUSTER DELSLOTS slot [slot ...]
Set hash slots as unbound in receiving nodeCLUSTER DELSLOTSRANGE start-slot end-slot [start-slot end-slot ...]
Set hash slots as unbound in receiving nodeCLUSTER FAILOVER [FORCE|TAKEOVER]
Forces a replica to perform a manual failover of its master.CLUSTER FLUSHSLOTS
Delete a node's own slots informationCLUSTER FORGET node-id
Remove a node from the nodes tableCLUSTER GETKEYSINSLOT slot count
Return local key names in the specified hash slotCLUSTER HELP
Show helpful text about the different subcommandsCLUSTER INFO
Provides info about Redis Cluster node stateCLUSTER KEYSLOT key
Returns the hash slot of the specified keyCLUSTER LINKS
Returns a list of all TCP links to and from peer nodes in clusterCLUSTER MEET ip port
Force a node cluster to handshake with another nodeCLUSTER MYID
Return the node idCLUSTER NODES
Get Cluster config for the nodeCLUSTER REPLICAS node-id
List replica nodes of the specified master nodeCLUSTER REPLICATE node-id
Reconfigure a node as a replica of the specified master nodeCLUSTER RESET [HARD|SOFT]
Reset a Redis Cluster nodeCLUSTER SAVECONFIG
Forces the node to save cluster state on diskCLUSTER SET-CONFIG-EPOCH config-epoch
Set the configuration epoch in a new nodeCLUSTER SETSLOT slot IMPORTING node-id|MIGRATING node-id|NODE node-id|STABLE
Bind a hash slot to a specific nodeCLUSTER SHARDS
Get array of cluster slots to node mappingsCLUSTER SLAVES node-id
List replica nodes of the specified master nodeCLUSTER SLOTS
Get array of Cluster slot to node mappingsREADONLY
Enables read queries for a connection to a cluster replica nodeREADWRITE
Disables read queries for a connection to a cluster replica node
Connection management
AUTH [username] password
Authenticate to the serverCLIENT
A container for client connection commandsCLIENT CACHING YES|NO
Instruct the server about tracking or not keys in the next requestCLIENT GETNAME
Get the current connection nameCLIENT GETREDIR
Get tracking notifications redirection client ID if anyCLIENT HELP
Show helpful text about the different subcommandsCLIENT ID
Returns the client ID for the current connectionCLIENT INFO
Returns information about the current client connection.CLIENT KILL [ip:port] [ID client-id] [TYPE NORMAL|MASTER|SLAVE|REPLICA|PUBSUB] [USER username] [ADDR ip:port] [LADDR ip:port] [SKIPME yes/no]
Kill the connection of a clientCLIENT LIST [TYPE NORMAL|MASTER|REPLICA|PUBSUB] [ID client-id [client-id ...]]
Get the list of client connectionsCLIENT NO-EVICT ON|OFF
Set client eviction mode for the current connectionCLIENT PAUSE timeout [WRITE|ALL]
Stop processing commands from clients for some timeCLIENT REPLY ON|OFF|SKIP
Instruct the server whether to reply to commandsCLIENT SETNAME connection-name
Set the current connection nameCLIENT TRACKING ON|OFF [REDIRECT client-id] [PREFIX prefix [PREFIX prefix ...]] [BCAST] [OPTIN] [OPTOUT] [NOLOOP]
Enable or disable server assisted client side caching supportCLIENT TRACKINGINFO
Return information about server assisted client side caching for the current connectionCLIENT UNBLOCK client-id [TIMEOUT|ERROR]
Unblock a client blocked in a blocking command from a different connectionCLIENT UNPAUSE
Resume processing of clients that were pausedECHO message
Echo the given stringHELLO [protover [AUTH username password] [SETNAME clientname]]
Handshake with RedisPING [message]
Ping the serverQUIT
Close the connectionRESET
Reset the connectionSELECT index
Change the selected database for the current connection
Generic
COPY source destination [DB destination-db] [REPLACE]
Copy a keyDEL key [key ...]
Delete a keyDUMP key
Return a serialized version of the value stored at the specified key.EXISTS key [key ...]
Determine if a key existsEXPIRE key seconds [NX|XX|GT|LT]
Set a key's time to live in secondsEXPIREAT key unix-time-seconds [NX|XX|GT|LT]
Set the expiration for a key as a UNIX timestampEXPIRETIME key
Get the expiration Unix timestamp for a keyKEYS pattern
Find all keys matching the given patternMIGRATE host port key|"" destination-db timeout [COPY] [REPLACE] [[AUTH password]|[AUTH2 username password]] [KEYS key [key ...]]
Atomically transfer a key from a Redis instance to another one.MOVE key db
Move a key to another databaseOBJECT
A container for object introspection commandsOBJECT ENCODING key
Inspect the internal encoding of a Redis objectOBJECT FREQ key
Get the logarithmic access frequency counter of a Redis objectOBJECT HELP
Show helpful text about the different subcommandsOBJECT IDLETIME key
Get the time since a Redis object was last accessedOBJECT REFCOUNT key
Get the number of references to the value of the keyPERSIST key
Remove the expiration from a keyPEXPIRE key milliseconds [NX|XX|GT|LT]
Set a key's time to live in millisecondsPEXPIREAT key unix-time-milliseconds [NX|XX|GT|LT]
Set the expiration for a key as a UNIX timestamp specified in millisecondsPEXPIRETIME key
Get the expiration Unix timestamp for a key in millisecondsPTTL key
Get the time to live for a key in millisecondsRANDOMKEY
Return a random key from the keyspaceRENAME key newkey
Rename a keyRENAMENX key newkey
Rename a key, only if the new key does not existRESTORE key ttl serialized-value [REPLACE] [ABSTTL] [IDLETIME seconds] [FREQ frequency]
Create a key using the provided serialized value, previously obtained using DUMP.SCAN cursor [MATCH pattern] [COUNT count] [TYPE type]
Incrementally iterate the keys spaceSORT key [BY pattern] [LIMIT offset count] [GET pattern [GET pattern ...]] [ASC|DESC] [ALPHA] [STORE destination]
Sort the elements in a list, set or sorted setSORT_RO key [BY pattern] [LIMIT offset count] [GET pattern [GET pattern ...]] [ASC|DESC] [ALPHA]
Sort the elements in a list, set or sorted set. Read-only variant of SORT.TOUCH key [key ...]
Alters the last access time of a key(s). Returns the number of existing keys specified.TTL key
Get the time to live for a key in secondsTYPE key
Determine the type stored at keyUNLINK key [key ...]
Delete a key asynchronously in another thread. Otherwise it is just as DEL, but non blocking.WAIT numreplicas timeout
Wait for the synchronous replication of all the write commands sent in the context of the current connection
Geospatial indices
GEOADD key [NX|XX] [CH] longitude latitude member [longitude latitude member ...]
Add one or more geospatial items in the geospatial index represented using a sorted setGEODIST key member1 member2 [M|KM|FT|MI]
Returns the distance between two members of a geospatial indexGEOHASH key member [member ...]
Returns members of a geospatial index as standard geohash stringsGEOPOS key member [member ...]
Returns longitude and latitude of members of a geospatial indexGEORADIUS key longitude latitude radius M|KM|FT|MI [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count [ANY]] [ASC|DESC] [STORE key] [STOREDIST key]
Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a pointGEORADIUS_RO key longitude latitude radius M|KM|FT|MI [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count [ANY]] [ASC|DESC]
A read-only variant for GEORADIUSGEORADIUSBYMEMBER key member radius M|KM|FT|MI [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count [ANY]] [ASC|DESC] [STORE key] [STOREDIST key]
Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a memberGEORADIUSBYMEMBER_RO key member radius M|KM|FT|MI [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count [ANY]] [ASC|DESC]
A read-only variant for GEORADIUSBYMEMBERGEOSEARCH key FROMMEMBER member|FROMLONLAT longitude latitude BYRADIUS radius M|KM|FT|MI|BYBOX width height M|KM|FT|MI [ASC|DESC] [COUNT count [ANY]] [WITHCOORD] [WITHDIST] [WITHHASH]
Query a sorted set representing a geospatial index to fetch members inside an area of a box or a circle.GEOSEARCHSTORE destination source FROMMEMBER member|FROMLONLAT longitude latitude BYRADIUS radius M|KM|FT|MI|BYBOX width height M|KM|FT|MI [ASC|DESC] [COUNT count [ANY]] [STOREDIST]
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.
Hash
HDEL key field [field ...]
Delete one or more hash fieldsHEXISTS key field
Determine if a hash field existsHGET key field
Get the value of a hash fieldHGETALL key
Get all the fields and values in a hashHINCRBY key field increment
Increment the integer value of a hash field by the given numberHINCRBYFLOAT key field increment
Increment the float value of a hash field by the given amountHKEYS key
Get all the fields in a hashHLEN key
Get the number of fields in a hashHMGET key field [field ...]
Get the values of all the given hash fieldsHMSET key field value [field value ...]
Set multiple hash fields to multiple valuesHRANDFIELD key [count [WITHVALUES]]
Get one or multiple random fields from a hashHSCAN key cursor [MATCH pattern] [COUNT count]
Incrementally iterate hash fields and associated valuesHSET key field value [field value ...]
Set the string value of a hash fieldHSETNX key field value
Set the value of a hash field, only if the field does not existHSTRLEN key field
Get the length of the value of a hash fieldHVALS key
Get all the values in a hash
HyperLogLog
PFADD key [element [element ...]]
Adds the specified elements to the specified HyperLogLog.PFCOUNT key [key ...]
Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s).PFDEBUG
Internal commands for debugging HyperLogLog valuesPFMERGE destkey sourcekey [sourcekey ...]
Merge N different HyperLogLogs into a single one.PFSELFTEST
An internal command for testing HyperLogLog values
List
BLMOVE source destination LEFT|RIGHT LEFT|RIGHT timeout
Pop an element from a list, push it to another list and return it; or block until one is availableBLMPOP timeout numkeys key [key ...] LEFT|RIGHT [COUNT count]
Pop elements from a list, or block until one is availableBLPOP key [key ...] timeout
Remove and get the first element in a list, or block until one is availableBRPOP key [key ...] timeout
Remove and get the last element in a list, or block until one is availableBRPOPLPUSH source destination timeout
Pop an element from a list, push it to another list and return it; or block until one is availableLINDEX key index
Get an element from a list by its indexLINSERT key BEFORE|AFTER pivot element
Insert an element before or after another element in a listLLEN key
Get the length of a listLMOVE source destination LEFT|RIGHT LEFT|RIGHT
Pop an element from a list, push it to another list and return itLMPOP numkeys key [key ...] LEFT|RIGHT [COUNT count]
Pop elements from a listLPOP key [count]
Remove and get the first elements in a listLPOS key element [RANK rank] [COUNT num-matches] [MAXLEN len]
Return the index of matching elements on a listLPUSH key element [element ...]
Prepend one or multiple elements to a listLPUSHX key element [element ...]
Prepend an element to a list, only if the list existsLRANGE key start stop
Get a range of elements from a listLREM key count element
Remove elements from a listLSET key index element
Set the value of an element in a list by its indexLTRIM key start stop
Trim a list to the specified rangeRPOP key [count]
Remove and get the last elements in a listRPOPLPUSH source destination
Remove the last element in a list, prepend it to another list and return itRPUSH key element [element ...]
Append one or multiple elements to a listRPUSHX key element [element ...]
Append an element to a list, only if the list exists
Pub/Sub
PSUBSCRIBE pattern [pattern ...]
Listen for messages published to channels matching the given patternsPUBLISH channel message
Post a message to a channelPUBSUB
A container for Pub/Sub commandsPUBSUB CHANNELS [pattern]
List active channelsPUBSUB HELP
Show helpful text about the different subcommandsPUBSUB NUMPAT
Get the count of unique patterns pattern subscriptionsPUBSUB NUMSUB [channel [channel ...]]
Get the count of subscribers for channelsPUBSUB SHARDCHANNELS [pattern]
List active shard channelsPUBSUB SHARDNUMSUB [channel [channel ...]]
Get the count of subscribers for shard channelsPUNSUBSCRIBE [pattern [pattern ...]]
Stop listening for messages posted to channels matching the given patternsSPUBLISH channel message
Post a message to a shard channelSSUBSCRIBE channel [channel ...]
Listen for messages published to the given shard channelsSUBSCRIBE channel [channel ...]
Listen for messages published to the given channelsSUNSUBSCRIBE [channel [channel ...]]
Stop listening for messages posted to the given shard channelsUNSUBSCRIBE [channel [channel ...]]
Stop listening for messages posted to the given channels
Scripting and Functions
EVAL script numkeys [key [key ...]] [arg [arg ...]]
Execute a Lua script server sideEVAL_RO script numkeys key [key ...] arg [arg ...]
Execute a read-only Lua script server sideEVALSHA sha1 numkeys [key [key ...]] [arg [arg ...]]
Execute a Lua script server sideEVALSHA_RO sha1 numkeys key [key ...] arg [arg ...]
Execute a read-only Lua script server sideFCALL function numkeys key [key ...] arg [arg ...]
Invoke a functionFCALL_RO function numkeys key [key ...] arg [arg ...]
Invoke a read-only functionFUNCTION
A container for function commandsFUNCTION DELETE library-name
Delete a function by nameFUNCTION DUMP
Dump all functions into a serialized binary payloadFUNCTION FLUSH [ASYNC|SYNC]
Deleting all functionsFUNCTION HELP
Show helpful text about the different subcommandsFUNCTION KILL
Kill the function currently in execution.FUNCTION LIST [LIBRARYNAME library-name-pattern] [WITHCODE]
List information about all the functionsFUNCTION LOAD [REPLACE] function-code
Create a function with the given arguments (name, code, description)FUNCTION RESTORE serialized-value [FLUSH|APPEND|REPLACE]
Restore all the functions on the given payloadFUNCTION STATS
Return information about the function currently running (name, description, duration)SCRIPT
A container for Lua scripts management commandsSCRIPT DEBUG YES|SYNC|NO
Set the debug mode for executed scripts.SCRIPT EXISTS sha1 [sha1 ...]
Check existence of scripts in the script cache.SCRIPT FLUSH [ASYNC|SYNC]
Remove all the scripts from the script cache.SCRIPT HELP
Show helpful text about the different subcommandsSCRIPT KILL
Kill the script currently in execution.SCRIPT LOAD script
Load the specified Lua script into the script cache.
Server managment
ACL
A container for Access List Control commandsACL CAT [categoryname]
List the ACL categories or the commands inside a categoryACL DELUSER username [username ...]
Remove the specified ACL users and the associated rulesACL DRYRUN username command [arg [arg ...]]
Returns whether the user can execute the given command without executing the command.ACL GENPASS [bits]
Generate a pseudorandom secure password to use for ACL usersACL GETUSER username
Get the rules for a specific ACL userACL HELP
Show helpful text about the different subcommandsACL LIST
List the current ACL rules in ACL config file formatACL LOAD
Reload the ACLs from the configured ACL fileACL LOG [count|RESET]
List latest events denied because of ACLs in placeACL SAVE
Save the current ACL rules in the configured ACL fileACL SETUSER username [rule [rule ...]]
Modify or create the rules for a specific ACL userACL USERS
List the username of all the configured ACL rulesACL WHOAMI
Return the name of the user associated to the current connectionBGREWRITEAOF
Asynchronously rewrite the append-only fileBGSAVE [SCHEDULE]
Asynchronously save the dataset to diskCOMMAND
Get array of Redis command detailsCOMMAND COUNT
Get total number of Redis commandsCOMMAND DOCS [command-name [command-name ...]]
Get array of specific Redis command documentationCOMMAND GETKEYS
Extract keys given a full Redis commandCOMMAND GETKEYSANDFLAGS
Extract keys and access flags given a full Redis commandCOMMAND HELP
Show helpful text about the different subcommandsCOMMAND INFO [command-name [command-name ...]]
Get array of specific Redis command details, or all when no argument is given.COMMAND LIST [FILTERBY MODULE module-name|ACLCAT category|PATTERN pattern]
Get an array of Redis command namesCONFIG
A container for server configuration commandsCONFIG GET parameter [parameter ...]
Get the values of configuration parametersCONFIG HELP
Show helpful text about the different subcommandsCONFIG RESETSTAT
Reset the stats returned by INFOCONFIG REWRITE
Rewrite the configuration file with the in memory configurationCONFIG SET parameter value [parameter value ...]
Set configuration parameters to the given valuesDBSIZE
Return the number of keys in the selected databaseDEBUG
A container for debugging commandsFAILOVER [TO host port [FORCE]] [ABORT] [TIMEOUT milliseconds]
Start a coordinated failover between this server and one of its replicas.FLUSHALL [ASYNC|SYNC]
Remove all keys from all databasesFLUSHDB [ASYNC|SYNC]
Remove all keys from the current databaseINFO [section [section ...]]
Get information and statistics about the serverLASTSAVE
Get the UNIX time stamp of the last successful save to diskLATENCY
A container for latency diagnostics commandsLATENCY DOCTOR
Return a human readable latency analysis report.LATENCY GRAPH event
Return a latency graph for the event.LATENCY HELP
Show helpful text about the different subcommands.LATENCY HISTOGRAM [command [command ...]]
Return the cumulative distribution of latencies of a subset of commands or all.LATENCY HISTORY event
Return timestamp-latency samples for the event.LATENCY LATEST
Return the latest latency samples for all events.LATENCY RESET [event [event ...]]
Reset latency data for one or more events.LOLWUT [VERSION version]
Display some computer art and the Redis versionMEMORY
A container for memory diagnostics commandsMEMORY DOCTOR
Outputs memory problems reportMEMORY HELP
Show helpful text about the different subcommandsMEMORY MALLOC-STATS
Show allocator internal statsMEMORY PURGE
Ask the allocator to release memoryMEMORY STATS
Show memory usage detailsMEMORY USAGE key [SAMPLES count]
Estimate the memory usage of a keyMODULE
A container for module commandsMODULE HELP
Show helpful text about the different subcommandsMODULE LIST
List all modules loaded by the serverMODULE LOAD path [arg [arg ...]]
Load a moduleMODULE LOADEX path [CONFIG name value [CONFIG name value ...]] [ARGS arg [arg ...]]
Load a module with extended parametersMODULE UNLOAD name
Unload a moduleMONITOR
Listen for all requests received by the server in real timePSYNC replicationid offset
Internal command used for replicationREPLCONF
An internal command for configuring the replication streamREPLICAOF host port
Make the server a replica of another instance, or promote it as master.RESTORE-ASKING
An internal command for migrating keys in a clusterROLE
Return the role of the instance in the context of replicationSAVE
Synchronously save the dataset to diskSHUTDOWN [NOSAVE|SAVE] [NOW] [FORCE] [ABORT]
Synchronously save the dataset to disk and then shut down the serverSLAVEOF host port
Make the server a replica of another instance, or promote it as master.SLOWLOG
A container for slow log commandsSLOWLOG GET [count]
Get the slow log's entriesSLOWLOG HELP
Show helpful text about the different subcommandsSLOWLOG LEN
Get the slow log's lengthSLOWLOG RESET
Clear all entries from the slow logSWAPDB index1 index2
Swaps two Redis databasesSYNC
Internal command used for replicationTIME
Return the current server time
Set
SADD key member [member ...]
Add one or more members to a setSCARD key
Get the number of members in a setSDIFF key [key ...]
Subtract multiple setsSDIFFSTORE destination key [key ...]
Subtract multiple sets and store the resulting set in a keySINTER key [key ...]
Intersect multiple setsSINTERCARD numkeys key [key ...] [LIMIT limit]
Intersect multiple sets and return the cardinality of the resultSINTERSTORE destination key [key ...]
Intersect multiple sets and store the resulting set in a keySISMEMBER key member
Determine if a given value is a member of a setSMEMBERS key
Get all the members in a setSMISMEMBER key member [member ...]
Returns the membership associated with the given elements for a setSMOVE source destination member
Move a member from one set to anotherSPOP key [count]
Remove and return one or multiple random members from a setSRANDMEMBER key [count]
Get one or multiple random members from a setSREM key member [member ...]
Remove one or more members from a setSSCAN key cursor [MATCH pattern] [COUNT count]
Incrementally iterate Set elementsSUNION key [key ...]
Add multiple setsSUNIONSTORE destination key [key ...]
Add multiple sets and store the resulting set in a key
Sorted Set
BZMPOP timeout numkeys key [key ...] MIN|MAX [COUNT count]
Remove and return members with scores in a sorted set or block until one is availableBZPOPMAX key [key ...] timeout
Remove and return the member with the highest score from one or more sorted sets, or block until one is availableBZPOPMIN key [key ...] timeout
Remove and return the member with the lowest score from one or more sorted sets, or block until one is availableZADD key [NX|XX] [GT|LT] [CH] [INCR] score member [score member ...]
Add one or more members to a sorted set, or update its score if it already existsZCARD key
Get the number of members in a sorted setZCOUNT key min max
Count the members in a sorted set with scores within the given valuesZDIFF numkeys key [key ...] [WITHSCORES]
Subtract multiple sorted setsZDIFFSTORE destination numkeys key [key ...]
Subtract multiple sorted sets and store the resulting sorted set in a new keyZINCRBY key increment member
Increment the score of a member in a sorted setZINTER numkeys key [key ...] [WEIGHTS weight [weight ...]] [AGGREGATE SUM|MIN|MAX] [WITHSCORES]
Intersect multiple sorted setsZINTERCARD numkeys key [key ...] [LIMIT limit]
Intersect multiple sorted sets and return the cardinality of the resultZINTERSTORE destination numkeys key [key ...] [WEIGHTS weight [weight ...]] [AGGREGATE SUM|MIN|MAX]
Intersect multiple sorted sets and store the resulting sorted set in a new keyZLEXCOUNT key min max
Count the number of members in a sorted set between a given lexicographical rangeZMPOP numkeys key [key ...] MIN|MAX [COUNT count]
Remove and return members with scores in a sorted setZMSCORE key member [member ...]
Get the score associated with the given members in a sorted setZPOPMAX key [count]
Remove and return members with the highest scores in a sorted setZPOPMIN key [count]
Remove and return members with the lowest scores in a sorted setZRANDMEMBER key [count [WITHSCORES]]
Get one or multiple random elements from a sorted setZRANGE key min max [BYSCORE|BYLEX] [REV] [LIMIT offset count] [WITHSCORES]
Return a range of members in a sorted setZRANGEBYLEX key min max [LIMIT offset count]
Return a range of members in a sorted set, by lexicographical rangeZRANGEBYSCORE key min max [WITHSCORES] [LIMIT offset count]
Return a range of members in a sorted set, by scoreZRANGESTORE dst src min max [BYSCORE|BYLEX] [REV] [LIMIT offset count]
Store a range of members from sorted set into another keyZRANK key member
Determine the index of a member in a sorted setZREM key member [member ...]
Remove one or more members from a sorted setZREMRANGEBYLEX key min max
Remove all members in a sorted set between the given lexicographical rangeZREMRANGEBYRANK key start stop
Remove all members in a sorted set within the given indexesZREMRANGEBYSCORE key min max
Remove all members in a sorted set within the given scoresZREVRANGE key start stop [WITHSCORES]
Return a range of members in a sorted set, by index, with scores ordered from high to lowZREVRANGEBYLEX key max min [LIMIT offset count]
Return a range of members in a sorted set, by lexicographical range, ordered from higher to lower strings.ZREVRANGEBYSCORE key max min [WITHSCORES] [LIMIT offset count]
Return a range of members in a sorted set, by score, with scores ordered from high to lowZREVRANK key member
Determine the index of a member in a sorted set, with scores ordered from high to lowZSCAN key cursor [MATCH pattern] [COUNT count]
Incrementally iterate sorted sets elements and associated scoresZSCORE key member
Get the score associated with the given member in a sorted setZUNION numkeys key [key ...] [WEIGHTS weight [weight ...]] [AGGREGATE SUM|MIN|MAX] [WITHSCORES]
Add multiple sorted setsZUNIONSTORE destination numkeys key [key ...] [WEIGHTS weight [weight ...]] [AGGREGATE SUM|MIN|MAX]
Add multiple sorted sets and store the resulting sorted set in a new key
Stream
XACK key group id [id ...]
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.XADD key [NOMKSTREAM] [MAXLEN|MINID [=|~] threshold [LIMIT count]] *|id field value [field value ...]
Appends a new entry to a streamXAUTOCLAIM key group consumer min-idle-time start [COUNT count] [JUSTID]
Changes (or acquires) ownership of messages in a consumer group, as if the messages were delivered to the specified consumer.XCLAIM key group consumer min-idle-time id [id ...] [IDLE ms] [TIME unix-time-milliseconds] [RETRYCOUNT count] [FORCE] [JUSTID]
Changes (or acquires) ownership of a message in a consumer group, as if the message was delivered to the specified consumer.XDEL key id [id ...]
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.XGROUP
A container for consumer groups commandsXGROUP CREATE key groupname id|$ [MKSTREAM] [ENTRIESREAD entries_read]
Create a consumer group.XGROUP CREATECONSUMER key groupname consumername
Create a consumer in a consumer group.XGROUP DELCONSUMER key groupname consumername
Delete a consumer from a consumer group.XGROUP DESTROY key groupname
Destroy a consumer group.XGROUP HELP
Show helpful text about the different subcommandsXGROUP SETID key groupname id|$ [ENTRIESREAD entries_read]
Set a consumer group to an arbitrary last delivered ID value.XINFO
A container for stream introspection commandsXINFO CONSUMERS key groupname
List the consumers in a consumer groupXINFO GROUPS key
List the consumer groups of a streamXINFO HELP
Show helpful text about the different subcommandsXINFO STREAM key [FULL [COUNT count]]
Get information about a streamXLEN key
Return the number of entries in a streamXPENDING key group [[IDLE min-idle-time] start end count [consumer]]
Return information and entries from a stream consumer group pending entries list, that are messages fetched but never acknowledged.XRANGE key start end [COUNT count]
Return a range of elements in a stream, with IDs matching the specified IDs intervalXREAD [COUNT count] [BLOCK milliseconds] STREAMS key [key ...] id [id ...]
Return never seen elements in multiple streams, with IDs greater than the ones reported by the caller for each stream. Can block.XREADGROUP GROUP group consumer [COUNT count] [BLOCK milliseconds] [NOACK] STREAMS key [key ...] id [id ...]
Return new entries from a stream using a consumer group, or access the history of the pending entries for a given consumer. Can block.XREVRANGE key end start [COUNT count]
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 XRANGEXSETID key last-id [ENTRIESADDED entries_added] [MAXDELETEDID max_deleted_entry_id]
An internal command for replicating stream valuesXTRIM key MAXLEN|MINID [=|~] threshold [LIMIT count]
Trims the stream to (approximately if '~' is passed) a certain size
String
APPEND key value
Append a value to a keyDECR key
Decrement the integer value of a key by oneDECRBY key decrement
Decrement the integer value of a key by the given numberGET key
Get the value of a keyGETDEL key
Get the value of a key and delete the keyGETEX key [EX seconds|PX milliseconds|EXAT unix-time-seconds|PXAT unix-time-milliseconds|PERSIST]
Get the value of a key and optionally set its expirationGETRANGE key start end
Get a substring of the string stored at a keyGETSET key value
Set the string value of a key and return its old valueINCR key
Increment the integer value of a key by oneINCRBY key increment
Increment the integer value of a key by the given amountINCRBYFLOAT key increment
Increment the float value of a key by the given amountLCS key1 key2 [LEN] [IDX] [MINMATCHLEN len] [WITHMATCHLEN]
Find longest common substringMGET key [key ...]
Get the values of all the given keysMSET key value [key value ...]
Set multiple keys to multiple valuesMSETNX key value [key value ...]
Set multiple keys to multiple values, only if none of the keys existPSETEX key milliseconds value
Set the value and expiration in milliseconds of a keySET key value [NX|XX] [GET] [EX seconds|PX milliseconds|EXAT unix-time-seconds|PXAT unix-time-milliseconds|KEEPTTL]
Set the string value of a keySETEX key seconds value
Set the value and expiration of a keySETNX key value
Set the value of a key, only if the key does not existSETRANGE key offset value
Overwrite part of a string at key starting at the specified offsetSTRLEN key
Get the length of the value stored in a keySUBSTR key start end
Get a substring of the string stored at a key
Transactions
DISCARD
Discard all commands issued after MULTIEXEC
Execute all commands issued after MULTIMULTI
Mark the start of a transaction blockUNWATCH
Forget about all watched keysWATCH key [key ...]
Watch the given keys to determine execution of the MULTI/EXEC block
Stack
Bloom Filter
BF.ADD key item
Adds an item to a Bloom FilterBF.EXISTS key item
Checks whether an item exists in a Bloom FilterBF.INFO key
Returns information about a Bloom FilterBF.INSERT key [capacity] [error] [expansion] [NOCREATE] [NONSCALING] ITEMS item [item ...]
Adds one or more items to a Bloom Filter. A filter will be created if it does not existBF.LOADCHUNK key iterator data
Restores a filter previously saved using SCANDUMPBF.MADD key item [item ...]
Adds one or more items to a Bloom Filter. A filter will be created if it does not existBF.MEXISTS key item [item ...]
Checks whether one or more items exist in a Bloom FilterBF.RESERVE key error_rate capacity [expansion] [NONSCALING]
Creates a new Bloom FilterBF.SCANDUMP key iterator
Begins an incremental save of the bloom filter
Cuckoo Filter
CF.ADD key item
Adds an item to a Cuckoo FilterCF.ADDNX key item [item ...]
Adds an item to a Cuckoo Filter if the item did not exist previously.CF.COUNT key item
Return the number of times an item might be in a Cuckoo FilterCF.DEL key item
Deletes an item from a Cuckoo FilterCF.EXISTS key item
Checks whether one or more items exist in a Cuckoo FilterCF.INFO key
Returns information about a Cuckoo FilterCF.INSERT key [capacity] [NOCREATE] ITEMS item [item ...]
Adds one or more items to a Cuckoo Filter. A filter will be created if it does not existCF.INSERTNX key [capacity] [NOCREATE] ITEMS item [item ...]
Adds one or more items to a Cuckoo Filter if the items did not exist previously. A filter will be created if it does not existCF.LOADCHUNK key iterator data
Restores a filter previously saved using SCANDUMPCF.MEXISTS key item [item ...]
Checks whether one or more items exist in a Cuckoo FilterCF.RESERVE key capacity [bucketsize] [maxiterations] [expansion]
Creates a new Cuckoo FilterCF.SCANDUMP key iterator
Begins an incremental save of the bloom filter
Count-min Sketch
CMS.INCRBY key item increment [item increment ...]
Increases the count of one or more items by incrementCMS.INFO key
Returns information about a sketchCMS.INITBYDIM key width depth
Initializes a Count-Min Sketch to dimensions specified by userCMS.INITBYPROB key error probability
Initializes a Count-Min Sketch to accommodate requested tolerances.CMS.MERGE destination numKeys source [source ...] [WEIGHTS weight [weight ...]]
Merges several sketches into one sketchCMS.QUERY key item [item ...]
Returns the count for one or more items in a sketch
Graph
GRAPH.CONFIG GET name
Retrieves a RedisGraph configurationGRAPH.CONFIG SET name value
Updates a RedisGraph configurationGRAPH.DELETE graph
Completely removes the graph and all of its entitiesGRAPH.EXPLAIN graph query
Returns a query execution plan without running the queryGRAPH.LIST
Lists all graph keys in the keyspaceGRAPH.PROFILE graph query
Executes a query and returns an execution plan augmented with metrics for each operation's executionGRAPH.QUERY graph query
Executes the given query against a specified graphGRAPH.RO_QUERY graph query
Executes a given read only query against a specified graphGRAPH.SLOWLOG graph
Returns a list containing up to 10 of the slowest queries issued against the given graph
JSON
JSON.ARRAPPEND key [path] value [value ...]
Append one or more json values into the array at path after the last element in it.JSON.ARRINDEX key path value [start [stop]]
Returns the index of the first occurrence of a JSON scalar value in the array at pathJSON.ARRINSERT key path index value [value ...]
Inserts the JSON scalar(s) value at the specified index in the array at pathJSON.ARRLEN key [path]
Returns the length of the array at pathJSON.ARRPOP key [path [index]]
Removes and returns the element at the specified index in the array at pathJSON.ARRTRIM key path start stop
Trims the array at path to contain only the specified inclusive range of indices from start to stopJSON.CLEAR key [path]
Clears all values from an array or an object and sets numeric values to0
JSON.DEBUG
Debugging container commandJSON.DEBUG HELP
Shows helpful informationJSON.DEBUG MEMORY [key [path]]
Reports the size in bytes of a keyJSON.DEL key [path]
Deletes a valueJSON.FORGET key [path]
Deletes a valueJSON.GET key [INDENT indent] [NEWLINE newline] [SPACE space] [paths [paths ...]]
Gets the value at one or more paths in JSON serialized formJSON.MGET key [key ...] path
Returns the values at a path from one or more keysJSON.NUMINCRBY key path value
Increments the numeric value at path by a valueJSON.NUMMULTBY key path value
Multiplies the numeric value at path by a valueJSON.OBJKEYS key [path]
Returns the JSON keys of the object at pathJSON.OBJLEN key [path]
Returns the number of keys of the object at pathJSON.RESP key [path]
Returns the JSON value at path in Redis Serialization Protocol (RESP)JSON.SET key path value [NX|XX]
Sets or updates the JSON value at a pathJSON.STRAPPEND key [path] value
Appends a string to a JSON string value at pathJSON.STRLEN key [path]
Returns the length of the JSON String at path in keyJSON.TOGGLE key [path]
Toggles a boolean valueJSON.TYPE key [path]
Returns the type of the JSON value at path
Search
FT._LIST
Returns a list of all existing indexesFT.AGGREGATE index query [VERBATIM] [LOAD count field [field ...]] [TIMEOUT timeout] [LOAD *] [GROUPBY nargs property [property ...] [REDUCE function nargs arg [arg ...] [AS name] [REDUCE function nargs arg [arg ...] [AS name] ...]] [GROUPBY nargs property [property ...] [REDUCE function nargs arg [arg ...] [AS name] [REDUCE function nargs arg [arg ...] [AS name] ...]] ...]] [SORTBY nargs [property ASC|DESC [property ASC|DESC ...]] [MAX num]] [APPLY expression AS name [APPLY expression AS name ...]] [LIMIT offset num] [FILTER filter] [[WITHCURSOR] [COUNT read_size] [MAXIDLE idle_time]] [params NARGS name value [name value ...]] [DIALECT dialect]
Adds terms to a dictionaryFT.ALIASADD alias index
Adds an alias to the indexFT.ALIASDEL alias
Deletes an alias from the indexFT.ALIASUPDATE alias index
Adds or updates an alias to the indexFT.ALTER index SCHEMA ADD field options
Adds a new field to the indexFT.CONFIG GET option
Retrieves runtime configuration optionsFT.CONFIG HELP option
Help description of runtime configuration optionsFT.CONFIG SET option value
Sets runtime configuration optionsFT.CREATE index [ON HASH|JSON] [PREFIX count prefix [prefix ...]] [LANGUAGE default_lang] [LANGUAGE_FIELD lang_attribute] [SCORE default_score] [SCORE_FIELD score_attribute] [PAYLOAD_FIELD payload_attribute] [MAXTEXTFIELDS] [TEMPORARY seconds] [NOOFFSETS] [NOHL] [NOFIELDS] [NOFREQS] [STOPWORDS count stopword [stopword ...]] SCHEMA field_name [AS alias] TEXT|TAG|NUMERIC|GEO|VECTOR [SORTABLE [UNF]] [NOINDEX] [field_name [AS alias] TEXT|TAG|NUMERIC|GEO|VECTOR [SORTABLE [UNF]] [NOINDEX] ...]
Creates an index with the given specFT.CURSOR DEL index cursor_id
Deletes a cursorFT.CURSOR READ index cursor_id [COUNT read size]
Reads from a cursorFT.DICTADD dict term [term ...]
Adds terms to a dictionaryFT.DICTDEL dict term [term ...]
Deletes terms from a dictionaryFT.DICTDUMP dict
Dumps all terms in the given dictionaryFT.DROPINDEX index [DD]
Deletes the indexFT.EXPLAIN index query [DIALECT dialect]
Returns the execution plan for a complex queryFT.EXPLAINCLI index query [DIALECT dialect]
Returns the execution plan for a complex queryFT.INFO index
Returns information and statistics on the indexFT.PROFILE index SEARCH|AGGREGATE [LIMITED] QUERY query
Performs aFT.SEARCH
orFT.AGGREGATE
command and collects performance informationFT.SEARCH index query [NOCONTENT] [VERBATIM] [NOSTOPWORDS] [WITHSCORES] [WITHPAYLOADS] [WITHSORTKEYS] [FILTER numeric_field min max [FILTER numeric_field min max ...]] [GEOFILTER geo_field lon lat radius m|km|mi|ft [GEOFILTER geo_field lon lat radius m|km|mi|ft ...]] [INKEYS count key [key ...]] [INFIELDS count field [field ...]] [RETURN count identifier [AS property] [identifier [AS property] ...]] [[SUMMARIZE] [FIELDS count field [field ...]] [FRAGS num] [LEN fragsize] [SEPARATOR separator]] [[HIGHLIGHT] [FIELDS count field [field ...]] [TAGS open close]] [SLOP slop] [TIMEOUT timeout] [INORDER] [LANGUAGE language] [EXPANDER expander] [SCORER scorer] [EXPLAINSCORE] [PAYLOAD payload] [SORTBY sortby [ASC|DESC]] [LIMIT offset num] [params nargs name value [name value ...]] [DIALECT dialect]
Searches the index with a textual query, returning either documents or just idsFT.SPELLCHECK index query [DISTANCE distance] [TERMS INCLUDE|EXCLUDE dictionary [terms [terms ...]]] [DIALECT dialect]
Performs spelling correction on a query, returning suggestions for misspelled termsFT.SYNDUMP index
Dumps the contents of a synonym groupFT.SYNUPDATE index synonym_group_id [SKIPINITIALSCAN] term [term ...]
Creates or updates a synonym group with additional termsFT.TAGVALS index field_name
Returns the distinct tags indexed in a Tag field
Auto-Suggest
FT.SUGADD key string score [INCR] [PAYLOAD payload]
Adds a suggestion string to an auto-complete suggestion dictionaryFT.SUGDEL key string
Deletes a string from a suggestion indexFT.SUGGET key prefix [FUZZY] [WITHSCORES] [WITHPAYLOADS] [MAX max]
Gets completion suggestions for a prefixFT.SUGLEN key
Gets the size of an auto-complete suggestion dictionary
T-Digest
TDIGEST.ADD key value weight [value weight ...]
Adds one or more samples to a sketchTDIGEST.CDF key value
Returns the fraction of all points added which are <= valueTDIGEST.CREATE key compression
Allocate the memory and initialize the t-digestTDIGEST.INFO key
Returns information about a sketchTDIGEST.MAX key
Get maximum value from the sketchTDIGEST.MERGE to-key from-key
Merges all of the values from 'from' to 'this' sketchTDIGEST.MIN key
Get minimum value from the sketchTDIGEST.QUANTILE key quantile
Returns an estimate of the cutoffTDIGEST.RESET key
Reset the sketch to zero - empty out the sketch and re-initialize it
Time Series
TS.ADD key timestamp value [RETENTION retentionPeriod] [ENCODING UNCOMPRESSED|COMPRESSED] [CHUNK_SIZE size] [ON_DUPLICATE BLOCK|FIRST|LAST|MIN|MAX|SUM] [LABELS label value [label value ...]]
Append a sample to a time seriesTS.ALTER key [RETENTION retentionPeriod] [CHUNK_SIZE size] [DUPLICATE_POLICY BLOCK|FIRST|LAST|MIN|MAX|SUM] [LABELS label value [label value ...]]
Update the retention, chunk size, duplicate policy, and labels of an existing time seriesTS.CREATE key [RETENTION retentionPeriod] [ENCODING UNCOMPRESSED|COMPRESSED] [CHUNK_SIZE size] [DUPLICATE_POLICY BLOCK|FIRST|LAST|MIN|MAX|SUM] [LABELS label value [label value ...]]
Create a new time seriesTS.CREATERULE sourceKey destKey AGGREGATION AVG|FIRST|LAST|MIN|MAX|SUM|RANGE|COUNT|STD.P|STD.S|VAR.P|VAR.S|TWA bucketDuration
Create a compaction ruleTS.DECRBY key value [timestamp] [RETENTION retentionPeriod] [UNCOMPRESSED] [CHUNK_SIZE size] [LABELS label value [label value ...]]
Decrease the value of the sample with the maximal existing timestamp, or create a new sample with a value equal to the value of the sample with the maximal existing timestamp with a given decrementTS.DEL key from_timestamp to_timestamp
Delete all samples between two timestamps for a given time seriesTS.DELETERULE sourceKey destKey
Delete a compaction ruleTS.GET key
Get the last sampleTS.INCRBY key value [timestamp] [RETENTION retentionPeriod] [UNCOMPRESSED] [CHUNK_SIZE size] [LABELS label value [label value ...]]
Increase the value of the sample with the maximal existing timestamp, or create a new sample with a value equal to the value of the sample with the maximal existing timestamp with a given incrementTS.INFO key [DEBUG]
Returns information and statistics for a time seriesTS.MADD key timestamp value [key timestamp value ...]
Append new samples to one or more time seriesTS.MGET [WITHLABELS|SELECTED_LABELS label1 [label1 ...]] FILTER l=v|l!=v|l=|l!=|l=(v1,v2,...)|l!=(v1,v2,...) [l=v|l!=v|l=|l!=|l=(v1,v2,...)|l!=(v1,v2,...) ...]
Get the last samples matching a specific filterTS.MRANGE fromTimestamp toTimestamp [FILTER_BY_TS Timestamp [Timestamp ...]] [FILTER_BY_VALUE min max] [WITHLABELS|SELECTED_LABELS label1 [label1 ...]] [COUNT count] [[ALIGN value] AGGREGATION AVG|FIRST|LAST|MIN|MAX|SUM|RANGE|COUNT|STD.P|STD.S|VAR.P|VAR.S|TWA bucketDuration [BUCKETTIMESTAMP] [EMPTY]] FILTER l=v|l!=v|l=|l!=|l=(v1,v2,...)|l!=(v1,v2,...) [l=v|l!=v|l=|l!=|l=(v1,v2,...)|l!=(v1,v2,...) ...] [GROUPBY label REDUCE reducer]
Query a range across multiple time series by filters in forward directionTS.MREVRANGE fromTimestamp toTimestamp [FILTER_BY_TS Timestamp [Timestamp ...]] [FILTER_BY_VALUE min max] [WITHLABELS|SELECTED_LABELS label1 [label1 ...]] [COUNT count] [[ALIGN value] AGGREGATION AVG|FIRST|LAST|MIN|MAX|SUM|RANGE|COUNT|STD.P|STD.S|VAR.P|VAR.S|TWA bucketDuration [BUCKETTIMESTAMP] [EMPTY]] FILTER l=v|l!=v|l=|l!=|l=(v1,v2,...)|l!=(v1,v2,...) [l=v|l!=v|l=|l!=|l=(v1,v2,...)|l!=(v1,v2,...) ...] [GROUPBY label REDUCE reducer]
Query a range across multiple time-series by filters in reverse directionTS.QUERYINDEX l=v|l!=v|l=|l!=|l=(v1,v2,...)|l!=(v1,v2,...) [l=v|l!=v|l=|l!=|l=(v1,v2,...)|l!=(v1,v2,...) ...]
Get all time series keys matching a filter listTS.RANGE key fromTimestamp toTimestamp [FILTER_BY_TS Timestamp [Timestamp ...]] [FILTER_BY_VALUE min max] [COUNT count] [[ALIGN value] AGGREGATION AVG|FIRST|LAST|MIN|MAX|SUM|RANGE|COUNT|STD.P|STD.S|VAR.P|VAR.S|TWA bucketDuration [BUCKETTIMESTAMP] [EMPTY]]
Query a range in forward directionTS.REVRANGE key fromTimestamp toTimestamp [FILTER_BY_TS Timestamp [Timestamp ...]] [FILTER_BY_VALUE min max] [COUNT count] [[ALIGN value] AGGREGATION AVG|FIRST|LAST|MIN|MAX|SUM|RANGE|COUNT|STD.P|STD.S|VAR.P|VAR.S|TWA bucketDuration [BUCKETTIMESTAMP] [EMPTY]]
Query a range in reverse direction
Top-K
TOPK.ADD key items [items ...]
Increases the count of one or more items by incrementTOPK.Count key item [item ...]
Return the count for one or more items are in a sketchTOPK.INCRBY key item increment [item increment ...]
Increases the count of one or more items by incrementTOPK.INFO key
Returns information about a sketchTOPK.LIST key numKeys WITHCOUNT
Return full list of items in Top K listTOPK.QUERY key item [item ...]
Checks whether one or more items are in a sketchTOPK.RESERVE key topk [width depth decay]
Initializes a TopK with specified parameters