← 返回
未分类 中文

redis-tools

Lookup Redis commands by category, test Redis server connections, and monitor database key counts and memory usage, with offline cheatsheet support.
按类别查找Redis命令、检测服务器连接、监控键数量和内存占用,支持离线速查表。
xueyetianya xueyetianya 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 357
下载
💾 0
安装
1
版本
#latest

概述

redis

Redis Command Reference & Connection Tool — Instantly look up Redis commands, test your connection, and monitor key statistics. Works offline too — shows the full cheatsheet even without a Redis instance.

Commands

CommandDescriptionExample
-------------------------------
cheatsheetDisplay Redis command reference by categorycheatsheet / cheatsheet string
testTest a Redis connection and show server infotest / test redis://localhost:6379
monitorShow key count and memory stats per DBmonitor / monitor localhost 6379

Usage

bash script.sh cheatsheet [category]
bash script.sh test [host] [port] [password]
bash script.sh monitor [host] [port] [password]

Categories for cheatsheet

CategoryCommands Covered
---------------------------
stringSET, GET, MSET, INCR, APPEND, STRLEN, SETNX…
listLPUSH, RPUSH, LRANGE, LLEN, LPOP, BRPOP…
hashHSET, HGET, HMGET, HGETALL, HDEL, HKEYS…
setSADD, SMEMBERS, SISMEMBER, SUNION, SINTER…
zsetZADD, ZRANGE, ZRANK, ZSCORE, ZREM, ZCOUNT…
keyDEL, EXISTS, EXPIRE, TTL, RENAME, TYPE, SCAN…
serverINFO, DBSIZE, CONFIG GET, FLUSHDB, DEBUG…
scriptingEVAL, EVALSHA, SCRIPT LOAD/EXISTS/FLUSH

Requirements

  • bash >= 4.0
  • redis-cli (optional — required only for test and monitor commands; offline mode activates automatically if not found)

Install Redis CLI

# Debian/Ubuntu
sudo apt install redis-tools

# macOS
brew install redis

# Alpine
apk add redis

Examples

$ 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

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 07:14 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

office-efficiency

Excel Formula

xueyetianya
根据描述生成Excel公式并诊断电子表格错误。适用于编写VLOOKUP公式、调试错误或转换公式。支持...
★ 2 📥 6,593
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 198 📥 68,228
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 686 📥 331,072