Command reference

Find a command, understand its arguments, and inspect requests and replies from a real Lavik instance.

217command names tested
14command families
0.1.0version pinned

This reference covers all 217 command names in the pinned Lavik 0.1.0-beta.1 inventory, using the supplied Docker receipts, executable cases and architecture description. Read it by command family: connections, keys, strings, bitmaps, collections, geospatial data, streams, scripting, transactions, Pub/Sub and server administration. Treat client compatibility as a separate migration check, including protocol negotiation, authentication, startup probes and reply decoding. Each syntax describes an exercised form rather than every registered option; notes explain setup, observed effects and important gaps. Verified examples include HELLO 2/3, selected SET conditions, script and function lifecycle operations, and transaction conflicts. COMMAND INFO and CLIENT TRACKING ON fail, and several familiar Redis commands are absent. Before migrating a Redis or Valkey application, test its exact subcommands, option combinations, data shapes, error handling and connection lifecycle. Standalone control acknowledgements do not establish replication or cluster behavior, and successful saves or graceful restart do not establish crash recovery.

Coverage applies to the calls and replies shown on each page. A registered command may not support every option. ADDREPLICAOF currently has a rejection test for NO ONE only; cluster behavior, failover and production SLAs are outside this verification.

217 / 217 commands

ADDREPLICAOFServer & administration

Provides an additional replication-source command whose verified invocation is rejected.

Rejection behavior tested
APPENDStrings

Appends bytes to a string value.

AUTHConnections

Authenticates the connection using the configured password.

BGSAVEServer & administration

Starts a background save.

BITCOUNTBitmaps

Counts set bits in a string value.

BITFIELDBitmaps

Updates and reads an integer encoded in a string's bits.

BITFIELD_ROBitmaps

Reads an integer bit field without modifying the string.

BITOPBitmaps

Stores the bitwise OR of source strings in a destination key.

BITPOSBitmaps

Finds the position of the first matching bit.

BLMOVELists

Moves an element from the source's left end to the destination's right end, with a waiting timeout.

BLMPOPLists

Pops a batch from a list's left end with a waiting timeout.

BLPOPLists

Removes a list's leftmost element, waiting up to a timeout when necessary.

BRPOPLists

Removes a list's rightmost element, waiting up to a timeout when necessary.

BRPOPLPUSHLists

Moves the source's rightmost element to the destination's left end, waiting when necessary.

BZMPOPSorted sets

Removes a batch of lowest-score members with a waiting timeout.

BZPOPMAXSorted sets

Removes the highest-score member, waiting up to a timeout if needed.

BZPOPMINSorted sets

Removes the lowest-score member, waiting up to a timeout if needed.

CLIENTConnections

Manages connection naming and library metadata and reports client identity.

CLUSTERServer & administration

Calculates a key's hash slot through KEYSLOT.

COMMANDServer & administration

Counts registered commands or extracts command key arguments.

CONFIGServer & administration

Reads or changes runtime configuration and resets command statistics.

COPYKeys & expiration

Copies a key's value to a destination key.

DBSIZEKeys & expiration

Counts keys in the selected database.

DECRStrings

Decrements an integer string value by one.

DECRBYStrings

Subtracts an integer amount from a string counter.

DEFRAGServer & administration

Inspects, pauses or resumes defragmentation maintenance.

DELKeys & expiration

Deletes a key.

DISCARDTransactions

Cancels the queued transaction.

DUMPKeys & expiration

Serializes a key's value for transfer to RESTORE.

ECHOConnections

Returns the supplied message.

EVALLua & functions

Executes a supplied Lua script with declared keys.

EVALSHALua & functions

Executes a cached Lua script identified by its SHA digest.

EVALSHA_ROLua & functions

Executes a cached Lua script through the read-only invocation path.

EVAL_ROLua & functions

Executes a Lua script through the read-only invocation path.

EXECTransactions

Executes the commands queued by MULTI.

EXISTSKeys & expiration

Counts existing keys among the supplied names.

EXPIREKeys & expiration

Sets a key's remaining lifetime in seconds.

EXPIREATKeys & expiration

Sets a key's expiry to an absolute Unix timestamp in seconds.

EXPIRETIMEKeys & expiration

Reports a key's absolute expiry timestamp in seconds.

FCALLLua & functions

Invokes a function registered in a loaded library.

FCALL_ROLua & functions

Invokes a registered function through the read-only path.

FLUSHALLKeys & expiration

Requests removal of all database contents.

FLUSHDBKeys & expiration

