Regis Documentation


Documentation

This is the documentation for Regis. For a gentler introduction and a quick overview of the application, please refer to the quick start guide.

The User Interface

The main Regis interface.
The main Regis interface.

Regis uses a convenient multi-window, multi-tabs main user interface. The typical shortcuts are available to manage windows and tabs: ⌘T opens a new tab, ⌘N opens a new window, ⌘W closes the current tab, ⌘⇧W closes the current window. Each tab is an independent Redis session and has the same layout.

At the bottom is the Command Box where commands are typed. It can be resized using the Resize Bar. The Prompt indicates the current mode - typically, the > prompt is displayed, but when a connection is in pipeline, pub-sub or monitor mode, it is reflected in the prompt.

The upper part, by default the main part of the screen, is the Output Section. This is where the results of the commands are displayed. Most commands produce a result, and those results are listed here, in a scrollable list so that old results can still be viewed after other commands have been executed.

The Execute Button executes the command typed in the Command Box. It turns blue when a valid command is ready to be executed. The button remains disabled while the command is running, but otherwise the interface is not blocked. The ⌘⏎ shortcut can be used instead of clicking on the button.

The Output Filter text box filters the displayed results. The Edit→Filter menu item (shortcut: ⌘F) moves the focus to this text box.

Commands

Regis, much like Redis, is based on the concept of executing commands. It supports arbitrary Redis commands - that is, it doesn’t prevent executing unknown commands so that things like renaming Redis commands (via the rename-command configuration option) and extending Redis via modules (available starting with Redis 4.0) is automatically supported in Regis. As long as it speaks the Redis Protocol, Regis can handle it.

In addition to Redis commands, it provides a number of built-in commands. As is the case for Redis, commands are case-insensitive.

Built-In Commands

Built-in commands start with a backslash (\) to differentiate them from standard Redis commands. More specifically, the backslash is a command modifier: it must be the first non-whitespace character typed but it can have whitespace after the backslash, before the actual built-in command name. For example, those commands are all equivalent:

> \disconnect

> \       DISCONNECT

>
\

DISconnect

So technically, the built-in command names do not include the backslash, but for simplicity just remember that a built-in command must be prefixed with the backslash. The built-in command reference leaves the command modifier out of the name.

CLEAR

> \CLEAR

Clear the output section of the current session. Also available as Edit→Clear Output menu item with the shortcut key ⌘K.

CLUSTERCONNECT

\CLUSTERCONNECT [READONLY] host:port [host:port ...]

Connect to a Redis cluster. At least one host:port address must be specified, Regis will automatically detect the other nodes if the cluster is stable. If readonly is passed as first argument, it will try to connect to the replicas in read-only mode. Unlike a simple \CONNECT to a single node, a cluster connection automatically follows the MOVED replies so that the keys can be accessed without concern for the node that holds the corresponding slot.

As for \CONNECT, the hosts must be accessible from your computer, otherwise an SSH tunnel must be set up.

Please note that currently, connecting to a Redis cluster via an SSH tunnel means that Regis can’t automatically follow the MOVED replies from the cluster, because the address of the other host will not be accessible from your computer. This is something that is being worked on for a future update of Regis. See the upcoming releases section to see how we intend to make this better in future releases.

CONNECT

\CONNECT host:port

or as separate arguments for host and port:

\CONNECT host port

Connect to the specified host and port. The port must be numeric. The host must be accessible from your computer. See connecting via an SSH tunnel otherwise.

Regis assigns a name to each client connection to the Redis host so that those connections are easily identifiable in CLIENT LIST outputs. The name used is username@hostname:Regis_version+build (that is, the current username, the current hostname, the literal string “Regis”, its version and build number).

DISCARD

\DISCARD

Execute the pipeline and discard the results so they are not displayed in the output. Available as Session→Discard Pipeline Results menu item with the shortcut key ⌘⇧⌫.

DISCONNECT

\DISCONNECT

Disconnect the current session from the Redis host. Closing the tab (or window) also properly disconnects the session.

HELP

\HELP [command]

Display the help message for the specified command. The ? command can also be used as an alias for \HELP. To get help on built-in commands, prefix the command name with a backslash (\), e.g.:

