Documentation

Red Interface

Red is a visual view into Redis.

Console

The console resides at the bottom of the view and exposes how Red is communicating with the backend. There is an input field below the console that accepts redis commands. If Red detects that the command modifies the currently selected key, the key will be reloaded to reflect the change. The console can be cleared by clicking the trash can in the bottom right corner.

Lua Scripts

Lua Scripts can be organized and run from the Scripts menu. The Lua script files are stored at ~/Library/Application Support/Red/Scripts which can be quickly loaded by selecting "Show in Finder" from the Scripts menu. Within this directory, the scripts can be sorted into subdirectories. When a script is added or removed from this directory, select Scripts: Reload Scripts so to refresh the scrips menu. Scripts are loaded from the filesystem on each run, so one can modify a script and then test it immediately in Red.

Sample scripts are included in a directory called "Starter Kit" to help understand how to develop scripts.

-- Description: Greet the person with the selected key, and optional values
-- KEYS[1]: Key to fetch : <selection>
-- ARGV[1]: Name

local name=redis.call("get", KEYS[1])
local greet=ARGV[1]
local result="Hello, " .. greet.."!  The selected key has value: "..name
return result

Comment Metadata

Description: {description_text}
.notification(self, title, subtitle="", informative_text="", callback=None)
Text to describe the functionality to the user. This will be displayed in the form dialog.

KEYS[{n}] : {label}: {default}
Example: KEYS[1]: The key to fetch : <selection>
Key should be listed in numerical order (filling in {n} with the next sequential integer). Label text and an optional default follows. Set {default} to the text <selection> to use the selected key in the sidebar.

ARGS[{n}] : {label} : {default}
Example: ARGS[1]: How many items to move : 5
Additional arguments should be listed in numerical order (filling in {n} with the next sequential integer). Label text and an optional default follows. Set {default} to the text <selection> to use the selected key in the sidebar.

Screenshot of a sample action

Contents