LinuxCommandLibrary

valkey-cli

Command-line client for Valkey data store

TLDR

Connect to server

$ valkey-cli
copy
Connect to host
$ valkey-cli -h [host] -p [6379]
copy
Execute command
$ valkey-cli SET [key] [value]
copy
With password
$ valkey-cli -a [password]
copy
Select database
$ valkey-cli -n [2]
copy
Cluster mode
$ valkey-cli -c
copy

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.
-p PORT
Server port.
-a PASSWORD
Authentication.
-n DB
Database number.
-c
Cluster mode.
--scan
Iterate keys.

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

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community