Command reference
Find a command, understand its arguments, and inspect requests and replies from a real Lavik instance.
Examples below run against the Lavik 0.2.0 release in standalone mode. The reference includes supported calls and explicitly labeled rejection cases; consult Compatibility Overview for managed Single and Cluster behavior.
218 / 218 commands
Provides an additional replication-source command whose verified invocation is rejected.
Rejection behavior testedAppends bytes to a string value.
Authenticates the connection using the configured password.
Starts a background save.
Counts set bits in a string value.
Updates and reads an integer encoded in a string's bits.
Reads an integer bit field without modifying the string.
Stores the bitwise OR of source strings in a destination key.
Finds the position of the first matching bit.
Moves an element from the source's left end to the destination's right end, with a waiting timeout.
Pops a batch from a list's left end with a waiting timeout.
Removes a list's leftmost element, waiting up to a timeout when necessary.
Removes a list's rightmost element, waiting up to a timeout when necessary.
Moves the source's rightmost element to the destination's left end, waiting when necessary.
Removes a batch of lowest-score members with a waiting timeout.
Removes the highest-score member, waiting up to a timeout if needed.
Removes the lowest-score member, waiting up to a timeout if needed.
Manages connection naming and library metadata and reports client identity.
Calculates a key's hash slot through KEYSLOT.
Counts registered commands or extracts command key arguments.
Reads or changes runtime configuration and resets command statistics.
Copies a key's value to a destination key.
Counts keys in the selected database.
Decrements an integer string value by one.
Subtracts an integer amount from a string counter.
Inspects, pauses or resumes defragmentation maintenance.
Deletes a key.
Cancels the queued transaction.
Serializes a key's value for transfer to RESTORE.
Returns the supplied message.
Executes a supplied Lua script with declared keys.
Executes a cached Lua script identified by its SHA digest.
Executes a cached Lua script through the read-only invocation path.
Executes a Lua script through the read-only invocation path.
Executes the commands queued by MULTI.
Counts existing keys among the supplied names.
Sets a key's remaining lifetime in seconds.
Sets a key's expiry to an absolute Unix timestamp in seconds.
Reports a key's absolute expiry timestamp in seconds.
Invokes a function registered in a loaded library.
Invokes a registered function through the read-only path.
Requests removal of all database contents.
Removes keys from the selected database.
Manages registered function libraries and their serialized representation.
Adds a named geographic location to a key.
Reports the distance between two stored locations in kilometers.
Returns the geohash representation of a stored location.
Returns a stored member's geographic coordinates.
Finds stored locations within a radius of supplied coordinates.
Finds locations within a radius of a stored member.
Performs a read-only radius query centered on a stored member.
Performs a read-only radius query around supplied coordinates.
Finds locations by radius around a named member.
Stores the results of a member-centered geographic radius search.
Retrieves the string value stored at a key.
Reads the bit at a string's specified bit offset.
Returns a string value and removes its key.
Retrieves a string while setting its expiry in seconds.
Returns a byte range from a string.
Replaces a string value and returns its previous value.
Removes a field from a hash.
Selects RESP2 or RESP3 and reports connection and server information.
Checks whether a hash contains a field.
Retrieves one hash field's value.
Retrieves all fields and values from a hash.
Adds an integer increment to a hash field.
Adds a floating-point increment to a hash field.
Returns the field names in a hash.
Counts the fields in a hash.
Retrieves hash field values in the requested order.
Sets hash fields using merge semantics.
Returns a randomly selected hash field name.
Iterates over a hash's fields and values using a cursor.
Adds or updates fields in a hash.
Sets a hash field only if that field does not exist.
Reports the byte length of a hash field's value.
Returns the values stored in a hash.
Increments an integer string value by one.
Adds an integer increment to a string counter.
Adds a floating-point increment to a numeric string.
Reports server or replication status information.
Returns key names matching a pattern.
Reports the timestamp of the last successful save.
Atomically replaces all fields of an existing hash while preserving its key expiry.
Configure native Lavik replication for a standalone node.
Returns a longest common subsequence of two string values.
Returns the list element at a specified index.
Inserts an element before a matching list pivot.
Returns the number of elements in a list.
Moves the source list's leftmost element to the destination's right end.
Removes a requested batch from the left end of a list.
Removes and returns the leftmost list element.
Finds the position of a matching list element.
Prepends an element to a list.
Prepends an element only to an existing list.
Returns a range of list elements.
Removes matching elements from a list.
Replaces the list element at an index.
Keeps a specified list range and removes elements outside it.
Retrieves several string values in key argument order.
Streams observed command activity to the connection.
Stores several string key-value pairs in one command.
Stores all supplied string pairs only if none of their keys exists.
Starts queuing commands for a transaction.
Removes a key's expiry.
Sets a key's remaining lifetime in milliseconds.
Sets a key's expiry to an absolute Unix timestamp in milliseconds.
Reports a key's absolute expiry timestamp in milliseconds.
Checks whether the connection can receive a server response.
Stores a string with an expiry measured in milliseconds.
Subscribes the connection to channels matching a pattern.
Reports a key's remaining lifetime in milliseconds.
Sends a message to matching channel and pattern subscriptions.
Reports the number of channel subscribers.
Removes a pattern subscription from the connection.
Requests the end of the client connection.
Returns a randomly selected key from the database.
Accepts a connection read-mode request.
Accepts a connection read/write-mode request.
Changes a key's name.
Renames a key only when the destination does not exist.
Requests standalone master role with the NO ONE form.
Resets the connection's session state.
Creates a key from a serialized value.
Reports the server's current replication role.
Removes and returns the rightmost list element.
Moves the source list's rightmost element to the destination's left end.
Appends elements to a list.
Appends an element only to an existing list.
Adds a member to a set.
Performs a synchronous save.
Iterates over keys using a cursor and a pattern filter.
Returns a set's member count.
Loads scripts, checks their presence, or clears the script cache.
Returns members of the first set that are absent from the second.
Stores a set difference in a destination key.
Requests a logical database for the connection.
Stores a string, optionally with tested existence conditions or expiry.
Changes one bit in a string and returns its previous value.
Stores a string with an expiry measured in seconds.
Stores a string only when its key does not exist.
Overwrites string bytes starting at an offset.
Returns members shared by the input sets.
Counts members in a set intersection.
Stores the intersection of input sets.
Checks whether a set contains a member.
Requests standalone master role using the SLAVEOF command name.
Inspects or clears the slow-command log.
Returns all members of a set.
Checks several set members in one request.
Moves a member from one set to another.
Returns the elements of a collection in sorted order.
Returns sorted collection elements through the read-only command.
Removes and returns a randomly selected set member.
Returns a random set member without removing it.
Removes a specified member from a set.
Iterates through set members with a cursor.
Returns the byte length of a string value.
Subscribes the connection to messages on a channel.
Returns a substring selected by byte offsets.
Returns the union of input sets.
Stores a set union in a destination key.
Inspects or toggles the TombRaider maintenance service.
Touches the supplied keys and reports how many exist.
Reports a key's remaining lifetime in seconds.
Reports the value type stored at a key.
Removes a key from the keyspace.
Removes a channel subscription from the connection.
Clears the connection's watched-key registrations.
Requests a replication acknowledgement count for preceding writes.
Registers a key for optimistic transaction conflict detection.
Acknowledges a stream entry pending in a consumer group.
Appends an entry with a specified ID to a stream.
Scans and transfers eligible pending entries to a consumer.
Transfers a pending entry to another consumer.
Deletes a stream entry by ID.
Creates stream consumer groups and consumers, or destroys a group.
Reports stream metadata.
Returns the number of entries in a stream.
Summarizes a consumer group's pending entries.
Returns stream entries in ascending ID order within a range.
Reads stream entries after a supplied ID.
Delivers new stream entries to a consumer in a group.
Returns stream entries in descending ID order within a range.
Sets the stream's last-generated ID metadata.
Trims a stream to a maximum entry count.
Adds members with scores to a sorted set.
Counts members in a sorted set.
Counts sorted-set members within a score range.
Returns the difference of sorted-set inputs.
Stores a sorted-set difference in a destination.
Adds an increment to a sorted-set member's score.
Returns the intersection of sorted-set inputs.
Counts members in a sorted-set intersection.
Stores a sorted-set intersection in a destination.
Counts members within a lexicographical range.
Removes a batch of lowest-score members from a sorted set.
Retrieves scores for several sorted-set members.
Removes and returns the highest-score member and its score.
Removes and returns the lowest-score member and its score.
Returns a random sorted-set member without removing it.
Returns a rank range of sorted-set members with their scores.
Returns sorted-set members within a lexicographical range.
Returns members within an ascending score range.
Stores a rank range from a sorted set in a destination key.
Returns a member's rank in ascending score order.
Removes a specified member from a sorted set.
Removes members within a lexicographical range.
Removes sorted-set members within a rank range.
Removes sorted-set members within a score range.
Returns a rank range in descending score order.
Returns a lexicographical range in reverse order.
Returns a score range in descending order.
Returns a member's rank in descending score order.
Iterates through sorted-set members and scores with a cursor.
Retrieves the score of a sorted-set member.
Returns the union of sorted-set inputs.
Stores a sorted-set union in a destination.
Differences to check when migrating
These calls returned unknown command in this release. They are not supported commands.
| Tested call | Result |
|---|---|
ACL LIST | ERR unknown command 'ACL' |
MEMORY USAGE key | ERR unknown command 'MEMORY' |
OBJECT ENCODING key | ERR unknown command 'OBJECT' |
MOVE key 1 | ERR unknown command 'MOVE' |
PFADD hll a | ERR unknown command 'PFADD' |
PFCOUNT hll | ERR unknown command 'PFCOUNT' |
PFMERGE out hll | ERR unknown command 'PFMERGE' |
JSON.GET key | ERR unknown command 'JSON.GET' |
FT.SEARCH index * | ERR unknown command 'FT.SEARCH' |
HEXPIRE key 60 FIELDS 1 field | ERR unknown command 'HEXPIRE' |
SPUBLISH channel message | ERR unknown command 'SPUBLISH' |
SSUBSCRIBE channel | ERR unknown command 'SSUBSCRIBE' |
WAITAOF 1 0 100 | ERR unknown command 'WAITAOF' |
ASKING | ERR unknown command 'ASKING' |
CLIENT TRACKING ON and COMMAND INFO get also return unsupported-subcommand errors. Check the commands and optional features your client sends during connection setup.