📢 Found an issue or want to request a new tool? Open an issue on GitHub
Command line client for Redis.
# Interactive mode
docker run -it --rm \
ghcr.io/pabpereza/toolkitbox/redis:latest \
redis-cli -h my-server.com -p 6379
# With authentication
docker run -it --rm \
ghcr.io/pabpereza/toolkitbox/redis:latest \
redis-cli -h my-server.com -a PASSWORD
# Run single command
docker run --rm \
ghcr.io/pabpereza/toolkitbox/redis:latest \
redis-cli -h my-server.com PING
apiVersion: v1
kind: Pod
metadata:
name: redis-client
spec:
containers:
- name: redis-client
image: ghcr.io/pabpereza/toolkitbox/redis:latest
command: ["sleep", "infinity"]
env:
- name: REDISCLI_AUTH
valueFrom:
secretKeyRef:
name: redis-credentials
key: password
Redis CLI (redis-cli) is the official command line tool for interacting with Redis servers. It allows you to execute Redis commands, manage keys, monitor the server, and perform administration operations.
This component installs redis (which includes redis-cli) from the Alpine Linux repositories.
redis-cli
redis-cli -h hostname -p 6379
redis-cli -h hostname -a password
redis-cli -h hostname --tls
redis-cli -h hostname PING
redis-cli -h hostname < commands.txt
# Set value
SET key "value"
# Get value
GET key
# Set with expiration (seconds)
SETEX key 3600 "value"
# Increment counter
INCR counter
# Add to list
LPUSH my_list "element"
RPUSH my_list "element"
# Get elements
LRANGE my_list 0 -1
# Get length
LLEN my_list
# Set field
HSET user:1 name "John"
# Get field
HGET user:1 name
# Get all fields
HGETALL user:1
# Add to set
SADD my_set "element"
# Get members
SMEMBERS my_set
# Check membership
SISMEMBER my_set "element"
# View all keys
KEYS *
# View keys with pattern
KEYS user:*
# Server information
INFO
# Real-time monitor
MONITOR
# View connected clients
CLIENT LIST
# Get configuration
CONFIG GET maxmemory
| Option | Description |
|---|---|
-h | Server hostname |
-p | Port (default: 6379) |
-a | Authentication password |
-n | Database number (0-15) |
--tls | Enable TLS |
--scan | Use SCAN instead of KEYS |
--bigkeys | Find large keys |
--memkeys | Analyze memory usage |
redis-cli MONITOR
# Subscribe to channel
redis-cli SUBSCRIBE my_channel
# Publish message
redis-cli PUBLISH my_channel "message"
# Find large keys
redis-cli --bigkeys
# Analyze memory
redis-cli --memkeys
v4 - Redis 4.xv5 - Redis 5.xContent type
Image
Digest
sha256:d762fded7…
Size
9 MB
Last updated
18 days ago
docker pull toolkitbox/redis