redisx-cli - Man Page
A command-line Redis / Valkey client
Synopsis
redisx-cli [-h hostname] [-p port] [-t timeout] [-a password] [--user=username] [--askpass] [-r repeat [-i interval]] [-n db] [-2|-3] [-x] [--json] [--raw] [-d delim [-D prefix]] [-c] [--tls [--sni host] [--cacert file] [--cacertdir path] [--insecure] [--cert path --key path] [--tls-ciphers list | --tls-ciphersuites list]] [--show-pushes=yes|no] [--attributes] [--scan [--pattern=glob] [--count=n]] [--eval=file] [--verbose] [--version] [--help] [--usage] [cmd [arg...]]
Description
A completely free command-line client for Redis / Valkey servers based on the RedisX library.
It can be used to run a command with a set of arguments on a Redis server, or if run without a command argument it can be used as an interactive client.
redisx-cli supports many of the same options as redis-cli (1) and valkey-cli (1), and produces similar output to those. However, under the hood it is based on an entirely independent implementation of the Redis protocol, with no shared code with either Redis or Valkey.
Options
- -h, --host=hostname
Server hostname. (default: 127.0.0.1).
- -p, --port=portnum
Server port. (default: 6379).
- -t, --timeout=seconds
Server connection timeout (decimals allowed). Default timeout is 0, meaning OS default.
- -a, --pass=password
Password to use when connecting to the server.
- --user=username
Used to send ACL style 'AUTH username pass'. Needs -a.
- --askpass
Force user to input password with mask from STDIN. If this argument is used, -a will be ignored.
- -r, --repeat=n
Execute specified command n times.
- -i, --interval=seconds
When -r is used, waits this many seconds before repeating. It is possible to specify sub-second times like -i 0.1. (default: 1).
- -n, --db=index
Database number. (default 0).
- -x, --stdin
Read last argument from STDIN.
- -2, --RESP2
Start session in RESP2 protocol mode.
- -3, --RESP3
Start session in RESP3 protocol mode.
- --json
Output in JSON format.
- --raw
Use raw formatting for replies (with delimiters).
- -d, --delim=string
Delimiter between elements for raw format. You can use JSON convention for escaping special characters. (default: "\n").
- -D, --prefix=string
Group prefix for raw format. You can use JSON convention for escaping special characters. (default: "\n").
- -c, --cluster
Enable cluster mode (follow -ASK and -MOVED redirections).
- --tls
Establish a secure TLS connection.
- --insecure
Allow insecure TLS connection by skipping cert validation.
- --sni=host
Server name indication for TLS.
- --cacert=file
CA Certificate file to verify with.
- --cacertdir=path
Directory where trusted CA certificates are stored. If neither cacert nor cacertdir are specified, the default system-wide trusted root certs configuration will apply.
- --cert=path
Client certificate to authenticate with.
- --key=path
Private key file to authenticate with.
- --tls-ciphers=list
Sets the list of preferred ciphers (TLSv1.2 and below) in order of preference from highest to lowest separated by colon (':').
- --tls-ciphersuites=list
Sets the list of preferred ciphersuites (TLSv1.3) in order of preference from highest to lowest separated by colon (':').
- --show-pushes=yes|no
Whether to print RESP3 PUSH messages. (default: no).
- --attributes
Show RESP3 attributes also, if available.
- --scan
List all keys using the SCAN command.
- --pattern=glob
Keys pattern when using the --scan (default: *).
- --count=n
Count option when using the --scan. (default: 10).
- --eval=file
Send an EVAL command using the Lua script at file. The keyword and other arguments should be separated with a standalone comma on the command-line, such as: 'key1 key2 , arg1 arg2 ...'.
- --verbose
Verbose mode.
- --version
Output version and exit.
- -h, --help
Show a help message, similar to this manual.
- --usage
Display brief usage message
Exit Status
On successful execution the program will return 0. In case of errors a non-zero value is returned, corresponding to an error code of the RedisX C library, and an error message and/or trace may be printed to the standard error also.
Author
Attila Kovacs <attila.kovacs[AT]cfa.harvard.edu>
See Also
redis-cli(1) valkey-cli(1)