Commands.app

redis-cli

Connection

Redis command line interface

Options & Flags
Available options for this command
-h

Server hostname

-p

Server port (default 6379)

-a

Password for authentication

-n

Database number

--scan

List keys using SCAN command

--pipe

Transfer raw Redis protocol

Examples
Common usage examples

Connect to local Redis

redis-cli

Connect to remote Redis

redis-cli -h redis.example.com -p 6379

Connect with password

redis-cli -a mypassword

Connect to database 1

redis-cli -n 1
Notes
  • Default port is 6379
  • Use QUIT or exit to disconnect
Related Commands
You might also find these useful