Skip to content

Commit 4f74ca9

Browse files
committed
feat: add VHS terminal recording demos
- Add VHS tape files for creating animated terminal demos - Create demos for quick-start, profile management, Enterprise, Cloud, and async operations - Add generation script to build all demos at once - Include quick-start GIF in main README - Add documentation for creating and customizing demos
1 parent 2abbd3f commit 4f74ca9

File tree

10 files changed

+794
-0
lines changed

10 files changed

+794
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
A unified command-line interface for managing Redis Cloud and Redis Enterprise deployments through their REST APIs.
99

10+
![Quick Start Demo](vhs/quick-start.gif)
11+
1012
## Features
1113

1214
- **Unified Interface** - Single CLI for both Redis Cloud and Redis Enterprise

vhs/README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# VHS Demo Recordings
2+
3+
This directory contains VHS tape files for creating animated terminal demonstrations of redisctl.
4+
5+
## Prerequisites
6+
7+
Install VHS and its dependencies:
8+
9+
```bash
10+
# macOS
11+
brew install vhs ffmpeg
12+
13+
# Linux
14+
# Install from https://github.com/charmbracelet/vhs/releases
15+
# Also need: ffmpeg and ttyd
16+
```
17+
18+
## Available Demos
19+
20+
- **quick-start.tape** - Basic introduction to redisctl
21+
- **profile-management.tape** - Managing authentication profiles
22+
- **enterprise-demo.tape** - Working with Redis Enterprise clusters
23+
- **cloud-demo.tape** - Managing Redis Cloud resources
24+
- **async-operations.tape** - Demonstration of async operation tracking
25+
26+
## Building the Demos
27+
28+
Build all demos:
29+
```bash
30+
./generate-demos.sh
31+
```
32+
33+
Build a specific demo:
34+
```bash
35+
vhs vhs/quick-start.tape
36+
```
37+
38+
## Recording Your Own Demo
39+
40+
Create a new tape file or record a session:
41+
42+
```bash
43+
# Record a new session
44+
vhs record > my-demo.tape
45+
46+
# Edit the tape file
47+
vim my-demo.tape
48+
49+
# Generate the GIF
50+
vhs my-demo.tape
51+
```
52+
53+
## Customization
54+
55+
Each tape file can be customized with:
56+
- Terminal dimensions (`Set Width`, `Set Height`)
57+
- Color themes (`Set Theme`)
58+
- Font size (`Set FontSize`)
59+
- Typing speed (`Set TypingSpeed`)
60+
- Output format (GIF, MP4, WebM)
61+
62+
See the [VHS documentation](https://github.com/charmbracelet/vhs) for all available options.
63+
64+
## Notes
65+
66+
- The demos use placeholder credentials and mock data
67+
- For real demonstrations, ensure sensitive data is not exposed
68+
- GIFs are not tracked in git (add to .gitignore)
69+
- Consider hosting GIFs on a CDN or GitHub releases for documentation

vhs/async-operations.tape

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# Async Operations Demo - Tracking long-running operations
2+
3+
Output vhs/async-operations.gif
4+
Set FontSize 16
5+
Set Width 1200
6+
Set Height 700
7+
Set Theme "Monokai Pro"
8+
Set Padding 20
9+
Set TypingSpeed 40ms
10+
Set LineHeight 1.3
11+
12+
Hide
13+
Type "clear"
14+
Enter
15+
Show
16+
17+
Type "# Async Operations with redisctl"
18+
Enter
19+
Sleep 1s
20+
Enter
21+
22+
Type "# All create/update/delete operations support --wait flags"
23+
Enter
24+
Sleep 1s
25+
Enter
26+
27+
Type "# Create a database and wait for completion"
28+
Enter
29+
Type 'redisctl cloud database create --subscription-id 12345 \\'
30+
Enter
31+
Type ' --data \'{"name":"production-cache","memoryLimitInGb":2}\' \\'
32+
Enter
33+
Type ' --wait'
34+
Enter
35+
Sleep 500ms
36+
Type "# ⣾ Creating database..."
37+
Sleep 500ms
38+
Backspace 25
39+
Type "# ⣽ Creating database..."
40+
Sleep 500ms
41+
Backspace 25
42+
Type "# ⣻ Creating database..."
43+
Sleep 500ms
44+
Backspace 25
45+
Type "# ⢿ Creating database..."
46+
Sleep 500ms
47+
Backspace 25
48+
Type "# ✓ Database created successfully (task_id: 8e7f2a3b)"
49+
Enter
50+
Sleep 2s
51+
Enter
52+
53+
Type "# Custom timeout and polling interval"
54+
Enter
55+
Type 'redisctl enterprise database update 1 \\'
56+
Enter
57+
Type ' --data \'{"memory_size":2147483648}\' \\'
58+
Enter
59+
Type ' --wait --wait-timeout 600 --wait-interval 5'
60+
Enter
61+
Sleep 500ms
62+
Type "# ⠙ Updating database (checking every 5s)..."
63+
Sleep 500ms
64+
Backspace 45
65+
Type "# ⠹ Updating database (checking every 5s)..."
66+
Sleep 500ms
67+
Backspace 45
68+
Type "# ✓ Database updated successfully"
69+
Enter
70+
Sleep 2s
71+
Enter
72+
73+
Type "# Delete with confirmation and progress tracking"
74+
Enter
75+
Type "redisctl cloud database delete 12345:67890 --wait"
76+
Enter
77+
Sleep 500ms
78+
Type "# ⠋ Deleting database..."
79+
Sleep 500ms
80+
Backspace 24
81+
Type "# ⠙ Deleting database..."
82+
Sleep 500ms
83+
Backspace 24
84+
Type "# ✓ Database deleted successfully"
85+
Enter
86+
Sleep 2s
87+
Enter
88+
89+
Type "# Network connectivity operations also support async"
90+
Enter
91+
Type 'redisctl cloud peering create --subscription-id 12345 \\'
92+
Enter
93+
Type ' --data \'{"provider":"AWS","region":"us-east-1"}\' \\'
94+
Enter
95+
Type ' --wait'
96+
Enter
97+
Sleep 500ms
98+
Type "# ⠸ Creating VPC peering connection..."
99+
Sleep 500ms
100+
Backspace 39
101+
Type "# ⠼ Creating VPC peering connection..."
102+
Sleep 500ms
103+
Backspace 39
104+
Type "# ✓ VPC peering created (id: vpc-12345)"
105+
Enter
106+
Sleep 2s
107+
Enter
108+
109+
Type "# Backup operations with progress"
110+
Enter
111+
Type 'redisctl enterprise database backup 1 \\'
112+
Enter
113+
Type ' --location "s3://backups/redis/" \\'
114+
Enter
115+
Type ' --wait'
116+
Enter
117+
Sleep 500ms
118+
Type "# ⠴ Creating backup..."
119+
Sleep 500ms
120+
Backspace 21
121+
Type "# ⠦ Creating backup..."
122+
Sleep 500ms
123+
Backspace 21
124+
Type "# ✓ Backup completed successfully"
125+
Enter
126+
Sleep 2s
127+
128+
Hide
129+
Type "clear"
130+
Enter
131+
Show
132+
133+
Sleep 500ms

vhs/cloud-demo.tape

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Redis Cloud Demo - Managing Redis Cloud resources
2+
3+
Output vhs/cloud-demo.gif
4+
Set FontSize 16
5+
Set Width 1200
6+
Set Height 700
7+
Set Theme "Tokyo Night"
8+
Set Padding 20
9+
Set TypingSpeed 40ms
10+
Set LineHeight 1.3
11+
12+
Hide
13+
Type "clear"
14+
Enter
15+
Type "# Using mock API credentials for demo"
16+
Enter
17+
Type "export REDIS_CLOUD_API_KEY='demo-key-123'"
18+
Enter
19+
Type "export REDIS_CLOUD_SECRET_KEY='demo-secret-456'"
20+
Enter
21+
Type "clear"
22+
Enter
23+
Show
24+
25+
Type "# Redis Cloud Management with redisctl"
26+
Enter
27+
Sleep 1s
28+
Enter
29+
30+
Type "# List available cloud regions"
31+
Enter
32+
Type "redisctl cloud region list -o table | head -15"
33+
Enter
34+
Sleep 2.5s
35+
Enter
36+
37+
Type "# List subscriptions"
38+
Enter
39+
Type "redisctl cloud subscription list -o table"
40+
Enter
41+
Sleep 2s
42+
Enter
43+
44+
Type "# Get subscription details with JMESPath filtering"
45+
Enter
46+
Type "redisctl cloud subscription get 12345 -o json -q '{name:name, status:status}'"
47+
Enter
48+
Sleep 2s
49+
Enter
50+
51+
Type "# List databases in a subscription"
52+
Enter
53+
Type "redisctl cloud database list --subscription-id 12345 -o table"
54+
Enter
55+
Sleep 2s
56+
Enter
57+
58+
Type "# Create a new database with async tracking"
59+
Enter
60+
Type 'redisctl cloud database create --subscription-id 12345 \\'
61+
Enter
62+
Type ' --data \'{"name":"api-cache","memoryLimitInGb":1,"datasetSizeInGb":1}\' \\'
63+
Enter
64+
Type ' --wait --wait-timeout 300'
65+
Enter
66+
Sleep 3s
67+
Enter
68+
69+
Type "# List cloud accounts"
70+
Enter
71+
Type "redisctl cloud account list -o table"
72+
Enter
73+
Sleep 2s
74+
Enter
75+
76+
Type "# Get payment methods"
77+
Enter
78+
Type "redisctl cloud payment-method list -o json -q '[0].cardType'"
79+
Enter
80+
Sleep 2s
81+
Enter
82+
83+
Type "# Direct API access for custom queries"
84+
Enter
85+
Type "redisctl api cloud get /subscriptions -q 'subscriptions[0].name'"
86+
Enter
87+
Sleep 2s
88+
89+
Hide
90+
Type "clear"
91+
Enter
92+
Show
93+
94+
Sleep 500ms

0 commit comments

Comments
 (0)