> ? \ connect

LOADSESSION

\LOADSESSION name

Load a saved session, replacing the current session. Sessions can be saved via the Session→Settings menu item. If the saved session was connected to a host, loading that session will try to connect to that host. If the saved session was authenticated with a password, that password will be used to authenticate the loaded session.

Passwords are securely saved in the macOS Keychain.

REALTIME

\REALTIME key

Watch for changes to the specified key in (near) real-time. For better results, the keyspace notifications should be enabled on the Redis host. This is available since Redis 2.8.0, and can be enabled with CONFIG SET notify-keyspace-events KA (or in the Redis configuration file to make the setting persistent).

If keyspace notifications are not enabled (or unavailable for that version of Redis), the command falls back to polling the key’s value at the interval defined in the settings (\REALTIME Polling Interval), and adding an event whenever the value changes.

Note that this command loads the full value of the key (it executes a GET, LRANGE, SMEMBERS, ZRANGE or HGETALL depending on the type of value), so you should avoid running this on very big keys.

The command uses a separate connection to watch (or poll) the specified key, so that other commands can still be executed via the command box while this is running. The session uses connection pooling to make efficient use of connections.

The command will automatically stop watching for changes once a maximum number of events is reached (controlled by the \REALTIME Events Limit setting). It can also be stopped manually by clicking the Stop button.

RECEIVE

\RECEIVE

Execute the pipeline and display the results of all commands. Available as Session→Receive Pipeline Results menu item with the shortcut key ⌘⇧⏎.

SCANKEYS

\SCANKEYS [pattern]

Efficiently scans for keys matching the specified pattern, or if no pattern is provided, for all existing keys. This executes the SCAN Redis command until the iteration is complete (all matching keys are returned) or the maximum number of keys to return is reached (controlled by the \SCANKEYS Returned Keys Limit setting).

Because of the incremental nature of the command, this is safe to use in production environments (unlike the Redis KEYS command which may block the server for a long period of time). The maximum number of keys to return per SCAN Redis calls is controlled by the \SCANKEYS Limit Per SCAN Call setting. The returned keys are automatically deduplicated and sorted (the Redis SCAN command may return duplicates during an iteration and does not order the keys).

From the results view, selected keys can be batch-deleted (or UNLINKed for Redis 4.0+) or watched in real-time.

The command uses a separate connection to retrieve the keys, so that other commands can still be executed via the command box while this is running. The session uses connection pooling to make efficient use of connections.

SENTINELCONNECT

\SENTINELCONNECT MASTER|SLAVE mastername host:port [host:port ...]

Connect to a Redis host via its sentinels. At least one host:port address must be specified, Regis will automatically detect the other sentinels. If slave is passed as first argument, it will try to connect to a replica. A sentinel connection allows connecting to a named host without having to know its current address, which may change if the sentinel detects a failover and elects a new node as master.

As for \CONNECT, the sentinel hosts and the instances they manage must be accessible from your computer.

An SSH tunnel could be setup to access a sentinel, but it is unlikely to be useful because the Redis instances managed by the sentinel will still not be accessible. See the upcoming releases section to see how we intend to make this better in future releases.

SWITCHTO

\SWITCHTO [MASTER|SLAVE|CLUSTER|ROCLUSTER|MASTERNAME|SLAVENAME] [mastername]

If no parameter is provided, display the topology of the current Redis connection (for example, if this is a Redis master with 2 slaves, displays the master as current and its slaves as possible \SWITCHTO targets). If a parameter is provided, switch the current session to a connection to the specified target.

A standalone Redis master can switch to a connection to its slave, and vice-versa. A connection to a single Redis host that is part of a cluster allows a switch to the cluster (a \CLUSTERCONNECT) and, if the cluster has slaves, to a read-only cluster. A connection to a sentinel host allows a switch to a master name that it manages, and if slaves are available for that master, to a slave name that it manages.

The same restrictions described in the help for \CONNECT, \CLUSTERCONNECT and \SENTINELCONNECT apply regarding the nodes that need to be accessible from the current computer. See the upcoming releases section to see how we intend to make this better in future releases.

Redis Commands

