redis-cli

Redis CLI for cache, queues, and in-memory data

jholhewres/devclaw-skills1 installsMITSynced Aug 26

Works with

Claude CodeCursorCodex CLIGitHub CopilotGemini CLI
---
name: redis-cli
description: Redis CLI for cache, queues, and in-memory data
license: MIT
---

# Redis CLI

Interface for Redis cache, queues, and in-memory data.

## Setup

```bash
# Check if installed
command -v redis-cli

# Install — macOS
brew install redis

# Install — Ubuntu/Debian
sudo apt install redis-tools
```

## Connection

```bash
# Local
redis-cli

# Remote
redis-cli -h <host> -p <port>
redis-cli -h <host> -p <port> -a <password>

# With URL
redis-cli -u redis://:<password>@<host>:<port>/<db>

# Ping
redis-cli ping
```

## Keys

```bash
# List keys (WARNING: be careful in production!)
redis-cli KEYS "prefix:*"        # pattern match
redis-cli SCAN 0 MATCH "user:*" COUNT 100   # safe for production

# Info for a key
redis-cli TYPE <key>
redis-cli TTL <key>              # remaining time (-1 = no expiration)
redis-cli OBJECT ENCODING <key>

# Delete
redis-cli DEL <key>
redis-cli DEL key1 key2 key3

# Expiration
redis-cli EXPIRE <key> <seconds>
redis-cli PERSIST <key>          # remove expiration
```

## Strings

```bash
redis-cli SET <key> <value>
redis-cli SET <key> <value> EX 3600   # expires in 1h
redis-cli GET <key>
redis-cli MGET key1 key2 key3
redis-cli INCR <key>
redis-cli INCRBY <key> 10
```

## Hashes

```bash
redis-cli HSET <key> <field> <value>
redis-cli HGET <key> <field>
redis-cli HGETALL <key>
redis-cli HDEL <key> <field>
```

## Lists

```bash
redis-cli LPUSH <key> <value>
redis-cli RPUSH <key> <value>
redis-cli LRANGE <key> 0 -1     # all elements
redis-cli LLEN <key>
```

## Sets

```bash
redis-cli SADD <key> <member>
redis-cli SMEMBERS <key>
redis-cli SCARD <key>            # count
redis-cli SISMEMBER <key> <member>
```

## Info and Monitor

```bash
# General info
redis-cli INFO
redis-cli INFO memory
redis-cli INFO stats
redis-cli INFO keyspace

# Connected clients
redis-cli CLIENT LIST

# Monitor (see commands in real time — use with caution)
redis-cli MONITOR

# Database size
redis-cli DBSIZE

# Flush (WARNING!)
redis-cli FLUSHDB       # current database
redis-cli FLUSHALL      # all databases
```

## Tips

- Use `SCAN` instead of `KEYS` in production (non-blocking)
- Use `--pipe` for bulk import
- Use `--csv` for CSV output
- Use `--bigkeys` to find large keys
- Use `--latency` to measure latency

More Database skills

azure-upgrade

microsoft/azure-skills

Assess and upgrade Azure workloads between plans, tiers, or SKUs, or modernize Azure SDK dependencies in source code. WHEN: upgrade Consumption to Flex Consumption, upgrade Azure Functions plan, change hosting plan, function app SKU, migrate App Service to Container Apps, modernize legacy Azure Java SDKs (com.microsoft.azure to com.azure), migrate Azure Cache for Redis (ACR/ACRE) to Azure Managed Redis (AMR).

413.0k

supabase-postgres-best-practices

supabase/agent-skills

Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pg_cron, pgmq), vector/semantic search (pgvector), and restoring dumps (pg_restore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.

377.3k

prisma-database-setup

prisma/skills

Guides for configuring Prisma with different database providers (PostgreSQL, MySQL, SQLite, MongoDB, etc.). Use when setting up a new project, changing databases, or troubleshooting connection issues. Triggers on "configure postgres", "connect to mysql", "setup mongodb", "sqlite setup".

247.3k

← All Database skills

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY