redis-cli
하는 일
redis-cli는 컴퓨터에서 Redis 데이터베이스와 직접 대화하는 도구입니다. Redis에 저장된 데이터를 보고, 바꾸고, 관리할 수 있습니다.
사용하는 경우
- ✓특정 Redis 키에 무엇이 저장되어 있는지 보고 싶을 때.
- ✓Redis 키의 값을 추가하거나 수정할 때.
- ✓Redis가 올바르게 작동하는지 확인할 때.
스킬 링크
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/redis-cli/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“Redis에서 'user:123' 키의 값을 어떻게 보나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
Redis에게 말하듯이 터미널에 명령을 입력합니다. 직접 모드(명령 하나를 실행하고 종료)나 대화형 모드(계속 명령을 주고받음)로 작동할 수 있습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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)
…
자주 묻는 질문
redis-cli는 어떻게 설치하나요?
Homebrew(macOS), apt(Ubuntu/Debian), yum(CentOS/RHEL) 같은 패키지 관리자로 설치할 수 있습니다. Docker로도 사용할 수 있습니다.
명령에 비밀번호를 직접 넣어도 안전한가요?
권장하지 않습니다. 운영 환경에서는 명령에 비밀번호를 직접 입력하는 대신 REDISCLI_AUTH 환경 변수를 사용하세요. 직접 입력하면 명령 기록에 저장될 수 있습니다.
모든 키를 보려면 어떤 명령을 써야 하나요?
`KEYS *` 명령은 큰 데이터베이스에서 서버를 멈추게 할 수 있습니다. 운영 환경에서는 `SCAN` 명령으로 안전하게 키 목록을 보는 것이 좋습니다.
상세 정보
작성자의 원본 설명
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.
인기도
- GitHub 스타
- 48k
- 순위
- #5598
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.