Because Regis makes no assumption about valid and invalid command names, all Redis commands are supported, even those that may not exist today. This is important given that Redis:

  • supports renaming commands via the rename-command configuration option
  • supports modules to extend the available commands starting with v4.0

Regis will try to execute any command and will properly send it according to the Redis Serialization Protocol. It lets the server decide if the command and syntax is valid, and will print the returned error if it isn’t.

As for the built-in commands, there is a command modifier used to send standard Redis commands and wait for its result: the “greater than” symbol (>). However, because this is the default modifier in the default mode (when the prompt displays >), it doesn’t have to be typed.

As explained in the command box’ pipeline section, there is another command modifier, the pipe (|), which is used to start a command pipeline.

Integrated Help

As seen in the \HELP built-in command section, help can be displayed for any known command (built-ins and standard Redis ones).

The help text displays the command’s signature (how it must be called) in the same way as the official Redis documentation. Command names and exact values (enums, e.g. MASTER|SLAVE in \CLUSTERCONNECT) are uppercased and valid enumeration values are separated by a pipe (|) character. Optional parameters are inside square brackets ([]) and parameters that may be repeated multiple times are followed by an ellipsis (...).

Below the signature, the help text displays the Big-O complexity when available, and the version of either Regis (for built-ins) or Redis (for standard commands) when the command was introduced.

The Command Box

Located in the lower part of the screen, this is where commands are typed. The command box has a prompt that indicates the current mode, and is otherwise a multi-line text field. Whitespace separates command name and arguments, unless an argument is quoted (in which case the closing quote terminates the argument’s value). Whitespace includes newlines, so the command may be typed using newlines to separate values.

As mentioned earlier, the first non-whitespace character may be a command modifier. Regis recognizes three such modifiers:

  • the pipe character (|) to start a command pipeline
  • the backslash character (\) to execute a built-in command
  • the greater-than character (>) to execute a standard Redis command

Depending on the current session’s connection mode, some command types may not be valid. For example:

  • in disconnected mode, Redis commands are not valid
  • in pub-sub mode, a small subset of Redis commands are valid
  • in monitor mode, Redis commands are not valid

A command is executed by clicking on the Execute Button or by selecting the Session→Execute Command menu item (shortcut: ⌘⏎).

The following subsections explain the various modes.

Standard Mode

Prompt: >

This is the default mode. In this mode, standard Redis commands do not have to be prefixed with a >, as it is implied by the mode (and the prompt).

Pub-Sub Mode

Prompt: (pub-sub) !

The connection enters this mode with the SUBSCRIBE or PSUBSCRIBE Redis commands. While in pub-sub mode, a small subset of Redis commands can be executed: (P)SUBSCRIBE / (P)UNSUBSCRIBE / PING / QUIT. As for the default mode, Redis commands do not have to be prefixed with a >, it is implied (although the prompt ends with a ! to indicate that only a subset of those are valid). Built-in commands can also be executed.

In this mode, the connection listens for published messages on the subscribed channel(s) and/or pattern(s). Received messages are displayed as Redis string values (the actual Redis type received is an array that contains some metadata about the message, but in the JSON and Binary tabs of the result, only the actual value published to the channel is displayed).

The connection exits the pub-sub mode when it is unsubscribed from all channels and patterns, or when it is disconnected (either explicitly via \DISCONNECT or QUIT, or by resetting the connection).

Pipeline Mode

Prompt: (pipeline: n) | (where n is the number of commands in the pipeline)

The connection enters the pipeline mode when a Redis command is executed with the pipe (|) command modifier. In this mode, all commands can be executed and the pipe modifier does not have to be entered, as it is implied by the mode and the prompt (with the ending |).

All Redis commands executed in this mode are added to the pipeline and are executed when either \RECEIVE or \DISCARD is executed (or the session is disconnected or reset).

Monitor Mode

Prompt: (monitor, ^C to exit) !

The connection enters the monitor mode when the MONITOR Redis command is executed. There is no way to exit this mode other than to disconnect or reset the connection. Built-in commands can be executed.

Command History

Regis maintains a history file of executed commands. The number of commands to keep in the history is configurable via a preference. Help commands (\HELP or ?) and commands that may contain a password (e.g. AUTH, CONFIG SET require-pass, etc.) are never stored. Very large commands are not stored either, to keep the history and command completion efficient.

