redis-cli
Qué hace
redis-cli es una herramienta para hablar directamente con la base de datos Redis desde tu ordenador. Te permite ver, cambiar o gestionar los datos almacenados en Redis.
Cuándo usarla
- ✓Cuando necesitas ver lo que hay guardado en una clave concreta de Redis.
- ✓Para añadir o modificar el valor de una clave de Redis.
- ✓Para comprobar que Redis funciona correctamente.
Link de la skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/redis-cli/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“¿Cómo puedo ver el valor de la clave 'user:123' en Redis?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
Escribes comandos en tu terminal, como si estuvieras hablando con Redis. Puede funcionar en modo directo (ejecuta un comando y se cierra) o en modo interactivo (sigues conversando con él).
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
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 useSCANin production code.MONITORlogs all commands including sensitive data — use cautiously, and never for extended periods on production servers.FLUSHALL/FLUSHDBare irreversible — verify target database withCLIENT LISTorINFO keyspacefirst.--rdbtransfer during write operations may produce inconsistent snapshots on busy servers.
Quick Reference
Connection
# Basic connection (default: 127.0.0.1:6379)
redis-cli
redis-cli -h redis15.localnet.org -p 6390 PING
# With password (prefer REDISCLI_AUTH env var for security)
redis-cli -a myUnguessablePazzzzzword123 PING
# URI connection
redis-cli -u redis://user:password@host:port/dbnum PING
# TLS
redis-cli --tls --cacert /path/to/ca.crt -h redis.example.com PING
# Specific database
redis-cli -n 2 DBSIZE
# IPv4/IPv6 preference
redis-cli -4 PING # prefer IPv4
redis-cli -6 PING # prefer IPv6
Command-Line vs Interactive Mode
# Command-line mode: execute one command and exit
redis-cli INCR mycounter
redis-cli GET mykey
# Interactive mode: type commands at the prompt
redis-cli
127.0.0.1:6379> PING
PONG
127.0.0.1:6379> SELECT 2
OK
127.0.0.1:6379[2]> DBSIZE
(integer) 1
The prompt shows host:port[db]. Use CONNECT <host> <port> to switch instances interactively.
Data Query Cheat Sheet
String operations (O(1)):
GET key # Get value
SET key value [NX|XX] [EX sec|PX ms|KEEPTTL] # Set with conditions/TTL
SET key value GET # Set new, return old value
GETSET key newvalue # [Use SET key value GET instead]
MGET key1 key2 ... # Get multiple values
INCR key # Increment integer (+1)
INCRBY key 10 # Increment by amount
STRLEN key # String length
GETRANGE key 0 50 # Substring
Hash operations:
HGET key field # Get field value O(1)
HMGET key f1 f2 # Get multiple fields O(N)
HGETALL key # Get all fields/values O(N)
HKEYS key # Get all field names O(N)
HLEN key # Number of fields O(1)
HEXISTS key field # Check field exists O(1)
HSCAN key 0 [MATCH pat] # Iterate hash fields O(1) per call
List operations:
LRANGE key 0 -1 # Get all elements O(N)
LLEN key # List length O(1)
LINDEX key 0 # Get by index O(N)
LPOS key value # Find element position O(N)
Set operations:
SMEMBERS key # Get all members O(N)
…
Preguntas frecuentes
¿Cómo instalo redis-cli?
Puedes instalarlo con gestores de paquetes como Homebrew (macOS), apt (Ubuntu/Debian) o yum (CentOS/RHEL). También puedes usarlo con Docker.
¿Es seguro escribir contraseñas directamente en el comando?
No se recomienda. En producción, usa la variable de entorno REDISCLI_AUTH en lugar de escribir la contraseña en el comando, ya que puede quedar guardada en tu historial.
¿Qué comando debo usar para ver todas las claves?
El comando `KEYS *` puede bloquear el servidor en bases de datos grandes. En producción es mejor usar el comando `SCAN` para listar las claves de forma segura.
Detalles
Descripción original del autor
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.
Popularidad
- Estrellas en GitHub
- 48 mil
- Posición en el ranking
- #5598
- Licencia
- MIT
- Actualizada
- 15/10/2026
Comentarios
- …
Más skills de este repositorio
00-andruia-consultant
48 milAyuda a tu agente a iniciar o mejorar proyectos de IA. Analiza código, sugiere herramientas y crea planes de acción en español.
007
48 milPermite que tu agente realice auditorías de seguridad y modelado de amenazas. Es útil para proteger proyectos contra ataques y vulnerabilidades.
10-andruia-skill-smith
48 milAyuda a tu agente a crear o mejorar herramientas de IA. Define cómo funcionan, escribe la documentación y valida la estructura.
20-andruia-niche-intelligence
48 milPermite que tu agente cree un resumen de un sector específico. Es útil para entender su contexto, normas, patrones de uso y riesgos, usando fuentes fiables.
Skills parecidas
diffs
394 milPermite que tu agente genere un diff real y compartible de los cambios, como enlace de visualización o archivo de imagen, en lugar de un resumen escrito a mano.
coding-agent
394 milAyuda a tu agente a pasar un trabajo de programación grande a Codex, Claude Code u OpenCode como trabajador en segundo plano, y después revisar su progreso.
gh-issues
394 milAyuda a tu agente a encontrar incidencias de GitHub, elegir cuáles trabajar y abrir pull requests con correcciones, incluido el seguimiento de los comentarios de revisión.