id = "redis"
name = "Redis"
homepage = "https://redis.io/docs/latest/operate/oss_and_stack/management/redis-cli/"
description = "Redis is an in-memory data structure store used as a database, cache, and message broker."
executables = ["redis-cli", "redis-server"]
[dotfiles]
paths = ["~/.redisclirc"]
secret = []
[commands]
format = 1
label = "Query a Redis server"
description = "Connect redis-cli to a server and optionally run one command, scan keys or sample latency. Passwords are left out of the form; use REDISCLI_AUTH or the interactive AUTH. TLS, cluster manager and bulk-transfer options are not covered."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = false, short_bundles = false }
[[commands.source]]
id = "help"
kind = "help"
url = "https://github.com/redis/redis/blob/unstable/src/redis-cli.c"
revision = "unstable 2026-10-27"
evidence = '''
Usage: redis-cli [OPTIONS] [cmd [arg [arg ...]]]
-h <hostname> Server hostname (default: 127.0.0.1).
-p <port> Server port (default: 6379).
-s <socket> Server socket (overrides hostname and port).
--user <username> Used to send ACL style 'AUTH username pass'. Needs -a.
--askpass Force user to input password with mask from STDIN.
-u <uri> Server URI on format redis://user:password@host:port/dbnum
-n <db> Database number.
-c Enable cluster mode (follow -ASK and -MOVED redirections).
--raw Use raw formatting for replies (default when STDOUT is not a tty).
--csv Output in CSV format.
--json Output in JSON format (default RESP3, use -2 if you want to use with RESP2).
--stat Print rolling stats about server: mem, clients, ...
--latency Enter a special mode continuously sampling latency.
--bigkeys Sample Redis keys looking for keys with many elements (complexity).
--scan List all keys using the SCAN command.
--pattern <pat> Keys pattern when using the --scan, --bigkeys, --memkeys,
'''
[[commands.field]]
id = "host"
label = "Host"
type = "string"
option = ["-h"]
suggestions = [{ value = "127.0.0.1", label = "127.0.0.1" }]
sources = ["help"]
[[commands.field]]
id = "port"
label = "Port"
type = "integer"
option = ["-p"]
sources = ["help"]
[[commands.field]]
id = "socket"
label = "Unix socket"
type = "path"
path = { kind = "file", role = "input" }
option = ["-s"]
sources = ["help"]
[[commands.field]]
id = "uri"
label = "Server URI"
description = "redis://user:password@host:port/dbnum. A password typed here lands in shell history."
type = "string"
option = ["-u"]
sources = ["help"]
[[commands.field]]
id = "user"
label = "ACL username"
type = "string"
option = ["--user"]
sources = ["help"]
[[commands.field]]
id = "askpass"
label = "Prompt for password"
type = "boolean"
option = ["--askpass"]
sources = ["help"]
[[commands.field]]
id = "db"
label = "Database number"
type = "integer"
option = ["-n"]
sources = ["help"]
[[commands.field]]
id = "cluster"
label = "Cluster mode"
type = "boolean"
option = ["-c"]
sources = ["help"]
[[commands.field]]
id = "raw"
label = "Raw output"
type = "boolean"
option = ["--raw"]
sources = ["help"]
[[commands.field]]
id = "csv"
label = "CSV output"
type = "boolean"
option = ["--csv"]
sources = ["help"]
[[commands.field]]
id = "json"
label = "JSON output"
type = "boolean"
option = ["--json"]
sources = ["help"]
[[commands.field]]
id = "scan"
label = "List all keys (SCAN)"
type = "boolean"
option = ["--scan"]
sources = ["help"]
[[commands.field]]
id = "pattern"
label = "Key pattern"
description = "Used with --scan and --bigkeys."
type = "string"
option = ["--pattern"]
sources = ["help"]
[[commands.field]]
id = "bigkeys"
label = "Find big keys"
type = "boolean"
option = ["--bigkeys"]
sources = ["help"]
[[commands.field]]
id = "stat"
label = "Rolling server stats"
type = "boolean"
option = ["--stat"]
sources = ["help"]
[[commands.field]]
id = "latency"
label = "Sample latency"
type = "boolean"
option = ["--latency"]
sources = ["help"]
[[commands.field]]
id = "command"
label = "Command and arguments"
description = "Optional, e.g. GET key. Leave empty for an interactive session."
type = "string"
position = 0
multiple = true
sources = ["help"]
[[commands.task]]
id = "run"
label = "Run one command"
fields = ["host", "port", "db", "command"]
required = ["command"]
[[commands.task]]
id = "scan"
label = "List keys"
fields = ["host", "port", "db", "scan", "pattern"]
required = ["scan"]
set = { scan = [true] }
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["host", "port", "db", "command", "scan", "pattern"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["socket", "uri", "user", "askpass", "cluster", "raw", "csv", "json", "bigkeys", "stat", "latency"]