To navigate in the command history, use the Session→Go Forward in History (shortcut: ⌘⇧↓) and Session→Go Back in History (shortcut: ⌘⇧↑) menu items.

The position of the caret (sometimes called insertion point or cursor, though not to be confused with the mouse cursor) in the textbox represents the filter used to find matches in the history. If the caret is at the start of the command, all of the history is used. However, if it is located anywhere else, all preceding text will be used to filter the history matches (only history commands with a matching prefix will be displayed).

For example, assuming ^ represents the caret:

> ^get a
(⌘⇧↑ navigates through all history)
> get^ a
(⌘⇧↑ navigates only through "GET" commands in the history)

Command Completion

At any moment in the command box you can select the Session→Show Completions menu item (shortcut: ^[space]) to suggest command completions. It uses the list of built-in and known Redis commands as well as the history to find suggestions that match the command prefix based on the position of the caret, as explained in command history.

A suggestion can be selected using the arrows and ↹ tab (or ), and it can easily be ignored by hitting esc.

Reset Connection

To exit any connection mode and return to the default mode, the Session→Reset Connection menu item (shortcut: ^C) can be used. It is basically a \DISCONNECT followed by a \CONNECT to the same host. If the connection was authenticated, it will re-authenticate as well.

It will also clear any pending command typed in the command box.

Quoted Strings

By default, whitespace delimits the arguments, so for example:

> SET key hello, world

fails with a syntax error, because the SET command expects 2 arguments (the key and the value) and in this case, 3 arguments where sent (“key”, “hello,” and “world”).