Removes keys from the selected database.

FUNCTIONLua & functions

Manages registered function libraries and their serialized representation.

GEOADDGeospatial

Adds a named geographic location to a key.

GEODISTGeospatial

Reports the distance between two stored locations in kilometers.

GEOHASHGeospatial

Returns the geohash representation of a stored location.

GEOPOSGeospatial

Returns a stored member's geographic coordinates.

GEORADIUSGeospatial

Finds stored locations within a radius of supplied coordinates.

GEORADIUSBYMEMBERGeospatial

Finds locations within a radius of a stored member.

GEORADIUSBYMEMBER_ROGeospatial

Performs a read-only radius query centered on a stored member.

GEORADIUS_ROGeospatial

Performs a read-only radius query around supplied coordinates.

GEOSEARCHGeospatial

Finds locations by radius around a named member.

GEOSEARCHSTOREGeospatial

Stores the results of a member-centered geographic radius search.

GETStrings

Retrieves the string value stored at a key.

GETBITBitmaps

Reads the bit at a string's specified bit offset.

GETDELStrings

Returns a string value and removes its key.

GETEXStrings

Retrieves a string while setting its expiry in seconds.

GETRANGEStrings

Returns a byte range from a string.

GETSETStrings

Replaces a string value and returns its previous value.

HDELHashes

Removes a field from a hash.

HELLOConnections

Selects RESP2 or RESP3 and reports connection and server information.

HEXISTSHashes

Checks whether a hash contains a field.

HGETHashes

Retrieves one hash field's value.

HGETALLHashes

Retrieves all fields and values from a hash.

HINCRBYHashes

Adds an integer increment to a hash field.

HINCRBYFLOATHashes

Adds a floating-point increment to a hash field.

HKEYSHashes

Returns the field names in a hash.

HLENHashes

Counts the fields in a hash.

HMGETHashes

Retrieves hash field values in the requested order.

HMSETHashes

Sets hash fields using merge semantics.

HRANDFIELDHashes

Returns a randomly selected hash field name.

HSCANHashes

Iterates over a hash's fields and values using a cursor.

HSETHashes

Adds or updates fields in a hash.

HSETNXHashes

Sets a hash field only if that field does not exist.

HSTRLENHashes

Reports the byte length of a hash field's value.

HVALSHashes

Returns the values stored in a hash.

INCRStrings

Increments an integer string value by one.

INCRBYStrings

Adds an integer increment to a string counter.

INCRBYFLOATStrings

Adds a floating-point increment to a numeric string.

INFOServer & administration

Reports server or replication status information.

KEYSKeys & expiration

Returns key names matching a pattern.

LASTSAVEServer & administration

Reports the timestamp of the last successful save.

LAVIK.HREPLACEHashes

Atomically replaces all fields of an existing hash while preserving its key expiry.

LCSStrings

Returns a longest common subsequence of two string values.

LINDEXLists

Returns the list element at a specified index.

LINSERTLists

Inserts an element before a matching list pivot.

LLENLists

Returns the number of elements in a list.

LMOVELists

Moves the source list's leftmost element to the destination's right end.

LMPOPLists

Removes a requested batch from the left end of a list.

LPOPLists

Removes and returns the leftmost list element.

LPOSLists

Finds the position of a matching list element.

LPUSHLists

Prepends an element to a list.

LPUSHXLists

Prepends an element only to an existing list.

LRANGELists

Returns a range of list elements.

LREMLists

Removes matching elements from a list.

LSETLists

Replaces the list element at an index.

LTRIMLists

Keeps a specified list range and removes elements outside it.

MGETStrings

Retrieves several string values in key argument order.

MONITORServer & administration

Streams observed command activity to the connection.

MSETStrings

Stores several string key-value pairs in one command.

MSETNXStrings

Stores all supplied string pairs only if none of their keys exists.

MULTITransactions

Starts queuing commands for a transaction.

PERSISTKeys & expiration

Removes a key's expiry.

PEXPIREKeys & expiration

Sets a key's remaining lifetime in milliseconds.

PEXPIREATKeys & expiration

Sets a key's expiry to an absolute Unix timestamp in milliseconds.

PEXPIRETIMEKeys & expiration

Reports a key's absolute expiry timestamp in milliseconds.

PINGConnections

Checks whether the connection can receive a server response.

PSETEXStrings

Stores a string with an expiry measured in milliseconds.

PSUBSCRIBEPub/Sub

Subscribes the connection to channels matching a pattern.

