# CLIENT SETINFO

> Record the name or version of the client library using the connection.

URL: https://docs.hotkv.com/commands/client-setinfo/

```
CLIENT SETINFO LIB-NAME libname
CLIENT SETINFO LIB-VER libver
```

- Group: Connection
- Complexity: O(1)
- 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](https://docs.hotkv.com/commands/client-list/index.md)
and [CLIENT INFO](https://docs.hotkv.com/commands/client-info/index.md), which helps you find connections
from outdated libraries. You normally don't send it yourself.

## Options

| 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.

## Return value

| 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.` |

## Examples

```
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'
```

## Compatibility

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

## See also

[CLIENT SETNAME](https://docs.hotkv.com/commands/client-setname/index.md), [CLIENT LIST](https://docs.hotkv.com/commands/client-list/index.md),
[HELLO](https://docs.hotkv.com/commands/hello/index.md)