Skip to main content
The Redis CLI provides an interactive command-line interface for executing Redis commands directly. Use it for debugging, administration, testing, and running ad-hoc queries against your Redis servers.

Key Concepts

Command

Redis commands consist of a command name followed by arguments (e.g., GET mykey).

Response Types

Commands return different types: strings, integers, lists, nil, or errors.

Database

Commands execute against the selected database (0-15). Use SELECT to switch.

History

Previous commands are saved in session history for quick recall.

Required Permissions

ActionPermission
Execute commandsiam:project:infrastructure:redis:write
CLI access requires write permission because commands can modify data. Read-only users cannot access the CLI.

How to Execute a Command

1

Select Connection

Choose a Redis connection from the dropdown.
2

Select Database

Choose the target database (0-15).
3

Enter Command

Type a Redis command in the input field.
4

Execute

Press Enter or click the Execute button.
5

View Result

The result appears below with execution time and type indicator.

Keyboard Shortcuts

KeyAction
EnterExecute the current command
(Arrow Up)Previous command from history
(Arrow Down)Next command in history

Quick Commands

Pre-configured commands for common operations:
CommandDescription
PINGTest connection (returns PONG)
INFOServer information and statistics
DBSIZENumber of keys in current database
KEYS *List all keys (use with caution)
SCAN 0Scan keys safely with cursor
CONFIG GET *Get all configuration parameters
CLIENT LISTList connected clients
SLOWLOG GET 10Recent slow log entries
MEMORY STATSMemory usage statistics
TIMECurrent server time
Click any quick command to insert it into the input field, then press Enter to execute.

Response Types

TypeDescriptionExample
stringSimple string response"OK", "PONG"
integerNumeric response(integer) 42
listArray of valuesNumbered list of items
dictKey-value pairsObject properties
nullNo value(nil)

Common Commands

Key Operations

CommandDescription
GET keyGet value of a key
SET key valueSet key to value
DEL keyDelete a key
EXISTS keyCheck if key exists
TYPE keyGet key type
TTL keyGet time to live in seconds
EXPIRE key secondsSet expiration

String Operations

CommandDescription
SET key valueSet string value
GET keyGet string value
INCR keyIncrement by 1
DECR keyDecrement by 1
APPEND key valueAppend to string

Hash Operations

CommandDescription
HSET key field valueSet hash field
HGET key fieldGet hash field
HGETALL keyGet all fields and values
HDEL key fieldDelete hash field

List Operations

CommandDescription
LPUSH key valuePush to left (head)
RPUSH key valuePush to right (tail)
LPOP keyPop from left
RPOP keyPop from right
LRANGE key 0 -1Get all elements

Set Operations

CommandDescription
SADD key memberAdd member to set
SMEMBERS keyGet all members
SISMEMBER key memberCheck membership
SREM key memberRemove member

Server Commands

CommandDescription
INFOServer information
INFO memoryMemory section only
CONFIG GET parameterGet config value
CONFIG SET parameter valueSet config value
FLUSHDBDelete all keys in database
FLUSHALLDelete all keys in all databases
FLUSHDB and FLUSHALL permanently delete data. Use with extreme caution.

How to Use Command History

1

Execute Commands

Run one or more commands during your session.
2

Navigate History

Press Arrow Up to recall previous commands.
3

Cycle Through

Continue pressing Arrow Up/Down to navigate through history.
4

Modify and Execute

Edit the recalled command if needed, then press Enter.
Command history is stored in your browser session. It clears when you close the browser or click Clear.

How to Copy Results

1

Execute Command

Run a command that returns results.
2

Click Copy

Click the copy icon next to the result.
3

Paste

The formatted result is now in your clipboard.

How to Clear History

1

Click Clear

Click the Clear button in the header.
2

Confirm

All command history in the current session is removed.

Troubleshooting

  • Check command syntax
  • Verify key exists (for read commands)
  • Check argument count and types
  • Some commands require specific Redis versions
  • You need write permission for CLI access
  • Check if connection is active
  • Verify network connectivity to Redis
  • Large dataset operations take time
  • KEYS * on large databases is slow
  • Use SCAN instead of KEYS for large datasets
  • Check slow log for details
  • Different commands return different types
  • Arrays show numbered lists
  • Nil means the key doesn’t exist
  • Check Redis documentation for expected return type
  • History is session-only, not persisted to server
  • Refreshing the page clears history
  • Use a local Redis CLI for persistent history
  • You need iam:project:infrastructure:redis:write permission
  • Contact your administrator for access

FAQ

This provides similar functionality to the redis-cli command-line tool but runs in your browser. It supports most commands but may not support interactive features like MONITOR or SUBSCRIBE.
Commands are executed one at a time. For bulk operations, consider using scripts or the native redis-cli with pipelines.
Commands may be logged for audit purposes. Avoid entering sensitive data like passwords in command arguments.
These commands require persistent connections and streaming responses, which are not supported in this web interface. Use a native Redis client for these features.
FLUSHDB deletes all keys in the current database immediately and permanently. There is no confirmation prompt. Use with extreme caution.
Use Lua scripting with EVAL for atomic multi-command operations. Example: EVAL "return redis.call('GET', KEYS[1])" 1 mykey
Use the database dropdown in the toolbar, or execute SELECT <db-number> command.
Interactive commands (MONITOR, SUBSCRIBE, PSUBSCRIBE) and blocking commands with infinite timeout may not work properly in the web interface.

Best Practices

Safety

  • Test commands on non-production first
  • Avoid KEYS * on large databases
  • Use SCAN for iterating keys
  • Never run FLUSHDB/FLUSHALL without verification
  • Be careful with CONFIG SET changes

Performance

  • Use specific key patterns instead of wildcards
  • Paginate large result sets
  • Prefer EXISTS over GET for existence checks
  • Use MGET/MSET for multiple keys

Debugging

  • Use TYPE to verify key types
  • Check TTL to understand expiration
  • Use OBJECT ENCODING for internal representation
  • Review MEMORY USAGE for key size

Commands to Avoid in Production

CommandRiskAlternative
KEYS *Blocks serverSCAN
FLUSHDBData lossSelective DEL
FLUSHALLAll data lossNone
DEBUG *Server impactINFO
SHUTDOWNServer stopsAdmin access