Skip to content
Redis CLI

Interactive Mode, HELP & Inspecting

Navigate the REPL, discover commands, and introspect the server.

By EZ4Code Team
interactivehelpinfoconfig

Code

$ redis-cli
127.0.0.1:6379> PING               # PONG
127.0.0.1:6379> HELP               # command groups
127.0.0.1:6379> HELP @string       # all string commands
127.0.0.1:6379> HELP SET           # detailed SET usage

# Server info & stats
127.0.0.1:6379> INFO                # everything
127.0.0.1:6379> INFO server         # just the server section
127.0.0.1:6379> INFO memory         # memory stats
127.0.0.1:6379> DBSIZE              # number of keys in current DB
127.0.0.1:6379> CLIENT LIST         # connected clients
127.0.0.1:6379> CONFIG GET maxmemory
127.0.0.1:6379> CONFIG SET maxmemory 256mb
127.0.0.1:6379> COMMAND COUNT       # how many commands the server knows

# Pretty-print large replies
127.0.0.1:6379> CLIENT LIST --raw   # tab-separated, no framing

# Clear screen / exit
127.0.0.1:6379> CLEAR
127.0.0.1:6379> EXIT

Explanation

Interactive mode is a REPL: type a command, get a reply. HELP @group lists commands by category (@string, @list, @server, @connection...); HELP <cmd> shows arity, complexity, and key specs. INFO reports memory, clients, persistence, replication; section names (server, memory, stats, replication) filter it. CONFIG GET/SET tweak runtime config (persistence-aware, but not across restarts unless you also CONFIG REWRITE). DBSIZE is O(1). Use --raw for shell-friendly output (no quoted strings).

More Redis CLI Snippets