Web-based Redis browser that can work as standalone app or mounted Rails engine
Clone or download
szajbus Merge pull request #29 from lucymhdavies/master
Adds has_children to keys.json response, and ttl to key.json
Latest commit 81336d6 Jan 4, 2017


Redis Browser Gem Version


  • List all keys as tree
  • See content of all redis types
  • List pagination
  • Pretty print json values
  • Search keys
  • Can be mounted to Rails applications as engine
  • Can connect to multiple databases


  • Ruby Version ">=1.9.2"


To use with ruby version < 2.2, you must install specifically from 0.4 line which is maintained in ruby-1.9.2+ branch.

$ gem install redis-browser --version '~> 0.4.0'

Otherwise install the newest version.

$ gem install redis-browser



$ redis-browser

You can predefine a list of available connections in a YAML file in couple of ways.

    url: redis://
    host: mydomain.com
    port: 6666
    db: 1
    auth: password

Then start with

$ redis-browser --config path/to/config.yml

Or quickly connect to a database without the hassle of creating custom configuration file

$ redis-browser --url redis://hostname:6379

The connection options can also be specified in similar way to redis-cli command

$ redis-browser -h -p 6379 -a password -n 0

Run with --help to see what other options are available.

As engine

Add to gemfile

gem 'redis-browser'

To use with ruby version < 2.2 specify the version from 0.4 line.

gem 'redis-browser', '~> 0.4.0'

And to routes.rb

mount RedisBrowser::Web => '/redis-browser'

Use config/initializers/redis-browser.rb to predefine a list of available connections

config = Rails.root.join('config', 'redis-browser.yml')
settings = YAML.load(ERB.new(IO.read(config)).result)

Protect with HTTP Basic Auth

RedisBrowser::Web is a Sinatra app, so you can inject any Rack middleware into it.

# config/initializers/redis-browser.rb
RedisBrowser::Web.class_eval do
  use Rack::Auth::Basic, "Protected Area" do |username, password|
    username == 'foo' && password == 'bar'


Browse keys See list with pagination ZSET support JSON pretty print


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request