Skip to content

Commit ef17252

Browse files
committed
Add demos
1 parent 25de030 commit ef17252

File tree

8 files changed

+157
-7
lines changed

8 files changed

+157
-7
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ go.work.sum
2727
*.tmp
2828
*.log
2929

30+
# Demo GIFs (hosted on vhs.charm.sh)
31+
demo/*.gif
32+

README.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@
22

33
A standalone Go binary that analyzes StackRox Sensor Prometheus metrics using declarative TOML rule files.
44

5-
![Made with VHS](https://vhs.charm.sh/vhs-33cWV6RkqrjaeabNAcxVmc.gif)
6-
75
<a href="https://vhs.charm.sh"><img src="https://stuff.charm.sh/vhs/badge.svg" alt="Made with VHS"></a>
86

7+
## 🎬 Demos
8+
9+
### Interactive TUI Mode
10+
![TUI Demo](https://vhs.charm.sh/vhs-33cWV6RkqrjaeabNAcxVmc.gif)
11+
12+
### CLI Mode (Console & Markdown)
13+
![CLI Demo](https://vhs.charm.sh/vhs-5slvsgOGnyRd7JsWNA7vMu.gif)
14+
915
## ✨ Features
1016

1117
- **🎮 Interactive TUI**: Beautiful terminal UI with keyboard navigation (powered by [Bubble Tea](https://github.com/charmbracelet/bubbletea))
@@ -116,17 +122,20 @@ go run testdata/compare_outputs.go /tmp/python-output.txt /tmp/go-report.md
116122

117123
## Recording Demos
118124

119-
This project uses [VHS](https://github.com/charmbracelet/vhs) for recording terminal demos:
125+
This project uses [VHS](https://github.com/charmbracelet/vhs) for recording terminal demos.
126+
See the [`demo/`](demo/) folder for scripts and instructions.
120127

121128
```bash
122129
# Install VHS
123130
brew install vhs
124131

125-
# Record the demo
126-
vhs demo.tape
132+
# Record demos
133+
cd demo
134+
vhs demo.tape # Full TUI demo
135+
vhs demo-cli.tape # CLI mode demo
127136

128-
# Or record the short version
129-
vhs demo-short.tape
137+
# Publish to charm servers
138+
vhs publish demo.gif
130139
```
131140

132141
## Dependencies

demo-short.gif

-849 KB
Binary file not shown.

demo.gif

-2.37 MB
Binary file not shown.

demo/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Demo Recordings
2+
3+
This folder contains [VHS](https://github.com/charmbracelet/vhs) scripts for recording terminal demos.
4+
5+
## Scripts
6+
7+
| File | Description | Output |
8+
|------|-------------|--------|
9+
| `demo.tape` | Full TUI demo (~45s) | [View on Charm](https://vhs.charm.sh/vhs-33cWV6RkqrjaeabNAcxVmc.gif) |
10+
| `demo-cli.tape` | CLI mode demo (~40s) | [View on Charm](https://vhs.charm.sh/vhs-5slvsgOGnyRd7JsWNA7vMu.gif) |
11+
| `demo-short.tape` | Short TUI preview (~15s) | - |
12+
13+
## Recording
14+
15+
```bash
16+
# Install VHS
17+
brew install vhs
18+
19+
# Record a demo (from project root)
20+
cd demo
21+
vhs demo.tape
22+
23+
# Publish to Charm servers
24+
vhs publish demo.gif
25+
```
26+
27+
## Notes
28+
29+
- GIF files are gitignored (hosted on vhs.charm.sh instead)
30+
- Edit `.tape` files to modify the demos
31+
- See [VHS documentation](https://github.com/charmbracelet/vhs) for syntax
32+

demo/demo-cli.tape

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# VHS Demo Script - CLI Mode (Console + Markdown)
2+
# Run with: vhs demo-cli.tape
3+
4+
Output demo-cli.gif
5+
Set FontSize 15
6+
Set Width 1400
7+
Set Height 900
8+
Set Theme "Dracula"
9+
Set Padding 20
10+
Set Framerate 24
11+
Set PlaybackSpeed 0.7
12+
Set WindowBar Colorful
13+
Set BorderRadius 8
14+
15+
# Title
16+
Type "# 📊 Sensor Metrics Analyzer - CLI Demo"
17+
Enter
18+
Sleep 1s
19+
Type "clear"
20+
Enter
21+
Sleep 300ms
22+
23+
# Show help
24+
Type "# First, let's see the available options"
25+
Enter
26+
Sleep 800ms
27+
Type "./bin/metrics-analyzer analyze --help"
28+
Enter
29+
Sleep 4s
30+
31+
Type "clear"
32+
Enter
33+
Sleep 300ms
34+
35+
# Console output (default)
36+
Type "# 🖥️ Console Output (default mode)"
37+
Enter
38+
Sleep 800ms
39+
Type "./bin/metrics-analyzer analyze --rules ./automated-rules ../metrics.txt"
40+
Enter
41+
Sleep 5s
42+
43+
Type "clear"
44+
Enter
45+
Sleep 300ms
46+
47+
# Generate markdown report
48+
Type "# 📝 Generate Markdown Report"
49+
Enter
50+
Sleep 800ms
51+
Type "./bin/metrics-analyzer analyze --format markdown --rules ./automated-rules --output report.md ../metrics.txt"
52+
Enter
53+
Sleep 3s
54+
55+
# Show the generated file
56+
Type "ls -la report.md"
57+
Enter
58+
Sleep 1.5s
59+
60+
# Display with bat
61+
Type "# 👀 View the report with syntax highlighting"
62+
Enter
63+
Sleep 800ms
64+
Type "bat report.md"
65+
Enter
66+
Sleep 6s
67+
68+
# Show just the summary section
69+
Type "clear"
70+
Enter
71+
Sleep 300ms
72+
Type "# 🔍 Quick peek at critical issues"
73+
Enter
74+
Sleep 800ms
75+
Type "bat report.md --line-range 1:50"
76+
Enter
77+
Sleep 5s
78+
79+
# Validate rules
80+
Type "clear"
81+
Enter
82+
Sleep 300ms
83+
Type "# ✅ Validate rule files"
84+
Enter
85+
Sleep 800ms
86+
Type "./bin/metrics-analyzer validate ./automated-rules"
87+
Enter
88+
Sleep 2s
89+
90+
# List rules
91+
Type "# 📋 List all available rules"
92+
Enter
93+
Sleep 800ms
94+
Type "./bin/metrics-analyzer list-rules ./automated-rules"
95+
Enter
96+
Sleep 4s
97+
98+
# Cleanup
99+
Type "rm report.md"
100+
Enter
101+
Sleep 500ms
102+
103+
Type "# ✨ That's the CLI mode!"
104+
Enter
105+
Sleep 2s
106+
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)