PTTLKeys & expiration

Reports a key's remaining lifetime in milliseconds.

PUBLISHPub/Sub

Sends a message to matching channel and pattern subscriptions.

PUBSUBPub/Sub

Reports the number of channel subscribers.

PUNSUBSCRIBEPub/Sub

Removes a pattern subscription from the connection.

QUITConnections

Requests the end of the client connection.

RANDOMKEYKeys & expiration

Returns a randomly selected key from the database.

READONLYServer & administration

Accepts a connection read-mode request.

READWRITEServer & administration

Accepts a connection read/write-mode request.

RENAMEKeys & expiration

Changes a key's name.

RENAMENXKeys & expiration

Renames a key only when the destination does not exist.

REPLICAOFServer & administration

Requests standalone master role with the NO ONE form.

RESETConnections

Resets the connection's session state.

RESTOREKeys & expiration

Creates a key from a serialized value.

ROLEServer & administration

Reports the server's current replication role.

RPOPLists

Removes and returns the rightmost list element.

RPOPLPUSHLists

Moves the source list's rightmost element to the destination's left end.

RPUSHLists

Appends elements to a list.

RPUSHXLists

Appends an element only to an existing list.

SADDSets

Adds a member to a set.

SAVEServer & administration

Performs a synchronous save.

SCANKeys & expiration

Iterates over keys using a cursor and a pattern filter.

SCARDSets

Returns a set's member count.

SCRIPTLua & functions

Loads scripts, checks their presence, or clears the script cache.

SDIFFSets

Returns members of the first set that are absent from the second.

SDIFFSTORESets

Stores a set difference in a destination key.

SELECTConnections

Requests a logical database for the connection.

SETStrings

Stores a string, optionally with tested existence conditions or expiry.

SETBITBitmaps

Changes one bit in a string and returns its previous value.

SETEXStrings

Stores a string with an expiry measured in seconds.

SETNXStrings

Stores a string only when its key does not exist.

SETRANGEStrings

Overwrites string bytes starting at an offset.

SINTERSets

Returns members shared by the input sets.

SINTERCARDSets

Counts members in a set intersection.

SINTERSTORESets

Stores the intersection of input sets.

SISMEMBERSets

Checks whether a set contains a member.

SLAVEOFServer & administration

Requests standalone master role using the SLAVEOF command name.

SLOWLOGServer & administration

Inspects or clears the slow-command log.

SMEMBERSSets

Returns all members of a set.

SMISMEMBERSets

Checks several set members in one request.

SMOVESets

Moves a member from one set to another.

SORTKeys & expiration

Returns the elements of a collection in sorted order.

SORT_ROKeys & expiration

Returns sorted collection elements through the read-only command.

SPOPSets

Removes and returns a randomly selected set member.

SRANDMEMBERSets

Returns a random set member without removing it.

SREMSets

Removes a specified member from a set.

SSCANSets

Iterates through set members with a cursor.

STRLENStrings

Returns the byte length of a string value.

SUBSCRIBEPub/Sub

Subscribes the connection to messages on a channel.

SUBSTRStrings

Returns a substring selected by byte offsets.

SUNIONSets

Returns the union of input sets.

SUNIONSTORESets

Stores a set union in a destination key.

TOMBRAIDERServer & administration

Inspects or toggles the TombRaider maintenance service.

TOUCHKeys & expiration

Touches the supplied keys and reports how many exist.

TTLKeys & expiration

Reports a key's remaining lifetime in seconds.

TYPEKeys & expiration

Reports the value type stored at a key.

UNLINKKeys & expiration

Removes a key from the keyspace.

UNSUBSCRIBEPub/Sub

Removes a channel subscription from the connection.

UNWATCHTransactions

Clears the connection's watched-key registrations.

WAITServer & administration

Requests a replication acknowledgement count for preceding writes.

WATCHTransactions

Registers a key for optimistic transaction conflict detection.

XACKStreams

Acknowledges a stream entry pending in a consumer group.

XADDStreams

Appends an entry with a specified ID to a stream.

XAUTOCLAIMStreams

Scans and transfers eligible pending entries to a consumer.

XCLAIMStreams

Transfers a pending entry to another consumer.

XDELStreams

Deletes a stream entry by ID.

XGROUPStreams

Creates stream consumer groups and consumers, or destroys a group.

XINFOStreams

Reports stream metadata.

XLENStreams

Returns the number of entries in a stream.

XPENDINGStreams

Summarizes a consumer group's pending entries.

XRANGEStreams

