Valkey Commands
Complete reference for all 430 Valkey commands, grouped by data type. Includes first-party modules (Bloom filter, JSON, Search).
Bitmap
Operations on the Bitmap data type
BITCOUNT | Counts the number of set bits (population counting) in a string. |
|---|---|
BITFIELD | Performs arbitrary bitfield integer operations on strings. |
BITFIELD_RO | Performs arbitrary read-only bitfield integer operations on strings. |
BITOP | Performs bitwise operations on multiple strings, and stores the result. |
BITPOS | Finds the first set (1) or clear (0) bit in a string. |
GETBIT | Returns a bit value by offset. |
SETBIT | Sets or clears the bit at offset of the string value. Creates the key if it doesn't exist. |
Bloom filter
Operations on the Bloom filter data type
BF.ADD | Add a single item to a bloom filter. The bloom filter is created if it doesn't exist |
|---|---|
BF.CARD | Returns the cardinality of a bloom filter |
BF.EXISTS | Determines if the bloom filter contains the specified item |
BF.INFO | Returns usage information and properties of a specific bloom filter |
BF.INSERT | Creates a bloom filter with 0 or more items or adds items to an existing bloom filter |
BF.LOAD | Restores a bloom filter in a single operation. The command is only generated during AOF Rewrite of bloom filters |
BF.MADD | Adds one or more items to a bloom filter. The bloom filter is created if it doesn't exist |
BF.MEXISTS | Determines if the bloom filter contains one or more items |
BF.RESERVE | Creates an empty bloom filter with the specified properties |
Cluster
Valkey Cluster management
ASKING | Signals that a cluster client is following an -ASK redirect. |
|---|---|
CLUSTER | A container for Cluster commands. |
CLUSTER ADDSLOTS | Assigns new hash slots to a node. |
CLUSTER ADDSLOTSRANGE | Assigns new hash slot ranges to a node. |
CLUSTER BUMPEPOCH | Advances the cluster config epoch. |
CLUSTER CANCELSLOTMIGRATIONS | Cancel all current ongoing slot migration operations. |
CLUSTER COUNT-FAILURE-REPORTS | Returns the number of active failure reports for a node. No new reports are created once the node is marked as failed. |
CLUSTER COUNTKEYSINSLOT | Returns the number of keys in a hash slot. |
CLUSTER DELSLOTS | Sets hash slots as unbound for a node. |
CLUSTER DELSLOTSRANGE | Sets hash slot ranges as unbound for a node. |
CLUSTER FAILOVER | Forces a replica to perform a manual failover of its primary. |
CLUSTER FLUSHSLOTS | Deletes all slots information from a node. |
CLUSTER FORGET | Removes a node from the nodes table. |
CLUSTER GETKEYSINSLOT | Returns the key names in a hash slot. |
CLUSTER GETSLOTMIGRATIONS | Gets the status of ongoing and recently finished slot import and export operations. |
CLUSTER HELP | Returns helpful text about the different subcommands. |
CLUSTER INFO | Returns information about the state of a node. |
CLUSTER KEYSLOT | Returns the hash slot for a key. |
CLUSTER LINKS | Returns a list of all TCP links to and from peer nodes. |
CLUSTER MEET | Forces a node to handshake with another node. |
CLUSTER MIGRATESLOTS | Migrate the given slots from this node to the specified nodes. |
CLUSTER MYID | Returns the ID of a node. |
CLUSTER MYSHARDID | Returns the shard ID of a node. |
CLUSTER NODES | Returns the cluster configuration for a node. |
CLUSTER REPLICAS | Lists the replica nodes of a primary node. |
CLUSTER REPLICATE | Configures a node as replica of a primary node or detaches a replica from its primary. |
CLUSTER RESET | Resets a node. |
CLUSTER SAVECONFIG | Forces a node to save the cluster configuration to disk. |
CLUSTER SET-CONFIG-EPOCH | Sets the configuration epoch for a new node. |
CLUSTER SETSLOT | Binds a hash slot to a node. |
CLUSTER SHARDS | Returns the mapping of cluster slots to shards. |
CLUSTER SLAVES | Lists the replica nodes of a primary node. |
CLUSTER SLOT-STATS | Return an array of slot usage statistics for slots assigned to the current node. |
CLUSTER SLOTS | Returns the mapping of cluster slots to nodes. |
CLUSTER SYNCSLOTS | A container for internal slot migration commands. |
CLUSTERSCAN | Iterates over the keys in the cluster. |
READONLY | Enables read-only queries for a connection to a Valkey replica node. |
READWRITE | Enables read-write queries for a connection to a Valkey replica node. |
Connection
Client connections management
AUTH | Authenticates the connection. |
|---|---|
CLIENT | A container for client connection commands. |
CLIENT CACHING | Instructs the server whether to track the keys in the next request. |
CLIENT CAPA | A client claims its capability. |
CLIENT GETNAME | Returns the name of the connection. |
CLIENT GETREDIR | Returns the client ID to which the connection's tracking notifications are redirected. |
CLIENT HELP | Returns helpful text about the different subcommands. |
CLIENT ID | Returns the unique client ID of the connection. |
CLIENT IMPORT-SOURCE | Marks this client as an import source when the server is in import mode. |
CLIENT INFO | Returns information about the connection. |
CLIENT KILL | Terminates open connections. |
CLIENT LIST | Lists open connections. |
CLIENT NO-EVICT | Sets the client eviction mode of the connection. |
CLIENT NO-TOUCH | Controls whether commands sent by the client affect the LRU/LFU of accessed keys. |
CLIENT PAUSE | Suspends commands processing. |
CLIENT REPLY | Instructs the server whether to reply to commands. |
CLIENT SETINFO | Sets information specific to the client or connection. |
CLIENT SETNAME | Sets the connection name. |
CLIENT TRACKING | Controls server-assisted client-side caching for the connection. |
CLIENT TRACKINGINFO | Returns information about server-assisted client-side caching for the connection. |
CLIENT UNBLOCK | Unblocks a client blocked by a blocking command from a different connection. |
CLIENT UNPAUSE | Resumes processing commands from paused clients. |
ECHO | Returns the given string. |
HELLO | Handshakes with the server. |
PING | Returns the server's liveliness response. |
QUIT | Closes the connection. |
RESET | Resets the connection. |
SELECT | Changes the selected database. |
Generic
Generic commands
COPY | Copies the value of a key to a new key. |
|---|---|
DEL | Deletes one or more keys. |
DUMP | Returns a serialized representation of the value stored at a key. |
EXISTS | Determines whether one or more keys exist. |
EXPIRE | Sets the expiration time of a key in seconds. |
EXPIREAT | Sets the expiration time of a key to a Unix timestamp. |
EXPIRETIME | Returns the expiration time of a key as a Unix timestamp. |
KEYS | Returns all key names that match a pattern. |
MIGRATE | Atomically transfers a key from one instance to another. |
MOVE | Moves a key to another database. |
OBJECT | A container for object introspection commands. |
OBJECT ENCODING | Returns the internal encoding of an object. |
OBJECT FREQ | Returns the logarithmic access frequency counter of an object. |
OBJECT HELP | Returns helpful text about the different subcommands. |
OBJECT IDLETIME | Returns the time since the last access to an object. |
OBJECT REFCOUNT | Returns the reference count of a value of a key. |
PERSIST | Removes the expiration time of a key. |
PEXPIRE | Sets the expiration time of a key in milliseconds. |
PEXPIREAT | Sets the expiration time of a key to a Unix milliseconds timestamp. |
PEXPIRETIME | Returns the expiration time of a key as a Unix milliseconds timestamp. |
PTTL | Returns the expiration time in milliseconds of a key. |
RANDOMKEY | Returns a random key name from the database. |
RENAME | Renames a key and overwrites the destination. |
RENAMENX | Renames a key only when the target key name doesn't exist. |
RESTORE | Creates a key from the serialized representation of a value. |
SCAN | Iterates over the key names in the database. |
SORT | Sorts the elements in a list, a set, or a sorted set, optionally storing the result. |
SORT_RO | Returns the sorted elements of a list, a set, or a sorted set. |
TOUCH | Returns the number of existing keys out of those specified after updating the time they were last accessed. |
TTL | Returns the expiration time in seconds of a key. |
TYPE | Determines the type of value stored at a key. |
UNLINK | Asynchronously deletes one or more keys. |
WAIT | Blocks until the asynchronous replication of all preceding write commands sent by the connection is completed. |
WAITAOF | Blocks until all of the preceding write commands sent by the connection are written to the append-only file of the primary and/or replicas. |
Geospatial indices
Operations on the Geospatial Index data type
GEOADD | Adds one or more members to a geospatial index. The key is created if it doesn't exist. |
|---|---|
GEODIST | Returns the distance between two members of a geospatial index. |
GEOHASH | Returns members from a geospatial index as geohash strings. |
GEOPOS | Returns the longitude and latitude of members from a geospatial index. |
GEORADIUS | Queries a geospatial index for members within a distance from a coordinate, optionally stores the result. |
GEORADIUS_RO | Returns members from a geospatial index that are within a distance from a coordinate. |
GEORADIUSBYMEMBER | Queries a geospatial index for members within a distance from a member, optionally stores the result. |
GEORADIUSBYMEMBER_RO | Returns members from a geospatial index that are within a distance from a member. |
GEOSEARCH | Queries a geospatial index for members inside an area of a box, circle, or a polygon. |
GEOSEARCHSTORE | Queries a geospatial index for members inside an area of a box, a circle, or a polygon, optionally stores the result. |
Hash
Operations on the Hash data type
HDEL | Deletes one or more fields and their values from a hash. Deletes the hash if no fields remain. |
|---|---|
HEXISTS | Determines whether a field exists in a hash. |
HEXPIRE | Sets expiry time on hash fields. |
HEXPIREAT | Sets expiry time on hash fields. |
HEXPIRETIME | Returns Unix timestamps in seconds since the epoch at which the given key's field(s) will expire. |
HGET | Returns the value of a field in a hash. |
HGETALL | Returns all fields and values in a hash. |
HGETDEL | Returns the values of one or more fields and deletes them from a hash. |
HGETEX | Gets the value of one or more fields of a given hash key, and optionally sets their expiration time or time-to-live (TTL). |
HINCRBY | Increments the integer value of a field in a hash by a number. Uses 0 as initial value if the field doesn't exist. |
HINCRBYFLOAT | Increments the floating point value of a field by a number. Uses 0 as initial value if the field doesn't exist. |
HKEYS | Returns all fields in a hash. |
HLEN | Returns the number of fields in a hash. |
HMGET | Returns the values of all fields in a hash. |
HMSET | Sets the values of multiple fields. |
HPERSIST | Remove the existing expiration on a hash key's field(s). |
HPEXPIRE | Sets expiry time on hash object. |
HPEXPIREAT | Sets expiration time on hash field. |
HPEXPIRETIME | Returns the Unix timestamp in milliseconds since Unix epoch at which the given key's field(s) will expire. |
HPTTL | Returns the remaining time to live in milliseconds of a hash key's field(s) that have an associated expiration. |
HRANDFIELD | Returns one or more random fields from a hash. |
HSCAN | Iterates over fields and values of a hash. |
HSET | Creates or modifies the value of a field in a hash. |
HSETEX | Sets the value of one or more fields of a given hash key, and optionally sets their expiration time. |
HSETNX | Sets the value of a field in a hash only when the field doesn't exist. |
HSTRLEN | Returns the length of the value of a field. |
HTTL | Returns the remaining time to live (in seconds) of a hash key's field(s) that have an associated expiration. |
HVALS | Returns all values in a hash. |
HyperLogLog
Operations on the HyperLogLog data type
PFADD | Adds elements to a HyperLogLog key. Creates the key if it doesn't exist. |
|---|---|
PFCOUNT | Returns the approximated cardinality of the set(s) observed by the HyperLogLog key(s). |
PFDEBUG | Internal commands for debugging HyperLogLog values. |
PFMERGE | Merges one or more HyperLogLog values into a single key. |
PFSELFTEST | An internal command for testing HyperLogLog values. |
JSON
Operations on the JSON data type
JSON.ARRAPPEND | Append one or more values to the array values at the path. |
|---|---|
JSON.ARRINDEX | Search for the first occurrence of a scalar JSON value in arrays located at the specified path. Indices out of range are adjusted. |
JSON.ARRINSERT | Insert one or more values into an array at the given path before the specified index. |
JSON.ARRLEN | Get length of the array at the path. |
JSON.ARRPOP | Remove and returns the element at the given index. Popping an empty array returns null. |
JSON.ARRTRIM | Trim the array at the path so that it becomes subarray [start, end], both inclusive. |
JSON.CLEAR | Clear the arrays or an object at the specified path. |
JSON.DEBUG | Reports information. Supported subcommands are: MEMORY, DEPTH, FIELDS, HELP. KEYTABLE-CORRUPT, KEYTABLE-CLEAR, and KEYTABLE-DISTRIBUTION subcommands require 'json.debug-mode' to be enabled at module load time. |
JSON.DEL | Delete the JSON values at the specified path in a document key. |
JSON.FORGET | An alias of JSON.DEL. |
JSON.GET | Get the serialized JSON at one or multiple paths. |
JSON.MGET | Get serialized JSONs at the path from multiple document keys. Return null for non-existent key or JSON path. |
JSON.MSET | Set multiple JSON values at the path to multiple keys. |
JSON.NUMINCRBY | Increment the number values at the path by a given number. |
JSON.NUMMULTBY | Multiply the numeric values at the path by a given number. |
JSON.OBJKEYS | Retrieve the key names from the objects at the specified path. |
JSON.OBJLEN | Get the number of keys in the object at the specified path. |
JSON.RESP | Return the JSON value at the given path in Redis Serialization Protocol (RESP). |
JSON.SET | Set JSON values at the specified path. |
JSON.STRAPPEND | Append a string to the JSON strings at the specified path. |
JSON.STRLEN | Get the length of the JSON string values at the specified path. |
JSON.TOGGLE | Toggle boolean values between true and false at the specified path. |
JSON.TYPE | Report the type of the values at the given path. |
List
Operations on the List data type
BLMOVE | Pops an element from a list, pushes it to another list and returns it. Blocks until an element is available otherwise. Deletes the list if the last element was moved. |
|---|---|
BLMPOP | Pops the first element from one of multiple lists. Blocks until an element is available otherwise. Deletes the list if the last element was popped. |
BLPOP | Removes and returns the first element in a list. Blocks until an element is available otherwise. Deletes the list if the last element was popped. |
BRPOP | Removes and returns the last element in a list. Blocks until an element is available otherwise. Deletes the list if the last element was popped. |
BRPOPLPUSH | Pops an element from a list, pushes it to another list and returns it. Blocks until an element is available otherwise. Deletes the list if the last element was popped. |
LINDEX | Returns an element from a list by its index. |
LINSERT | Inserts an element before or after another element in a list. |
LLEN | Returns the length of a list. |
LMOVE | Returns an element after popping it from one list and pushing it to another. Deletes the list if the last element was moved. |
LMPOP | Returns multiple elements from a list after removing them. Deletes the list if the last element was popped. |
LPOP | Returns and removes one or more elements from the beginning of a list. Deletes the list if the last element was popped. |
LPOS | Returns the index of matching elements in a list. |
LPUSH | Prepends one or more elements to a list. Creates the key if it doesn't exist. |
LPUSHX | Prepends one or more elements to a list only when the list exists. |
LRANGE | Returns a range of elements from a list. |
LREM | Removes elements from a list. Deletes the list if the last element was removed. |
LSET | Sets the value of an element in a list by its index. |
LTRIM | Removes elements from both ends of a list. Deletes the list if all elements were trimmed. |
RPOP | Returns and removes one or more elements from the end of a list. Deletes the list if the last element was popped. |
RPOPLPUSH | Returns the last element of a list after removing and pushing it to another list. Deletes the list if the last element was popped. |
RPUSH | Appends one or more elements to a list. Creates the key if it doesn't exist. |
RPUSHX | Appends one or more elements to a list only when the list exists. |
Pub/Sub
Pub/Sub commands
PSUBSCRIBE | Listens for messages published to channels that match one or more patterns. |
|---|---|
PUBLISH | Posts a message to a channel. |
PUBSUB | A container for Pub/Sub commands. |
PUBSUB CHANNELS | Returns the active channels. |
PUBSUB HELP | Returns helpful text about the different subcommands. |
PUBSUB NUMPAT | Returns a count of unique pattern subscriptions. |
PUBSUB NUMSUB | Returns a count of subscribers to channels. |
PUBSUB SHARDCHANNELS | Returns the active shard channels. |
PUBSUB SHARDNUMSUB | Returns the count of subscribers of shard channels. |
PUNSUBSCRIBE | Stops listening to messages published to channels that match one or more patterns. |
SPUBLISH | Posts a message to a shard channel. |
SSUBSCRIBE | Listens for messages published to shard channels. |
SUBSCRIBE | Listens for messages published to channels. |
SUNSUBSCRIBE | Stops listening to messages posted to shard channels. |
UNSUBSCRIBE | Stops listening to messages posted to channels. |
Scripting and Functions
Valkey server-side scripting and functions
EVAL | Executes a server-side Lua script. |
|---|---|
EVAL_RO | Executes a read-only server-side Lua script. |
EVALSHA | Executes a server-side Lua script by SHA1 digest. |
EVALSHA_RO | Executes a read-only server-side Lua script by SHA1 digest. |
FCALL | Invokes a function. |
FCALL_RO | Invokes a read-only function. |
FUNCTION | A container for function commands. |
FUNCTION DELETE | Deletes a library and its functions. |
FUNCTION DUMP | Dumps all libraries into a serialized binary payload. |
FUNCTION FLUSH | Deletes all libraries and functions. |
FUNCTION HELP | Returns helpful text about the different subcommands. |
FUNCTION KILL | Terminates a function during execution. |
FUNCTION LIST | Returns information about all libraries. |
FUNCTION LOAD | Creates a library. |
FUNCTION RESTORE | Restores all libraries from a payload. |
FUNCTION STATS | Returns information about a function during execution. |
SCRIPT | A container for Lua scripts management commands. |
SCRIPT DEBUG | Sets the debug mode of server-side Lua scripts. |
SCRIPT EXISTS | Determines whether server-side Lua scripts exist in the script cache. |
SCRIPT FLUSH | Removes all server-side Lua scripts from the script cache. |
SCRIPT HELP | Returns helpful text about the different subcommands. |
SCRIPT KILL | Terminates a server-side Lua script during execution. |
SCRIPT LOAD | Loads a server-side Lua script to the script cache. |
SCRIPT SHOW | Show server-side Lua script in the script cache. |
Server
Server management commands
ACL | A container for Access List Control commands. |
|---|---|
ACL CAT | Lists the ACL categories, or the commands inside a category. |
ACL DELUSER | Deletes ACL users, and terminates their connections. |
ACL DRYRUN | Simulates the execution of a command by a user, without executing the command. |
ACL GENPASS | Generates a pseudorandom, secure password that can be used to identify ACL users. |
ACL GETUSER | Lists the ACL rules of a user. |
ACL HELP | Returns helpful text about the different subcommands. |
ACL LIST | Dumps the effective rules in ACL file format. |
ACL LOAD | Reloads the rules from the configured ACL file. |
ACL LOG | Lists recent security events generated due to ACL rules. |
ACL SAVE | Saves the effective ACL rules in the configured ACL file. |
ACL SETUSER | Creates and modifies an ACL user and its rules. |
ACL USERS | Lists all ACL users. |
ACL WHOAMI | Returns the authenticated username of the current connection. |
BGREWRITEAOF | Asynchronously rewrites the append-only file to disk. |
BGSAVE | Asynchronously saves the database(s) to disk. |
COMMAND | Returns detailed information about all commands. |
COMMAND COUNT | Returns a count of commands. |
COMMAND DOCS | Returns documentary information about one, multiple or all commands. |
COMMAND GETKEYS | Extracts the key names from an arbitrary command. |
COMMAND GETKEYSANDFLAGS | Extracts the key names and access flags for an arbitrary command. |
COMMAND HELP | Returns helpful text about the different subcommands. |
COMMAND INFO | Returns information about one, multiple or all commands. |
COMMAND LIST | Returns a list of command names. |
COMMANDLOG | A container for command log commands. |
COMMANDLOG GET | Returns the specified command log's entries. |
COMMANDLOG HELP | Shows helpful text about the different subcommands. |
COMMANDLOG LEN | Returns the number of entries in the specified type of command log. |
COMMANDLOG RESET | Clears all entries from the specified type of command log. |
CONFIG | A container for server configuration commands. |
CONFIG GET | Returns the effective values of configuration parameters. |
CONFIG HELP | Returns helpful text about the different subcommands. |
CONFIG RESETSTAT | Resets the server's statistics. |
CONFIG REWRITE | Persists the effective configuration to file. |
CONFIG SET | Sets configuration parameters in-flight. |
DBSIZE | Returns the number of keys in the database. |
DEBUG | A container for debugging commands. |
FAILOVER | Starts a coordinated failover from a server to one of its replicas. |
FLUSHALL | Removes all keys from all databases. |
FLUSHDB | Removes all keys from the current database. |
INFO | Returns information and statistics about the server. |
LASTSAVE | Returns the Unix timestamp of the last successful save to disk. |
LATENCY | A container for latency diagnostics commands. |
LATENCY DOCTOR | Returns a human-readable latency analysis report. |
LATENCY GRAPH | Returns a latency graph for an event. |
LATENCY HELP | Returns helpful text about the different subcommands. |
LATENCY HISTOGRAM | Returns the cumulative distribution of latencies of a subset or all commands. |
LATENCY HISTORY | Returns timestamp-latency samples for an event. |
LATENCY LATEST | Returns the latest latency samples for all events. |
LATENCY RESET | Resets the latency data for one or more events. |
LOLWUT | Displays computer art and the server version. |
MEMORY | A container for memory diagnostics commands. |
MEMORY DOCTOR | Outputs a memory problems report. |
MEMORY HELP | Returns helpful text about the different subcommands. |
MEMORY MALLOC-STATS | Returns the allocator statistics. |
MEMORY PURGE | Asks the allocator to release memory. |
MEMORY STATS | Returns details about memory usage. |
MEMORY USAGE | Estimates the memory usage of a key. |
MODULE | A container for module commands. |
MODULE HELP | Returns helpful text about the different subcommands. |
MODULE LIST | Returns all loaded modules. |
MODULE LOAD | Loads a module. |
MODULE LOADEX | Loads a module using extended parameters. |
MODULE UNLOAD | Unloads a module. |
MONITOR | Listens for all requests received by the server in real-time. |
PSYNC | An internal command used in replication. |
REPLCONF | An internal command for configuring the replication stream. |
REPLICAOF | Configures a server as replica of another, or promotes it to a primary. |
RESTORE ASKING | An internal command for migrating keys in a cluster. |
ROLE | Returns the replication role. |
SAVE | Synchronously saves the database(s) to disk. |
SHUTDOWN | Synchronously saves the database(s) to disk and shuts down the server. |
SLAVEOF | Sets a server as a replica of another, or promotes it to being a primary. |
SLOWLOG | A container for slow log commands. |
SLOWLOG GET | Returns the slow log's entries. |
SLOWLOG HELP | Shows helpful text about the different subcommands. |
SLOWLOG LEN | Returns the number of entries in the slow log. |
SLOWLOG RESET | Clears all entries from the slow log. |
SWAPDB | Swaps two databases. |
SYNC | An internal command used in replication. |
TIME | Returns the server time. |
Set
Operations on the Set data type
SADD | Adds one or more members to a set. Creates the key if it doesn't exist. |
|---|---|
SCARD | Returns the number of members in a set. |
SDIFF | Returns the difference of multiple sets. |
SDIFFSTORE | Stores the difference of multiple sets in a key. |
SINTER | Returns the intersect of multiple sets. |
SINTERCARD | Returns the number of members of the intersect of multiple sets. |
SINTERSTORE | Stores the intersect of multiple sets in a key. |
SISMEMBER | Determines whether a member belongs to a set. |
SMEMBERS | Returns all members of a set. |
SMISMEMBER | Determines whether multiple members belong to a set. |
SMOVE | Moves a member from one set to another. |
SPOP | Returns one or more random members from a set after removing them. Deletes the set if the last member was popped. |
SRANDMEMBER | Gets one or multiple random members from a set. |
SREM | Removes one or more members from a set. Deletes the set if the last member was removed. |
SSCAN | Iterates over members of a set. |
SUNION | Returns the union of multiple sets. |
SUNIONSTORE | Stores the union of multiple sets in a key. |
Sorted Set
Operations on the Sorted Set data type
BZMPOP | Removes and returns a member by score from one or more sorted sets. Blocks until a member is available otherwise. Deletes the sorted set if the last element was popped. |
|---|---|
BZPOPMAX | Removes and returns the member with the highest score from one or more sorted sets. Blocks until a member is available otherwise. Deletes the sorted set if the last element was popped. |
BZPOPMIN | Removes and returns the member with the lowest score from one or more sorted sets. Blocks until a member is available otherwise. Deletes the sorted set if the last element was popped. |
ZADD | Adds one or more members to a sorted set, or updates their scores. Creates the key if it doesn't exist. |
ZCARD | Returns the number of members in a sorted set. |
ZCOUNT | Returns the count of members in a sorted set that have scores within a range. |
ZDIFF | Returns the difference between multiple sorted sets. |
ZDIFFSTORE | Stores the difference of multiple sorted sets in a key. |
ZINCRBY | Increments the score of a member in a sorted set. |
ZINTER | Returns the intersect of multiple sorted sets. |
ZINTERCARD | Returns the number of members of the intersect of multiple sorted sets. |
ZINTERSTORE | Stores the intersect of multiple sorted sets in a key. |
ZLEXCOUNT | Returns the number of members in a sorted set within a lexicographical range. |
ZMPOP | Returns the highest- or lowest-scoring members from one or more sorted sets after removing them. Deletes the sorted set if the last member was popped. |
ZMSCORE | Returns the score of one or more members in a sorted set. |
ZPOPMAX | Returns the highest-scoring members from a sorted set after removing them. Deletes the sorted set if the last member was popped. |
ZPOPMIN | Returns the lowest-scoring members from a sorted set after removing them. Deletes the sorted set if the last member was popped. |
ZRANDMEMBER | Returns one or more random members from a sorted set. |
ZRANGE | Returns members in a sorted set within a range of indexes. |
ZRANGEBYLEX | Returns members in a sorted set within a lexicographical range. |
ZRANGEBYSCORE | Returns members in a sorted set within a range of scores. |
ZRANGESTORE | Stores a range of members from sorted set in a key. |
ZRANK | Returns the index of a member in a sorted set ordered by ascending scores. |
ZREM | Removes one or more members from a sorted set. Deletes the sorted set if all members were removed. |
ZREMRANGEBYLEX | Removes members in a sorted set within a lexicographical range. Deletes the sorted set if all members were removed. |
ZREMRANGEBYRANK | Removes members in a sorted set within a range of indexes. Deletes the sorted set if all members were removed. |
ZREMRANGEBYSCORE | Removes members in a sorted set within a range of scores. Deletes the sorted set if all members were removed. |
ZREVRANGE | Returns members in a sorted set within a range of indexes in reverse order. |
ZREVRANGEBYLEX | Returns members in a sorted set within a lexicographical range in reverse order. |
ZREVRANGEBYSCORE | Returns members in a sorted set within a range of scores in reverse order. |
ZREVRANK | Returns the index of a member in a sorted set ordered by descending scores. |
ZSCAN | Iterates over members and scores of a sorted set. |
ZSCORE | Returns the score of a member in a sorted set. |
ZUNION | Returns the union of multiple sorted sets. |
ZUNIONSTORE | Stores the union of multiple sorted sets in a key. |
Stream
Operations on the Stream data type
XACK | Returns the number of messages that were successfully acknowledged by the consumer group member of a stream. |
|---|---|
XADD | Appends a new message to a stream. Creates the key if it doesn't exist. |
XAUTOCLAIM | Changes, or acquires, ownership of messages in a consumer group, as if the messages were delivered to a consumer group member. |
XCLAIM | Changes, or acquires, ownership of a message in a consumer group, as if the message was delivered to a consumer group member. |
XDEL | Returns the number of messages after removing them from a stream. |
XGROUP | A container for consumer groups commands. |
XGROUP CREATE | Creates a consumer group. |
XGROUP CREATECONSUMER | Creates a consumer in a consumer group. |
XGROUP DELCONSUMER | Deletes a consumer from a consumer group. |
XGROUP DESTROY | Destroys a consumer group. |
XGROUP HELP | Returns helpful text about the different subcommands. |
XGROUP SETID | Sets the last-delivered ID of a consumer group. |
XINFO | A container for stream introspection commands. |
XINFO CONSUMERS | Returns a list of the consumers in a consumer group. |
XINFO GROUPS | Returns a list of the consumer groups of a stream. |
XINFO HELP | Returns helpful text about the different subcommands. |
XINFO STREAM | Returns information about a stream. |
XLEN | Returns the number of messages in a stream. |
XPENDING | Returns the information and entries from a stream consumer group's pending entries list. |
XRANGE | Returns the messages from a stream within a range of IDs. |
XREAD | Returns messages from multiple streams with IDs greater than the ones requested. Blocks until a message is available otherwise. |
XREADGROUP | Returns new or historical messages from a stream for a consumer in a group. Blocks until a message is available otherwise. |
XREVRANGE | Returns the messages from a stream within a range of IDs in reverse order. |
XSETID | An internal command for replicating stream values. |
XTRIM | Deletes messages from the beginning of a stream. |
String
Operations on the String data type
APPEND | Appends a string to the value of a key. Creates the key if it doesn't exist. |
|---|---|
DECR | Decrements the integer value of a key by one. Uses 0 as initial value if the key doesn't exist. |
DECRBY | Decrements the integer value of a key by a number. Uses 0 as initial value if the key doesn't exist. |
DELIFEQ | Delete key if value matches string. |
GET | Returns the string value of a key. |
GETDEL | Returns the string value of a key after deleting the key. |
GETEX | Returns the string value of a key after setting its expiration time. |
GETRANGE | Returns a substring of the string stored at a key. |
GETSET | Returns the previous string value of a key after setting it to a new value. |
INCR | Increments the integer value of a key by one. Uses 0 as initial value if the key doesn't exist. |
INCRBY | Increments the integer value of a key by a number. Uses 0 as initial value if the key doesn't exist. |
INCRBYFLOAT | Increments the floating point value of a key by a number. Uses 0 as initial value if the key doesn't exist. |
LCS | Finds the longest common substring. |
MGET | Atomically returns the string values of one or more keys. |
MSET | Atomically creates or modifies the string values of one or more keys. |
MSETEX | Atomically creates or modifies the string values of one or more keys, and optionally set their expiration. |
MSETNX | Atomically modifies the string values of one or more keys only when all keys don't exist. |
PSETEX | Sets both string value and expiration time in milliseconds of a key. The key is created if it doesn't exist. |
SET | Sets the string value of a key, ignoring its type. The key is created if it doesn't exist. |
SETEX | Sets the string value and expiration time of a key. Creates the key if it doesn't exist. |
SETNX | Sets the string value of a key only when the key doesn't exist. |
SETRANGE | Overwrites a part of a string value with another by an offset. Creates the key if it doesn't exist. |
STRLEN | Returns the length of a string value. |
SUBSTR | Returns a substring from a string value. |
Transactions
Valkey Transaction management
DISCARD | Discards a transaction. |
|---|---|
EXEC | Executes all commands in a transaction. |
MULTI | Starts a transaction. |
UNWATCH | Forgets about watched keys of a transaction. |
WATCH | Monitors changes to keys to determine the execution of a transaction. |
Alphabetical Command List
-
ACL -
ACL CAT -
ACL DELUSER -
ACL DRYRUN -
ACL GENPASS -
ACL GETUSER -
ACL HELP -
ACL LIST -
ACL LOAD -
ACL LOG -
ACL SAVE -
ACL SETUSER -
ACL USERS -
ACL WHOAMI -
APPEND -
ASKING -
AUTH -
BF.ADD -
BF.CARD -
BF.EXISTS -
BF.INFO -
BF.INSERT -
BF.LOAD -
BF.MADD -
BF.MEXISTS -
BF.RESERVE -
BGREWRITEAOF -
BGSAVE -
BITCOUNT -
BITFIELD -
BITFIELD_RO -
BITOP -
BITPOS -
BLMOVE -
BLMPOP -
BLPOP -
BRPOP -
BRPOPLPUSH -
BZMPOP -
BZPOPMAX -
BZPOPMIN -
CLIENT -
CLIENT CACHING -
CLIENT CAPA -
CLIENT GETNAME -
CLIENT GETREDIR -
CLIENT HELP -
CLIENT ID -
CLIENT IMPORT-SOURCE -
CLIENT INFO -
CLIENT KILL -
CLIENT LIST -
CLIENT NO-EVICT -
CLIENT NO-TOUCH -
CLIENT PAUSE -
CLIENT REPLY -
CLIENT SETINFO -
CLIENT SETNAME -
CLIENT TRACKING -
CLIENT TRACKINGINFO -
CLIENT UNBLOCK -
CLIENT UNPAUSE -
CLUSTER -
CLUSTER ADDSLOTS -
CLUSTER ADDSLOTSRANGE -
CLUSTER BUMPEPOCH -
CLUSTER CANCELSLOTMIGRATIONS -
CLUSTER COUNT-FAILURE-REPORTS -
CLUSTER COUNTKEYSINSLOT -
CLUSTER DELSLOTS -
CLUSTER DELSLOTSRANGE -
CLUSTER FAILOVER -
CLUSTER FLUSHSLOTS -
CLUSTER FORGET -
CLUSTER GETKEYSINSLOT -
CLUSTER GETSLOTMIGRATIONS -
CLUSTER HELP -
CLUSTER INFO -
CLUSTER KEYSLOT -
CLUSTER LINKS -
CLUSTER MEET -
CLUSTER MIGRATESLOTS -
CLUSTER MYID -
CLUSTER MYSHARDID -
CLUSTER NODES -
CLUSTER REPLICAS -
CLUSTER REPLICATE -
CLUSTER RESET -
CLUSTER SAVECONFIG -
CLUSTER SET-CONFIG-EPOCH -
CLUSTER SETSLOT -
CLUSTER SHARDS -
CLUSTER SLAVES -
CLUSTER SLOT-STATS -
CLUSTER SLOTS -
CLUSTER SYNCSLOTS -
CLUSTERSCAN -
COMMAND -
COMMAND COUNT -
COMMAND DOCS -
COMMAND GETKEYS -
COMMAND GETKEYSANDFLAGS -
COMMAND HELP -
COMMAND INFO -
COMMAND LIST -
COMMANDLOG -
COMMANDLOG GET -
COMMANDLOG HELP -
COMMANDLOG LEN -
COMMANDLOG RESET -
CONFIG -
CONFIG GET -
CONFIG HELP -
CONFIG RESETSTAT -
CONFIG REWRITE -
CONFIG SET -
COPY -
DBSIZE -
DEBUG -
DECR -
DECRBY -
DEL -
DELIFEQ -
DISCARD -
DUMP -
ECHO -
EVAL -
EVAL_RO -
EVALSHA -
EVALSHA_RO -
EXEC -
EXISTS -
EXPIRE -
EXPIREAT -
EXPIRETIME -
FAILOVER -
FCALL -
FCALL_RO -
FLUSHALL -
FLUSHDB -
FUNCTION -
FUNCTION DELETE -
FUNCTION DUMP -
FUNCTION FLUSH -
FUNCTION HELP -
FUNCTION KILL -
FUNCTION LIST -
FUNCTION LOAD -
FUNCTION RESTORE -
FUNCTION STATS -
GEOADD -
GEODIST -
GEOHASH -
GEOPOS -
GEORADIUS -
GEORADIUS_RO -
GEORADIUSBYMEMBER -
GEORADIUSBYMEMBER_RO -
GEOSEARCH -
GEOSEARCHSTORE -
GET -
GETBIT -
GETDEL -
GETEX -
GETRANGE -
GETSET -
HDEL -
HELLO -
HEXISTS -
HEXPIRE -
HEXPIREAT -
HEXPIRETIME -
HGET -
HGETALL -
HGETDEL -
HGETEX -
HINCRBY -
HINCRBYFLOAT -
HKEYS -
HLEN -
HMGET -
HMSET -
HPERSIST -
HPEXPIRE -
HPEXPIREAT -
HPEXPIRETIME -
HPTTL -
HRANDFIELD -
HSCAN -
HSET -
HSETEX -
HSETNX -
HSTRLEN -
HTTL -
HVALS -
INCR -
INCRBY -
INCRBYFLOAT -
INFO -
JSON.ARRAPPEND -
JSON.ARRINDEX -
JSON.ARRINSERT -
JSON.ARRLEN -
JSON.ARRPOP -
JSON.ARRTRIM -
JSON.CLEAR -
JSON.DEBUG -
JSON.DEL -
JSON.FORGET -
JSON.GET -
JSON.MGET -
JSON.MSET -
JSON.NUMINCRBY -
JSON.NUMMULTBY -
JSON.OBJKEYS -
JSON.OBJLEN -
JSON.RESP -
JSON.SET -
JSON.STRAPPEND -
JSON.STRLEN -
JSON.TOGGLE -
JSON.TYPE -
KEYS -
LASTSAVE -
LATENCY -
LATENCY DOCTOR -
LATENCY GRAPH -
LATENCY HELP -
LATENCY HISTOGRAM -
LATENCY HISTORY -
LATENCY LATEST -
LATENCY RESET -
LCS -
LINDEX -
LINSERT -
LLEN -
LMOVE -
LMPOP -
LOLWUT -
LPOP -
LPOS -
LPUSH -
LPUSHX -
LRANGE -
LREM -
LSET -
LTRIM -
MEMORY -
MEMORY DOCTOR -
MEMORY HELP -
MEMORY MALLOC-STATS -
MEMORY PURGE -
MEMORY STATS -
MEMORY USAGE -
MGET -
MIGRATE -
MODULE -
MODULE HELP -
MODULE LIST -
MODULE LOAD -
MODULE LOADEX -
MODULE UNLOAD -
MONITOR -
MOVE -
MSET -
MSETEX -
MSETNX -
MULTI -
OBJECT -
OBJECT ENCODING -
OBJECT FREQ -
OBJECT HELP -
OBJECT IDLETIME -
OBJECT REFCOUNT -
PERSIST -
PEXPIRE -
PEXPIREAT -
PEXPIRETIME -
PFADD -
PFCOUNT -
PFDEBUG -
PFMERGE -
PFSELFTEST -
PING -
PSETEX -
PSUBSCRIBE -
PSYNC -
PTTL -
PUBLISH -
PUBSUB -
PUBSUB CHANNELS -
PUBSUB HELP -
PUBSUB NUMPAT -
PUBSUB NUMSUB -
PUBSUB SHARDCHANNELS -
PUBSUB SHARDNUMSUB -
PUNSUBSCRIBE -
QUIT -
RANDOMKEY -
READONLY -
READWRITE -
RENAME -
RENAMENX -
REPLCONF -
REPLICAOF -
RESET -
RESTORE -
RESTORE ASKING -
ROLE -
RPOP -
RPOPLPUSH -
RPUSH -
RPUSHX -
SADD -
SAVE -
SCAN -
SCARD -
SCRIPT -
SCRIPT DEBUG -
SCRIPT EXISTS -
SCRIPT FLUSH -
SCRIPT HELP -
SCRIPT KILL -
SCRIPT LOAD -
SCRIPT SHOW -
SDIFF -
SDIFFSTORE -
SELECT -
SET -
SETBIT -
SETEX -
SETNX -
SETRANGE -
SHUTDOWN -
SINTER -
SINTERCARD -
SINTERSTORE -
SISMEMBER -
SLAVEOF -
SLOWLOG -
SLOWLOG GET -
SLOWLOG HELP -
SLOWLOG LEN -
SLOWLOG RESET -
SMEMBERS -
SMISMEMBER -
SMOVE -
SORT -
SORT_RO -
SPOP -
SPUBLISH -
SRANDMEMBER -
SREM -
SSCAN -
SSUBSCRIBE -
STRLEN -
SUBSCRIBE -
SUBSTR -
SUNION -
SUNIONSTORE -
SUNSUBSCRIBE -
SWAPDB -
SYNC -
TIME -
TOUCH -
TTL -
TYPE -
UNLINK -
UNSUBSCRIBE -
UNWATCH -
WAIT -
WAITAOF -
WATCH -
XACK -
XADD -
XAUTOCLAIM -
XCLAIM -
XDEL -
XGROUP -
XGROUP CREATE -
XGROUP CREATECONSUMER -
XGROUP DELCONSUMER -
XGROUP DESTROY -
XGROUP HELP -
XGROUP SETID -
XINFO -
XINFO CONSUMERS -
XINFO GROUPS -
XINFO HELP -
XINFO STREAM -
XLEN -
XPENDING -
XRANGE -
XREAD -
XREADGROUP -
XREVRANGE -
XSETID -
XTRIM -
ZADD -
ZCARD -
ZCOUNT -
ZDIFF -
ZDIFFSTORE -
ZINCRBY -
ZINTER -
ZINTERCARD -
ZINTERSTORE -
ZLEXCOUNT -
ZMPOP -
ZMSCORE -
ZPOPMAX -
ZPOPMIN -
ZRANDMEMBER -
ZRANGE -
ZRANGEBYLEX -
ZRANGEBYSCORE -
ZRANGESTORE -
ZRANK -
ZREM -
ZREMRANGEBYLEX -
ZREMRANGEBYRANK -
ZREMRANGEBYSCORE -
ZREVRANGE -
ZREVRANGEBYLEX -
ZREVRANGEBYSCORE -
ZREVRANK -
ZSCAN -
ZSCORE -
ZUNION -
ZUNIONSTORE