Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
7ec429a
feat: add Try It button to CLI code examples
paoloredis May 28, 2026
629daa4
fix: remove double HTML-escaping on tryit-commands data attribute
paoloredis May 28, 2026
9549911
fix: store Try It commands in JS object instead of HTML data attribute
paoloredis May 28, 2026
aac21dd
fix: properly HTML-escape tryit-commands data attribute
paoloredis May 28, 2026
b1580b3
fix: base64-encode Try It commands to avoid Cloudflare WAF block
paoloredis May 28, 2026
d69cbd1
Make redis-cli code examples interactive with Try It button
paoloredis May 29, 2026
78eb4e6
Render Redis status replies (e.g. PONG, OK) without quotes in CLI widget
paoloredis Jun 4, 2026
b487eb7
Render large-integer string replies as (integer) and escape bulk stri…
paoloredis Jun 4, 2026
7533040
Do not treat numeric bulk strings as integers; keep redis-cli quoting…
paoloredis Jun 4, 2026
e519788
Merge branch 'main' into DOC-6675
paoloredis Jun 10, 2026
1b0277e
Remove duplicate CLI widgets from command example pages
paoloredis Jun 10, 2026
54b4791
Share one CLI session per page and serialize requests
paoloredis Jun 10, 2026
5e7126f
Add explicit prereq/needs_prereq Try-it model for client examples
paoloredis Jun 11, 2026
064ad7b
Decouple Try-it seeding from buildsUpon metadata
paoloredis Jun 12, 2026
0f3112e
Revert buildsUpon removal on strings incr/mset examples
paoloredis Jun 12, 2026
26b04f5
Merge origin/main into DOC-6675
paoloredis Jun 17, 2026
d6f817d
Add runnable parameter for clients-example CLI rendering
paoloredis Jun 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions content/commands/del.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,6 @@ One or more keys to delete.
(integer) 2
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
SET key1 "Hello"
SET key2 "World"
DEL key1 key2 key3
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

| Redis<br />Software | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |
Expand Down
25 changes: 5 additions & 20 deletions content/commands/exists.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,28 +72,13 @@ One or more keys to check for existence. A repeated key is counted once per occu
## Examples

{{< clients-example set="cmds_generic" step="exists" description="Foundational: Check if one or more keys exist using EXISTS (returns count of existing keys, useful for conditional logic)" difficulty="beginner" >}}
SET key1 "Hello"
"OK"
EXISTS key1
(integer) 1
EXISTS nosuchkey
(integer) 0
SET key2 "World"
"OK"
EXISTS key1 key2 nosuchkey
(integer) 2
> SET key1 "Hello"
> EXISTS key1
> EXISTS nosuchkey
> SET key2 "World"
> EXISTS key1 key2 nosuchkey
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
SET key1 "Hello"
EXISTS key1
EXISTS nosuchkey
SET key2 "World"
EXISTS key1 key2 nosuchkey
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

| Redis<br />Software | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |
Expand Down
14 changes: 0 additions & 14 deletions content/commands/expire.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,20 +171,6 @@ Set the expiry only when the new expiry is less than the current one. A non-vola
(integer) 10
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
SET mykey "Hello"
EXPIRE mykey 10
TTL mykey
SET mykey "Hello World"
TTL mykey
EXPIRE mykey 10 XX
TTL mykey
EXPIRE mykey 10 NX
TTL mykey
{{% /redis-cli %}}

## Details

### Refreshing expires
Expand Down
15 changes: 8 additions & 7 deletions content/commands/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,14 @@ The name of the key.

## Examples

{{% redis-cli %}}
GET nonexisting
SET mykey "Hello"
GET mykey
{{% /redis-cli %}}
&nbsp;
{{< clients-example set="set_and_get" step="get" description="Foundational: Retrieve the string value of a key using GET (returns nil if key doesn't exist)" difficulty="beginner" />}}
{{< clients-example set="set_and_get" step="get" description="Foundational: Retrieve the string value of a key using GET (returns nil if key doesn't exist)" difficulty="beginner" >}}
> GET nonexisting
(nil)
> SET mykey "Hello"
"OK"
> GET mykey
"Hello"
{{< /clients-example >}}

## Redis Software and Redis Cloud compatibility

Expand Down
14 changes: 3 additions & 11 deletions content/commands/hdel.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,14 @@ One or more fields to delete from the hash.
## Examples

{{< clients-example set="cmds_hash" step="hdel" description="Foundational: Delete one or more fields from a hash using HDEL (returns count of deleted fields, ignores non-existent fields)" difficulty="beginner" >}}
HSET myhash field1 "foo"
> HSET myhash field1 "foo"
(integer) 1
HDEL myhash field1
> HDEL myhash field1
(integer) 1
HDEL myhash field2
> HDEL myhash field2
(integer) 0
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
HSET myhash field1 "foo"
HDEL myhash field1
HDEL myhash field2
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

| Redis<br />Software | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |
Expand Down
17 changes: 4 additions & 13 deletions content/commands/hexpire.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,26 +156,17 @@ Starting with Redis 8, Redis Search has enhanced behavior when handling expiring
## Examples

{{< clients-example set="cmds_hash" step="hexpire" description="Field expiration: Set TTL on individual hash fields using HEXPIRE with conditional options (NX, XX, GT, LT) when you need fine-grained control over field lifecycle" difficulty="intermediate" >}}
HEXPIRE no-key 20 NX FIELDS 2 field1 field2
> HEXPIRE no-key 20 NX FIELDS 2 field1 field2
(nil)
HSET mykey field1 "hello" field2 "world"
> HSET mykey field1 "hello" field2 "world"
(integer) 2
HEXPIRE mykey 10 FIELDS 3 field1 field2 field3
> HEXPIRE mykey 10 FIELDS 3 field1 field2 field3
1) (integer) 1
2) (integer) 1
3) (integer) -2
HGETALL mykey
> HGETALL mykey
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
HEXPIRE no-key 20 NX FIELDS 2 field1 field2
HSET mykey field1 "hello" field2 "world"
HEXPIRE mykey 10 FIELDS 3 field1 field2 field3
HGETALL mykey
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

