Commands.app

Redis Commands

Redis in-memory data store commands and redis-cli utilities

41 commands found
redis-cli
Redis command line interface
Connection
redis-cli
PING
Test Redis server connection
Connection
PING
INFO
Get Redis server information
Server
INFO
SET
Set string value for a key
Strings
SET mykey "Hello"
GET
Get value of a key
Strings
GET mykey
MSET
Set multiple keys to multiple values
Strings
MSET key1 "val1" key2 "val2" key3 "val3"
MGET
Get values of multiple keys
Strings
MGET key1 key2 key3
INCR
Increment integer value of a key
Strings
INCR counter
DECR
Decrement integer value of a key
Strings
DECR counter
DEL
Delete one or more keys
Keys
DEL mykey
EXISTS
Check if key exists
Keys
EXISTS mykey
KEYS
Find keys matching pattern
Keys
KEYS *
SCAN
Incrementally iterate keys
Keys
SCAN 0
EXPIRE
Set key expiration time
Keys
EXPIRE mykey 60
TTL
Get time to live for a key
Keys
TTL mykey
PERSIST
Remove expiration from key
Keys
PERSIST mykey
HSET
Set hash field value
Hashes
HSET user:1 name "John"
HGET
Get hash field value
Hashes
HGET user:1 name
HGETALL
Get all fields and values in hash
Hashes
HGETALL user:1
HDEL
Delete hash fields
Hashes
HDEL user:1 email
LPUSH
Prepend values to list
Lists
LPUSH mylist "world"
RPUSH
Append values to list
Lists
RPUSH mylist "world"
LPOP
Remove and get first list element
Lists
LPOP mylist
RPOP
Remove and get last list element
Lists
RPOP mylist
LRANGE
Get range of list elements
Lists
LRANGE mylist 0 -1
LLEN
Get list length
Lists
LLEN mylist
SADD
Add members to set
Sets
SADD myset "hello"
SMEMBERS
Get all members in set
Sets
SMEMBERS myset
SISMEMBER
Check if value is member of set
Sets
SISMEMBER myset "hello"
SINTER
Intersect multiple sets
Sets
SINTER set1 set2
SUNION
Union multiple sets
Sets
SUNION set1 set2
ZADD
Add members to sorted set with scores
Sorted Sets
ZADD leaderboard 100 "player1"
ZRANGE
Get range of sorted set members
Sorted Sets
ZRANGE leaderboard 0 -1
ZRANK
Get rank of member in sorted set
Sorted Sets
ZRANK leaderboard "player1"
PUBLISH
Publish message to channel
Pub/Sub
PUBLISH news "Breaking news!"
SUBSCRIBE
Subscribe to channels
Pub/Sub
SUBSCRIBE news
FLUSHDB
Delete all keys in current database
Server
FLUSHDB
FLUSHALL
Delete all keys in all databases
Server
FLUSHALL
DBSIZE
Get number of keys in current database
Server
DBSIZE
SAVE
Synchronously save dataset to disk
Persistence
SAVE
BGSAVE
Asynchronously save dataset to disk
Persistence
BGSAVE