valkey-cli
Command-line client for Valkey data store
TLDR
SYNOPSIS
valkey-cli [-h host] [-p port] [-a password] [options] [command]
DESCRIPTION
valkey-cli is the command-line interface for interacting with a Valkey server. It provides both an interactive REPL mode for exploring data and a non-interactive mode for scripting and automation. The client uses the same protocol as Redis, making it compatible with existing Redis workflows.Commands can be passed directly on the command line or piped from files and other programs. The client supports cluster mode for connecting to sharded deployments, database selection, authentication, and TLS connections.
PARAMETERS
-h HOST
Server hostname (default: 127.0.0.1).-p PORT
Server port (default: 6379).-s SOCKET
Unix socket path (overrides host and port).-u URI
Connection URI (valkey://user:password@host:port/db).-a PASSWORD
Password for authentication.--user USERNAME
Username for ACL authentication.--askpass
Prompt for a password without echoing.-n DB
Database number to select on connect.-c
Enable cluster mode with automatic redirects.-r N
Run the command N times (use -1 for infinite).-i SECONDS
Interval between repetitions when using -r.-x
Read last argument from standard input.--scan
Iterate keys using SCAN.--pattern PATTERN
Filter keys by pattern (used with --scan/--bigkeys/--hotkeys).--bigkeys
Sample the keyspace and report the largest keys.--memkeys
Sample the keyspace and report the most memory-intensive keys.--hotkeys
Report the most frequently accessed keys (requires LFU policy).--latency
Measure server latency in real time.--stat
Display continuous server statistics.--rdb FILE
Transfer a remote RDB dump to a local file.--pipe
Transfer raw RESP protocol from stdin for mass import.--tls
Enable a TLS-encrypted connection.--cluster CMD
Run cluster management subcommands (create, check, reshard, rebalance, add-node, del-node).
CAVEATS
Fork of Redis. Redis-cli compatible. Server must be running.
HISTORY
valkey-cli is the CLI for Valkey, a Redis fork maintained by the Linux Foundation.
SEE ALSO
redis-cli(1), valkey-server(1)
