SKILL.md
redis-cli — Redis Command Line Interface
When to Use
Use this skill when you need redis command-line interface (redis-cli) reference and usage guide. Use this skill whenever the user mentions redis-cli, Redis CLI, or any task involving querying, inspecting, debugging, or managing Redis from the command line. Triggers on key/value reads and writes, SCAN or keyspace...
redis-cli is the primary command-line tool for interacting with Redis. It supports two modes: command-line execution (run a command and exit) and interactive mode (a REPL with tab completion, history, and hints). It also provides special modes for monitoring, latency analysis, key space scanning, and data import/export.
Official resources: Redis CLI Docs | Commands | Download
Prerequisites
# Check if redis-cli is installed
redis-cli --version
# Install options:
# macOS (Homebrew)
brew install redis
# Ubuntu / Debian
sudo apt install redis-tools
# CentOS / RHEL
sudo yum install redis
# Alpine
apk add redis
# Build from source (binary only)
make redis-cli
# Binary at: src/redis-cli
# Docker (no installation needed)
docker run -it --rm redis redis-cli -h <host> -p <port> PING
Security Considerations
IMPORTANT: Redis provides powerful operations that can irreversibly modify or delete data. Pay close attention to the following safety guidelines:
- Never pass passwords via
-ain production — visible in shell history and process listings. UseREDISCLI_AUTHenvironment variable instead. KEYS *blocks the server on large databases — always use in production code.
