Skip to main content




GitHub: - Serverless data for Redis and Kafka

Command cheatsheet:


On macOS, use brew install redis as explained in

Start and stop

brew services start redis
brew services stop redis

# Check the status of the service
brew services info redis

# Restart after a Redis upgrade with Brew
brew services restart redis

CLI redis-cli


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

Default address is and default port is 6379, so doing redis-cli is like doing redis-cli -h -p 6379.

To authenticate, you can alternatively provide the password using the envar REDISCLI_AUTH. You can also connect first, and then run the command AUTH <password> to authenticate.

Use PING to test the connection.

Get all keys:

  • SCAN. Preferred since it's O(1). Returns a cursor. According to the docs can be used in production without the downside of commands like KEYS or SMEMBERS that may block the server for a long time (even several seconds) when called against big collections of keys or elements. Examples:
    • SCAN 0
    • SCAN 0 MATCH something:*
  • KEYS *. Warning: is O(N).

See discussion at

Get type of key: TYPE <key>. It returns 'none' when the key does not exist.

Delete a key: DEL key1 key2 ....