Returns stream entries in ascending ID order within a range.

XREADStreams

Reads stream entries after a supplied ID.

XREADGROUPStreams

Delivers new stream entries to a consumer in a group.

XREVRANGEStreams

Returns stream entries in descending ID order within a range.

XSETIDStreams

Sets the stream's last-generated ID metadata.

XTRIMStreams

Trims a stream to a maximum entry count.

ZADDSorted sets

Adds members with scores to a sorted set.

ZCARDSorted sets

Counts members in a sorted set.

ZCOUNTSorted sets

Counts sorted-set members within a score range.

ZDIFFSorted sets

Returns the difference of sorted-set inputs.

ZDIFFSTORESorted sets

Stores a sorted-set difference in a destination.

ZINCRBYSorted sets

Adds an increment to a sorted-set member's score.

ZINTERSorted sets

Returns the intersection of sorted-set inputs.

ZINTERCARDSorted sets

Counts members in a sorted-set intersection.

ZINTERSTORESorted sets

Stores a sorted-set intersection in a destination.

ZLEXCOUNTSorted sets

Counts members within a lexicographical range.

ZMPOPSorted sets

Removes a batch of lowest-score members from a sorted set.

ZMSCORESorted sets

Retrieves scores for several sorted-set members.

ZPOPMAXSorted sets

Removes and returns the highest-score member and its score.

ZPOPMINSorted sets

Removes and returns the lowest-score member and its score.

ZRANDMEMBERSorted sets

Returns a random sorted-set member without removing it.

ZRANGESorted sets

Returns a rank range of sorted-set members with their scores.

ZRANGEBYLEXSorted sets

Returns sorted-set members within a lexicographical range.

ZRANGEBYSCORESorted sets

Returns members within an ascending score range.

ZRANGESTORESorted sets

Stores a rank range from a sorted set in a destination key.

ZRANKSorted sets

Returns a member's rank in ascending score order.

ZREMSorted sets

Removes a specified member from a sorted set.

ZREMRANGEBYLEXSorted sets

Removes members within a lexicographical range.

ZREMRANGEBYRANKSorted sets

Removes sorted-set members within a rank range.

ZREMRANGEBYSCORESorted sets

Removes sorted-set members within a score range.

ZREVRANGESorted sets

Returns a rank range in descending score order.

ZREVRANGEBYLEXSorted sets

Returns a lexicographical range in reverse order.

ZREVRANGEBYSCORESorted sets

Returns a score range in descending order.

ZREVRANKSorted sets

Returns a member's rank in descending score order.

ZSCANSorted sets

Iterates through sorted-set members and scores with a cursor.

ZSCORESorted sets

Retrieves the score of a sorted-set member.

ZUNIONSorted sets

Returns the union of sorted-set inputs.

ZUNIONSTORESorted sets

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 callResult
ACL LISTERR unknown command 'ACL'
MEMORY USAGE keyERR unknown command 'MEMORY'
OBJECT ENCODING keyERR unknown command 'OBJECT'
MOVE key 1ERR unknown command 'MOVE'
PFADD hll aERR unknown command 'PFADD'
PFCOUNT hllERR unknown command 'PFCOUNT'
PFMERGE out hllERR unknown command 'PFMERGE'
JSON.GET keyERR unknown command 'JSON.GET'
FT.SEARCH index *ERR unknown command 'FT.SEARCH'
HEXPIRE key 60 FIELDS 1 fieldERR unknown command 'HEXPIRE'
SPUBLISH channel messageERR unknown command 'SPUBLISH'
SSUBSCRIBE channelERR unknown command 'SSUBSCRIBE'
WAITAOF 1 0 100ERR unknown command 'WAITAOF'
ASKINGERR 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.

Test environment & reproducible evidence

Verified: 2026-09-21T11:06:06Z · Docker / Linux aarch64 · lavik 0.1.0-beta.1

Storage & connection: io_uring · temporary file, 2 workers, standalone, plaintext TCP, password authentication. This test does not measure NVMe performance.

Pinned source: 3955b98d43b312324aa8d52775df52cfb111c0d0

Binary SHA-256: 8306b37ddf05023f85166a6aa2192b7084757e8defd342b602e6470244aca887

Image: sha256:af0cfb11b78f184cb6cc49a774a49dc97a8e43a0bd3f4d63d83c8c9ef3282d6e

Full test receipt · Executable tests

Documentation organization reference: Valkey docs · Valkey command reference. Behavior is documented from pinned Lavik source and execution results.