Official Redis CLI for running commands, scanning keys, exporting data, and managing Redis servers or clusters.
$brew install redis
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis
redis-cli is Redis's official command-line client for talking directly to a Redis server or cluster from the shell. Beyond ad hoc REPL use, it includes non-interactive modes for key scanning, data export, piped writes, Lua evaluation, and cluster administration.
What It Enables
- Run Redis commands against local or remote instances to inspect keys, values, config, stats, and health from the shell.
- Scan keyspaces and sample big, hot, or memory-heavy keys to debug production behavior or find cleanup targets.
- Pipe bulk writes, export RDB snapshots or functions, run Lua scripts, and perform cluster management operations from scripts or incident tooling.
Agent Fit
- Any Redis command can be executed non-interactively, and
-ecan surface command failures with a nonzero exit code for automation loops. --jsonand--quoted-jsonprovide structured output, but plain text remains the default and some monitoring modes are more human-oriented unless you force machine-friendly flags.- Useful when an agent already knows which Redis instance or cluster to target; it is a thin control surface over a live datastore, not a safer workflow abstraction.
Caveats
- It defaults to an interactive REPL when no command is supplied, and some cluster operations still prompt unless you pass
--cluster-yes. - This is direct access to live Redis data and topology, so writes, deletes, RDB export, and cluster fixes need credentials, network access, and guardrails.