Learn

Redis Commands Cheat sheet

Prasan Kumar
Author
Prasan Kumar, Technical Solutions Developer at Redis
Will Johnston
Author
Will Johnston, Developer Growth Manager at Redis

Connect#

# Syntax
redis-cli -u redis://host:port
redis-cli -u redis://username:password@host:port

# Examples
redis-cli
redis-cli -u redis://localhost:6379
redis-cli -u redis://myuser:mypassword@localhost:6379

# If you run Redis through Docker
docker exec -it <container-id-or-name> redis-cli
NOTE

To setup Redis either locally or in the cloud, refer to the tutorial

Strings/Numbers#

Generic#

Hashes#

Sets#

Sorted sets#

Lists#

Streams#

REDIS STACK COMMANDS

Redis stack extends the core features of Redis OSS like querying across hashes and JSON documents, time series data support, full-text search ..etc

JSON#

Search and Query#