Install the complete package with local command reference and every published mode.
install redisredisUse
redis [options] · redis : <command>redisshow the current
redis -c <host> [user] [database] [-p <port>] [-n] [-m [name]]connect; password is requested separately unless -n is used
-use <database>select another numeric database
-lshow databases reported by
-t [mask]list keys; * and ? are
-s <key>show key type, TTL and memory information
-n <key> [items]preview a key value
-f <mask> [text] [keys]find matching keys, or search text across their names and values
-o <key> [file] [-f]export one key as JSON
-w <key> : <value>set one string value
-d <key>delete one key
-m [name]save the current connection in .lil.key; default name is the
-M <name>remove a saved connection
-k [name]list saved connections or inspect one without showing its password
-K <name>connect using a saved connection
-edisconnect and clear connection data
redis : <command>execute a native
redis dump [file.json] [-f]create a binary-safe logical dump
redis load <file.json>restore a lil
Connect with -t "product:*" lists matching keys, -s product:1001 shows type and TTL, -n product:1001 previews its value, and -f "product:*" shoe 10 searches within a bounded set. Use
-w only sets a **string** value; to modify a hash, list or sorted set, use the appropriate native :. -d removes a key. dump saves a lil JSON container of binary-safe load uses RESTORE and can replace existing keys. Verify the selected numeric database before deletion or restoration. Real use requires PHP
-t lists keys by -f <mask> [text] [keys] uses the same mask and, when text is supplied, searches both key names and compact value previews; the optional final number limits candidate keys scanned.
-w stores one string value and -d removes one key. Use native commands after : for hashes, lists, sets, streams, transactions and other
dump stores
-c accepts host, optional ACL user and database number. The password is requested separately unless -n explicitly selects a passwordless server.
Key scans are capped to keep the browser terminal responsive. Native
Previews are bounded for responsiveness. Single-key export refuses values above 100000 items and dump refuses databases above 100000 keys instead of silently truncating them.
Without -m, connection data remains scoped to the current PHP session. -m [name] explicitly stores the current profile in the protected .lil.key file (0600), -K <name> reconnects from it, -k lists or inspects profiles without exposing a stored password, and -M <name> removes one. kill removes .lil.key together with the other core state. Treat the file as sensitive because an opted-in profile can contain database credentials.
Run the prepared examples directly on the page. Their results are prebuilt and shown in the browser; no terminal command is executed on the server.
Install the current compatible version. Choose Base for the complete feature set or Minimum for the reduced package; use upgrade to update a module that is already installed.
Base and Minimum are two packages of the same current module release, not separate command versions.
Install the complete package with local command reference and every published mode.
install redisInstall the reduced package. Local reference is omitted;
install redis -mInstall exactly this published version.
install redis -v 1.1.4Ask upgrade to check compatibility and replace the installed block only when needed.
upgrade redisRemove the extension block while leaving the core and unrelated modules intact.
install redis -uExamples are copyable command lines, not actions executed by this website. Review paths, permissions and destructive flags before running them on a real project.
redisIllustrative sandbox preview — no live connection
A connection is required; the status view names the server and selected database.redis -c localhost -nIllustrative sandbox preview — no live connection
Connection example: server and database will be shown after a successful connection.redis -c localhost demo 0Illustrative sandbox preview — no live connection
Password is requested separately; connection details depend on the server.redis -c localhost -p 6380 -nIllustrative sandbox preview — no live connection
Connection example: server and database will be shown after a successful connection.redis -use 0Illustrative sandbox preview — no live connection
Selected database: 0 (requires an active connection)redis -lIllustrative sandbox preview — no live connection
db0: keys=4redis -tIllustrative sandbox preview — no live connection
inventory hash
product:1001 string
product:1002 string
product:1003 stringredis -t "product:*"Illustrative sandbox preview — no live connection
product:1001 string
product:1002 string
product:1003 stringredis -s product:1001Illustrative sandbox preview — no live connection
Key product:1001
Type string
TTL -1 (in this teaching snapshot)
Bytes depends on Redis versionredis -n product:1001Illustrative sandbox preview — no live connection
City shoeredis -n inventory 2Illustrative sandbox preview — no live connection
{"SHOE-1": 18, "SHOE-2": 7}redis -f "product:*"Illustrative sandbox preview — no live connection
product:1001 string
product:1002 string
product:1003 stringredis -f "product:*" shoe 10Illustrative sandbox preview — no live connection
product:1001 string City shoe
product:1002 string Trail shoeredis -o product:1001Illustrative sandbox preview — no live connection
{
"key": "product:1001",
"type": "string",
"value": "City shoe"
}redis -o product:1001 tmp/product.jsonIllustrative sandbox preview — no live connection
Saved sandbox/tmp/product.json (if the destination does not exist)redis -o product:1001 tmp/product.json -fIllustrative sandbox preview — no live connection
Saved sandbox/tmp/product.json (replace existing file only with -f)redis -w product:1004 : Travel bagIllustrative sandbox preview — no live connection
+ (sets one string key)redis -d product:1004Illustrative sandbox preview — no live connection
Deleted 0 (the independent snapshot has no product:1004)redis : GET product:1001Illustrative sandbox preview — no live connection
City shoeredis : DBSIZEIllustrative sandbox preview — no live connection
4redis dump tmp/redis-backup.jsonIllustrative sandbox preview — no live connection
Saved sandbox/tmp/redis-backup.json
Format lil-redis-dump (logical data export, not server backup)redis dump tmp/redis-backup.json -fIllustrative sandbox preview — no live connection
Saved sandbox/tmp/redis-backup.json
Format lil-redis-dump (logical data export, not server backup)redis load tmp/redis-backup.jsonIllustrative sandbox preview — no live connection
Redis RESTORE reads a lil dump file; this file must exist and existing keys may be replaced.redis -m cache-demoIllustrative sandbox preview — no live connection
Saved cache-demo (stores a sensitive profile in .lil.key)redis -kIllustrative sandbox preview — no live connection
No saved connections (unless a profile has already been saved)redis -k cache-demoIllustrative sandbox preview — no live connection
Saved connection not found: cache-demo (unless saved earlier)redis -K unknownIllustrative sandbox preview — no live connection
Saved connection not found: unknownredis -M unknownIllustrative sandbox preview — no live connection
Saved connection not found: unknownredis -eIllustrative sandbox preview — no live connection
+redis -n missing:keyIllustrative sandbox preview — no live connection
Key not foundredis -use wrongIllustrative sandbox preview — no live connection
Numeric Redis database requiredredis -w product:1004Illustrative sandbox preview — no live connection
Value required after :sandbox/db/redis.txtThe example uses a file or directory from the protected /sandbox/ documentation workspace.
SET product:1001 "City shoe"
SET product:1002 "Trail shoe"
SET product:1003 "Canvas bag"
HSET inventory SHOE-1 18 SHOE-2 7 BAG-1 24
Current stable release of