Upstash Documentation

CLIENT SETINFO

Set client connection attributes.
2 min read

Use CLIENT SETINFO to attach library identification to the current connection.

LIB-NAME records the name of the client library and LIB-VER its version. Both values then appear in CLIENT INFO and CLIENT LIST output, which makes it possible to tell which application or SDK version owns a connection. Most client libraries send this during the handshake, so applications rarely call it themselves.

Syntax#

Arguments#

ArgumentRequiredRepeatableDescription
LIB-NAME | LIB-VERYesNoAttribute to update: the client library name or version.
valueYesNoValue to store for the selected client attribute.

Important points#

  • This is a connection-oriented command and is available over native Redis TCP, not the stateless REST endpoint.
  • This command can expose administrative information or make a broad destructive change. Restrict it to trusted code paths.

Response#

The reply reports the result of the operation. Error replies have the same shape in RESP2 and RESP3 and are surfaced as exceptions by the SDKs below.

ProtocolReply
RESP2Simple string OK
RESP3Simple string OK
Note

Client libraries often decode bulk strings, maps, sets, and numeric strings into language-native values. The table describes the Redis wire reply.

Examples#

TCP examples use the TLS REDIS_URL from the Upstash console. REST examples use UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN.

Redis CLI
ioredis
node-redis
redis-py
go-redis
jedis
redis-rs