To send “hello, world” as a single argument, the value must be quoted with double-quotes ("):

> SET key "hello, world"

Inside the quotes, double-quotes (") and the backslash character (\) have to be escaped, using the backslash as escape character, as is typical in many programming languages. So to type, literally and including the quotes, "\", you have to type "\"\\\"".

Newlines are allowed inside the double-quotes, so you don’t have to escape them with \n (although you can). The following escape sequences are supported:

  • \" : a double-quote
  • \\ : the backslash character
  • \n : the newline character
  • \r : the carriage return character
  • \t : the horizontal tab character
  • \u{n} : a Unicode scalar, where n is a 1-8 digit hexadecimal number with a value equal to a valid Unicode code point

The value is displayed with a red underline if it is not valid (e.g. an invalid escape sequence or an unclosed quote). The execute button is disabled as long as the command is invalid. A tooltip explaining the nature of the error is displayed when the mouse is over the invalid value.

Regis supports pasting a value from the system’s clipboard as a quoted string. Select the Edit→Paste Special→Quoted String menu item to paste the clipboard’s value as a valid quoted string at the current caret position in the command box.

Binary Data

As Redis strings are basically an array of bytes, it can be useful to send binary data in a command. Regis supports that use-case using two binary encodings, hexadecimal and base64. It uses a special prefix to identify data sent with this encoding, and the corresponding binary data is sent to Redis instead of the literal value.

Hexadecimal

To enter binary data in hexadecimal encoding, prefix the value with a pound character (#) and then type a valid hexadecimal value. The value is only valid if full bytes are specified (that is, an even number of hexadecimal digits). No whitespaces are allowed within the hexadecimal value.

The value is displayed with a red underline if it is not valid (e.g. an invalid hexadecimal digit). The execute button is disabled as long as the command is invalid. A tooltip explaining the nature of the error is displayed when the mouse is over the invalid value.

For example:

> SET key #BADF00

If you GET the value back, it will display in base64 encoding by default in the result (because this is not a valid UTF-8 string), but you can see that the value is exactly the same by selecting the Binary tab and then the Hexadecimal format.

Regis supports pasting a value from the system’s clipboard as an hexadecimal value. Select the Edit→Paste Special→Hexadecimal-Encoded Binary menu item to paste the clipboard’s value as hexadecimal at the current caret position in the command box.

If you want to set a value that starts with a pound character (#), simply duplicate the leading # (e.g. SET key ##my-non-hex-value).

Base64

To enter binary data in base64 encoding, prefix the value with the at sign (@) and then type a valid base64 value. The value is only valid if the characters are all valid base64 characters (including the padding characters, though those are not necessary). No whitespaces are allowed within the base64 value.

The value is displayed with a red underline if it is not valid. The execute button is disabled as long as the command is invalid. A tooltip explaining the nature of the error is displayed when the mouse is over the invalid value.

For example:

> SET key @SGVsbG8sIHdvcmxkIQ

If you GET the value back and select the Binary tab and then the Base64 format, you can see that it was properly set (with missing padding characters).

Regis supports pasting a value from the system’s clipboard as a base64-encoded value. Select the Edit→Paste Special→Base64-Encoded Binary menu item to paste the clipboard’s value as base64 at the current caret position in the command box.

If you want to set a value that starts with an at-sign (@), simply duplicate the leading @ (e.g. SET key @@my-non-base64-value).

The Output Section

The output section is where the results are displayed. The number of results to keep in the list is specified by a user preference. The list can be cleared at any moment with the \CLEAR built-in command or the Edit→Clear Output menu item (shortcut: ⌘K). It can be filtered with the filter box, accessible with the ⌘F shortcut.

Some results have nested scrolling, for example if a result displays a table with lots of rows, that table will scroll, making it hard to scroll through the output section. On either side of the screen, there’s a gutter that is outside any results view (located below the disclosure triangle used to expand or collapse a result, and the same size on the other side of the screen). Scrolling in this location will always scroll the output section.

The results displayed vary depending on the type of result. All results have a simple, single-line view so that it is still useful even when collapsed, and some have a featureful expanded view where more details and additional actions can be performed.

The following subsections go through those various views.

Information & Error Messages

Single-line output for information and error messages.
Single-line output for information and error messages.

This is the output for Regis messages. Errors are displayed with a red circle indicator, and sucessful actions with a green circle. This output is also used for MONITOR messages (without any indicator).

Single-line output for monitor messages.
Single-line output for monitor messages.

Redis Values

Rich output for Redis values (including Redis errors).
Rich output for Redis values (including Redis errors).

Redis values are displayed using a rich output with up to 3 tabs:

  • Details : displays the value, the time spent executing the command and the type of the Redis value.
  • JSON : displays the pretty-printed JSON encoding of the value. If the value is a Redis string, it can display the content of the string as pretty-printed JSON. If the value is a Redis array and when treated as alternating keys and values, the keys are valid strings, it can be displayed as a pretty-printed JSON object.
  • Binary : if the value is a Redis string, it can be viewed as binary encoded as base64, hexadecimal or raw binary (zeros and ones). This is particularly useful when the value is used to manipulate bits in Redis.

Built-In Commands Output

REALTIME

Rich output for the \REALTIME command.
Rich output for the \REALTIME command.

Watching a key in real-time displays each change to the key as an event in a table. It is possible to stop the real-time monitoring by clicking the Stop button.

SCANKEYS

Rich output for the \SCANKEYS command.
Rich output for the \SCANKEYS command.

The matching keys for a \SCANKEYS command are displayed in a table, sorted alphabetically by default. Keys can be selected and filtered. As for \REALTIME, the \SCANKEYS iteration can be stopped early by clicking on the Stop button. Selected keys can be watched in real-time by clicking the Real-time button. This is the same as executing a \REALTIME command for each selected key. Selected keys can also be batch-deleted by clicking on the Delete (or Unlink for Redis v4.0+) button.

SWITCHTO

Rich output for the \SWITCHTO command.
Rich output for the \SWITCHTO command.

When executed without argument, the \SWITCHTO command displays the detected topology of the current Redis host. It is possible to switch to any one of the detected targets by selecting the target in the drop-down box and clicking on the Switch button.

See the \SWITCHTO command for restrictions regarding switching to hosts that are not accessible from the local computer.

Special Commands

Some well-known Redis commands can have a custom output instead of the standard one for Redis values. This behaviour can be changed via a preference.

CLIENT LIST

Rich output for the CLIENT LIST Redis command.
Rich output for the CLIENT LIST Redis command.

The custom output for the CLIENT LIST command parses the list and displays it in a table view. The list can be refreshed by clicking on the Refresh button, and clients can be selected and killed by clicking on the Kill button.

CLUSTER INFO, CONFIG GET & INFO

Rich output for the CLUSTER INFO, CONFIG GET and INFO Redis commands.
Rich output for the CLUSTER INFO, CONFIG GET and INFO Redis commands.

For commands that return an array of alternating keys and values (or a string of key:value separated by newlines), Regis can parse the result and display it in a table view.

CLUSTER NODES & CLUSTER SLAVES

Rich output for the CLUSTER NODES and CLUSTER SLAVES Redis commands.
Rich output for the CLUSTER NODES and CLUSTER SLAVES Redis commands.

The custom output for the CLUSTER NODES (and the similar CLUSTER SLAVES) command parses the result and displays it in a table view.

Session Settings

Session settings panel.
Session settings panel.

Session settings are set independently for each session. Each session starts with default settings, unless it was created using the File→New Tab with Current Session or the File→New Window with Current Session menu items (shortcuts: ⌘⇧T and ⌘⇧N, respectively), in which case the new session starts with the same settings as the original session. However, each session’s settings are still independent and changing the settings in one session will not alter the settings in the other.

Each connected session (a tab in the user interface) uses one main connection to execute the commands typed in the command box, and may use additional connections to run built-in commands like \SCANKEYS or \REALTIME. The maximum number of connections that can be used by a session can be configured in the session settings. Regis uses connection pooling to make efficient use of connections and avoid the overhead of always setting up a new one.

To change the settings, select the Session→Settings menu item (shortcut: ⌘<), which opens the session settings panel displayed above. Settings marked with an asterisk (*) will reset the session’s connection when modified.

  • Save As : save the session’s settings and connection information to a file with the specified name. This saves the settings’ values, the Redis host to connect to, and the connection’s authentication password, if any. The password is securely stored in the Mac’s Keychain. Clicking the Delete button instead of Save deletes the saved session with the specified name. Saved settings can be loaded by the \LOADSESSION built-in command.

  • Maximum Number of Active Connections : sets the maximum number of connections that may be active at a given time for the session. Commands such as \REALTIME and \SCANKEYS use additional, distinct connections (not the session’s main connection that executes the typed commands). This setting limits the number of such connections.

  • Socket Read Timeout : number of milliseconds to wait for a read on the connection’s socket.

  • Socket Write Timeout : number of milliseconds to wait for a write on the connection’s socket.

  • Maximum Number of Arguments Per Command : limits the number of arguments allowed per command, useful for commands such as DEL or MGET that have an O(N) complexity where N is the number of keys. This setting allows to control the load that a user can put on the Redis server.

  • Maximum Number of Commands in Pipeline : limits the number of commands that can be sent in a pipeline. Similar to the previous setting, this is another one that allows to control the load put on the Redis server to avoid blocking for too long a time.

  • \SCANKEYS Returned Keys Limit : maximum number of keys that can be returned by a \SCANKEYS call. When the limit is reached, the command’s output is automatically stopped.

  • \SCANKEYS Limit Per SCAN Call : maximum number of keys that can be returned by a single SCAN call in a \SCANKEYS execution. A bigger number means less calls needed to retrieve all keys, but each call may block the server for a longer time. As mentioned in the Redis documentation, this is just a hint.

  • \REALTIME Keys Limit Via \SCANKEYS Results : maximum number of keys that can be watched in real-time by clicking the Real-time button in the \SCANKEYS output. This should be set to a number <= to the maximum number of active connections, as each \REALTIME execution uses a separate connection.

  • \REALTIME Events Limit : maximum number of events displayed by a \REALTIME call. When the limit is reached, the command’s output is automatically stopped.

  • \REALTIME Polling Interval : when the Redis host does not support keyspace notifications, this setting is the number of milliseconds to wait between calls to retrieve the key’s value and check for changes.

  • Blacklist : list of commands (or command prefixes, as Regis will match the typed command with the blacklisted commands by prefix, including matches of arguments, case-insensitive) that are not allowed for execution by the user. Applies only to Redis commands, not built-ins. This list is ignored if the whitelist is not empty.

  • Whitelist : list of commands (command prefixes, same matching behaviour as the blacklist) that are allowed for execution by the user. If this list is not empty, only commands matching this list can be executed by the user. Applies only to Redis commands, not built-ins.

User Preferences

User preferences window.
User preferences window.

The user preferences window is for the configuration of preferences that apply to the whole Regis application.

  • Maximum Number of Output Rows : limit the number of rows displayed in the output section.

  • Number of Automatically Expanded Rows : sets the number of rows (results) that are shown expanded on display. After that number of rows, rows that were not explicitly expanded by the user are automatically collapsed when new rows are displayed.

  • NULL Value Label : label used to represent the NULL Redis value.

  • Command Preferred Case : casing to use for commands (Redis and built-ins). Applies to the output, the command completion and the history.

  • Detect Known Multi-Word Commands : indicates if Regis should try to detect multi-word commands and apply the preferred casing to all words in the command. For example, CLIENT LIST and CONFIG GET are multi-word commands. If this setting is not checked and the preferred casing is set to uppercase, those commands could be displayed as CLIENT list and CONFIG get.

  • Show Welcome Help On New Tab : if checked, the welcome message is displayed on each new tab. While this is useful to get started with the application, after a while it can become annoying. This setting allows to turn this message off.

  • Display Table Output For Special Commands : if checked, special commands such as CLIENT LIST and INFO are parsed and displayed in a special output instead of the default Redis value output. See special commands for more details.

  • Maximum Commands in History : limits the number of commands stored in the history file.

Connecting Via An SSH Tunnel

If the Redis host is not available from your computer and you have proper access rights to that host, you can setup an SSH tunnel to securely connect to the server. An SSH tunnel, in this scenario, exposes a remote Redis host on a local port, so that you may connect to that port on localhost as if it was the remote host. The requests are automatically forwarded to the Redis instance on the remote host, and the responses from the remote Redis instance are forwarded back to the local port.

It is very simple to setup an SSH tunnel for a standalone Redis host. Open a terminal and type the following command, adjusting the parameters as explained next:

$ ssh -N -L localport:remotehost:remoteport user@sshserver
  • -N tells ssh not to run any command on the remote SSH server, just forward ports
  • -L tells ssh to forward ports according to the following parameter
  • localport is the local port on which the remote Redis host will be exposed
  • remotehost is the address to which the SSH tunnel will connect on the remote sshserver (if the sshserver is the server where Redis is running, remotehost will be localhost)
  • remoteport is the port on the remotehost where the Redis instance is running
  • user is the username to use to connect to the sshserver
  • sshserver is the SSH server to connect to, from which the Redis instance is accessible

Execute man ssh for more information. If successful, this command runs the tunnel until it is stopped (e.g. with ^C). You can then go back to Regis and connect to that Redis instance with \CONNECT localhost:localport (where localport is the corresponding port number used in the ssh command).

You need to have access to sshserver, typically by having one of your SSH public keys installed as an authorized key on that server. The Redis instance doesn’t have to be running on that server, but that server needs to have access to the server that runs the Redis instance (another option is to have the sshserver forward your connection to the Redis instance, but that is beyond the scope of this short SSH tunnel primer).

Note that for Redis Cluster, Sentinel and the \SWITCHTO command, such a tunnel will not work. The reason is that the SSH tunnel is for a single Redis host, but - for example - in Redis Cluster, in order to retrieve a given key’s value, the connection may have to follow a redirection from host A in the cluster to host B that holds that key. But of course the information returned by Redis to connect to host B is the address known by the cluster, not a localhost address with an arbitrary local port going through an SSH tunnel. So with those types of connections, it is impossible for Regis to connect to the address returned by Redis because that address is not accessible from the local computer.

There is ongoing development to fix that scenario for all types of connections in a future release, so that Redis Cluster, Sentinel and the \SWITCHTO command will all be fully supported even when connecting through an SSH tunnel.

Upcoming Releases

We are committed to quality and stability, so the top priority for future releases is to fix serious bugs and offer excellent support.

But we also have many ideas on how to make Regis even better. There are two main features that we are working on:

  • Better SSH tunneling, with full support for Redis Cluster redirections, Sentinel connections and \SWITCHTO targets.
  • SSL connection support.

You can let us know via the support page what missing feature you would like to see next. To stay up-to-date with new releases and related news, follow us on Twitter .