| Redis<br />Software | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |
Expand Down
8 changes: 0 additions & 8 deletions content/commands/hget.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,6 @@ The field whose value to retrieve.
(nil)
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
HSET myhash field1 "foo"
HGET myhash field1
HGET myhash field2
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

| Redis<br />Software | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |
Expand Down
8 changes: 0 additions & 8 deletions content/commands/hgetall.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,6 @@ redis> HGETALL myhash
4) "World"
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
HSET myhash field1 "Hello"
HSET myhash field2 "World"
HGETALL myhash
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

| Redis<br />Software | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |
Expand Down
8 changes: 0 additions & 8 deletions content/commands/hmget.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,6 @@ One or more fields whose values to retrieve.
>
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
HSET myhash field1 "Hello"
HSET myhash field2 "World"
HMGET myhash field1 field2 nofield
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

| Redis<br />Software | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |
Expand Down
11 changes: 0 additions & 11 deletions content/commands/hset.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,6 @@ One or more field-value pairs to set in the hash.
6) "World"
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
HSET myhash field1 "Hello"
HGET myhash field1
HSET myhash field2 "Hi" field3 "World"
HGET myhash field2
HGET myhash field3
HGETALL myhash
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

| Redis<br />Software | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |
Expand Down
8 changes: 0 additions & 8 deletions content/commands/hvals.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,6 @@ redis> HVALS myhash
2) "World"
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
HSET myhash field1 "Hello"
HSET myhash field2 "World"
HVALS myhash
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

| Redis<br />Software | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |
Expand Down
8 changes: 0 additions & 8 deletions content/commands/incr.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,6 @@ The name of the key.
"11"
{{< /clients-example >}}

Give this command a try in the interactive console:

{{% redis-cli %}}
SET mykey "10"
INCR mykey
GET mykey
{{% /redis-cli %}}

## Details

### Pattern: counter
Expand Down
2 changes: 1 addition & 1 deletion content/commands/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ It can also take the following values:
When no parameter is provided, the `default` option is assumed.

{{< clients-example set="cmds_servermgmt" step="info" description="Foundational: Get server information and statistics using INFO (supports optional section filtering, returns key-value pairs)" difficulty="beginner" >}}
INFO
> INFO
{{< /clients-example >}}

## Optional arguments
Expand Down
8 changes: 0 additions & 8 deletions content/commands/keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,6 @@ To use pattern with a hash tag, see [Hash tags]({{< relref "operate/oss_and_stac
3) "firstname"
{{< /clients-example >}}

Give these commands a try in the interactive console:
{{% redis-cli %}}
MSET firstname Jack lastname Stuntman age 35
KEYS *name*
KEYS a??
KEYS *
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

| Redis<br />Software | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |
Expand Down
8 changes: 0 additions & 8 deletions content/commands/llen.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,6 @@ redis> LLEN mylist
(integer) 2
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
LPUSH mylist "World"
LPUSH mylist "Hello"
LLEN mylist
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

| Redis<br />Software | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |
Expand Down
9 changes: 0 additions & 9 deletions content/commands/lpop.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,6 @@ redis> LRANGE mylist 0 -1
2) "five"
{{< /clients-example>}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
RPUSH mylist "one" "two" "three" "four" "five"
LPOP mylist
LPOP mylist 2
LRANGE mylist 0 -1
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

| Redis<br />Software | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |
Expand Down
8 changes: 0 additions & 8 deletions content/commands/lpush.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,6 @@ redis> LRANGE mylist 0 -1
2) "world"
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
LPUSH mylist "world"
LPUSH mylist "hello"
LRANGE mylist 0 -1
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

| Redis<br />Software | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |
Expand Down
12 changes: 0 additions & 12 deletions content/commands/lrange.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,6 @@ redis> LRANGE mylist 5 10
(empty array)
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
RPUSH mylist "one"
RPUSH mylist "two"
RPUSH mylist "three"
LRANGE mylist 0 0
LRANGE mylist -3 2
LRANGE mylist -100 100
LRANGE mylist 5 10
{{% /redis-cli %}}

## Details

### Consistency with range functions in various programming languages
Expand Down
8 changes: 0 additions & 8 deletions content/commands/mget.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,6 @@ One or more keys whose values to retrieve.
3) (nil)
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
SET key1 "Hello"
SET key2 "World"
MGET key1 key2 nonexisting
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

| Redis<br />Software | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |
Expand Down
9 changes: 0 additions & 9 deletions content/commands/rpop.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,6 @@ redis> LRANGE mylist 0 -1
2) "two"
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
RPUSH mylist "one" "two" "three" "four" "five"
RPOP mylist
RPOP mylist 2
LRANGE mylist 0 -1
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

| Redis<br />Software | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |
Expand Down
8 changes: 0 additions & 8 deletions content/commands/rpush.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,6 @@ redis> LRANGE mylist 0 -1
2) "world"
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
RPUSH mylist "hello"
RPUSH mylist "world"
LRANGE mylist 0 -1
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

| Redis<br />Software | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |
Expand Down
8 changes: 0 additions & 8 deletions content/commands/sadd.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,6 @@ redis> SMEMBERS myset
2) "World"
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
SADD myset "Hello" "World"
SADD myset "World"
SMEMBERS myset
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

| Redis<br />Software | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |
Expand Down
Loading
Loading