redis-tools
by @xueyetianya
Lookup Redis commands by category, test Redis server connections, and monitor database key counts and memory usage, with offline cheatsheet support.
$ bash script.sh cheatsheet stringπ΄ Redis Cheatsheet β Strings
βββββββββββββββββββββββββββββββββββββββββββββ
SET key value [EX seconds] [PX ms] [NX|XX]
Set key to value. Options: EX (expire secs), NX (only if not exists)
Example: SET user:1:name "Alice" EX 3600
GET key
Get the value of a key. Returns nil if not exists.
Example: GET user:1:name
MSET key value [key value ...]
Set multiple keys atomically.
Example: MSET k1 v1 k2 v2 k3 v3
...
$ bash script.sh test localhost 6379π΄ Redis Connection Test
βββββββββββββββββββββββββββββββββββββββββββββ
Host : localhost
Port : 6379
Status : β
CONNECTED
Server Info:
redis_version : 7.2.3
uptime_days : 4
connected_clients: 3
used_memory : 1.23M
maxmemory : 0 (unlimited)
role : master
aof_enabled : 0
$ bash script.sh monitorπ΄ Redis Key Monitor
βββββββββββββββββββββββββββββββββββββββββββββ
Host : localhost:6379
DB Keys Avg TTL
ββββββββββββββββββββ
db0 1247 β
db1 89 β
Total keys : 1336
Memory : 4.56M
clawhub install redis-tools