Back to home

tl;drCommand listRedis commands
Redis CLI Basics main image

Redis CLI Basics


Hash Sets

HGETALLGet all fields and values in hashHGETALL coin:btc
HKEYSGet all fields in hashHKEYS coin:btc
HGETGet value of hash fieldHGET coin:btc id
HMGETMultiple get value of hash fieldHGET coin:btc id buy sell
HSETSet value of hash fieldHSET coin:btc id 1234
HMSETMultiple set value of hash fieldHSET coin:btc id ID1234 buy 123 sell 100


RPUSHPush elements onto a listRPUSH list "one"
LPOPPop element from last on listLPOP list
LLENGet list lengthLLEN list

Run local server and attach

1 2 3 4 # terminal one redis-server /usr/local/etc/redis.conf # terminal two redis-cli

Command list

Installbrew install redis
Run serverredis-server /usr/local/etc/redis.conf
Uninstallbrew uninstall redis && rm ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
Infobrew info redis
Run Redis CLI clientredis-cli

Redis commands

A full list can be found at

Dennis O'Keeffe

  • Melbourne, Australia

Hi, I am a professional Software Engineer. Formerly of Culture Amp, UsabilityHub, Present Company and NightGuru.
I am currently working on, Den Dribbles and LandPad .

Related articles


Get fresh posts + news direct to your inbox.

No spam. We only send you relevant content.