Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

CLIENT SETINFO

Last updated
CLIENT SETINFO LIB-NAME libname
CLIENT SETINFO LIB-VER libver
Group
Connection
Complexity
O(1)
Arity
4 (exactly, counting the command name)
HotKV Cloud
All plans
On-Premise
no license needed

CLIENT SETINFO stores the client library’s name or version on the connection. Client libraries send it right after connecting, and the values show as lib-name= and lib-ver= in CLIENT LIST and CLIENT INFO, which helps you find connections from outdated libraries. You normally don’t send it yourself.

Attribute Value
LIB-NAME The library name, for example redis-py.
LIB-VER The library version, for example 5.0.1.

The attribute name is case-insensitive. The value follows the same rule as a connection name: no spaces, newlines or other non-printable characters.

Case Reply (RESP2 and RESP3)
Stored Simple string OK
Unknown attribute Error ERR Unrecognized option '<attribute>'
Value with a space or special character Error ERR <attribute> cannot contain spaces, newlines or special characters.
127.0.0.1:6379> CLIENT SETINFO LIB-NAME my-client
OK
127.0.0.1:6379> CLIENT SETINFO LIB-VER 1.4.2
OK
127.0.0.1:6379> CLIENT SETINFO LIB-COLOR blue
(error) ERR Unrecognized option 'LIB-COLOR'

Same attributes as Redis 7.2 and later, and Valkey 8.

CLIENT SETNAME, CLIENT LIST, HELLO