Skip to content

Commit 25de030

Browse files
committed
Add demo gifs
1 parent f95861c commit 25de030

5 files changed

Lines changed: 216 additions & 6 deletions

File tree

README.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
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+
7+
<a href="https://vhs.charm.sh"><img src="https://stuff.charm.sh/vhs/badge.svg" alt="Made with VHS"></a>
8+
59
## ✨ Features
610

711
- **🎮 Interactive TUI**: Beautiful terminal UI with keyboard navigation (powered by [Bubble Tea](https://github.com/charmbracelet/bubbletea))
@@ -19,11 +23,13 @@ make build
1923

2024
## Usage
2125

26+
> ⚠️ **Note:** Flags must come BEFORE the metrics file!
27+
2228
### Interactive TUI Mode (Recommended)
2329

2430
```bash
2531
# Launch interactive terminal UI
26-
./bin/metrics-analyzer analyze metrics.txt --format tui
32+
./bin/metrics-analyzer analyze --format tui --rules ./automated-rules metrics.txt
2733
```
2834

2935
**TUI Features:**
@@ -40,16 +46,16 @@ make build
4046
./bin/metrics-analyzer analyze metrics.txt
4147

4248
# Analyze with custom rules directory
43-
./bin/metrics-analyzer analyze metrics.txt --rules ./automated-rules
49+
./bin/metrics-analyzer analyze --rules ./automated-rules metrics.txt
4450

4551
# Generate markdown report
46-
./bin/metrics-analyzer analyze metrics.txt --format markdown --output report.md
52+
./bin/metrics-analyzer analyze --format markdown --output report.md metrics.txt
4753

4854
# Override load level
49-
./bin/metrics-analyzer analyze metrics.txt --load-level high
55+
./bin/metrics-analyzer analyze --load-level high metrics.txt
5056

5157
# Specify ACS version
52-
./bin/metrics-analyzer analyze metrics.txt --acs-version 4.8
58+
./bin/metrics-analyzer analyze --acs-version 4.8 metrics.txt
5359
```
5460

5561
### Utility Commands
@@ -104,10 +110,25 @@ make test
104110

105111
# Integration test (compare with Python output)
106112
python3 analyze_metrics_full.py metrics.txt > /tmp/python-output.txt
107-
./bin/metrics-analyzer analyze metrics.txt --format markdown --output /tmp/go-report.md
113+
./bin/metrics-analyzer analyze --format markdown --output /tmp/go-report.md metrics.txt
108114
go run testdata/compare_outputs.go /tmp/python-output.txt /tmp/go-report.md
109115
```
110116

117+
## Recording Demos
118+
119+
This project uses [VHS](https://github.com/charmbracelet/vhs) for recording terminal demos:
120+
121+
```bash
122+
# Install VHS
123+
brew install vhs
124+
125+
# Record the demo
126+
vhs demo.tape
127+
128+
# Or record the short version
129+
vhs demo-short.tape
130+
```
131+
111132
## Dependencies
112133

113134
Built with:

demo-short.gif

849 KB
Loading

demo-short.tape

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# VHS Demo Script - Short Version (for README badge/preview)
2+
# Run with: vhs demo-short.tape
3+
4+
Output demo-short.gif
5+
Set FontSize 18
6+
Set Width 1200
7+
Set Height 700
8+
Set Theme "Dracula"
9+
Set Padding 15
10+
Set Framerate 24
11+
Set PlaybackSpeed 1.0
12+
Set WindowBar Colorful
13+
Set BorderRadius 8
14+
15+
# Launch TUI directly
16+
Type "./bin/metrics-analyzer analyze --format tui --rules ./automated-rules ../metrics.txt"
17+
Enter
18+
Sleep 2s
19+
20+
# Quick navigation
21+
Down Sleep 300ms
22+
Down Sleep 300ms
23+
Down Sleep 300ms
24+
25+
# View details
26+
Enter
27+
Sleep 2s
28+
29+
# Back and filter
30+
Escape
31+
Sleep 500ms
32+
Type "2"
33+
Sleep 1.5s
34+
35+
# Search
36+
Type "/"
37+
Type "heap"
38+
Enter
39+
Sleep 1.5s
40+
41+
# Help
42+
Type "?"
43+
Sleep 2s
44+
45+
# Quit
46+
Escape
47+
Sleep 300ms
48+
Type "q"
49+

demo.gif

2.37 MB
Loading

demo.tape

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
# VHS Demo Script for Sensor Metrics Analyzer
2+
# Run with: vhs demo.tape
3+
4+
# Output settings
5+
Output demo.gif
6+
Set FontSize 16
7+
Set Width 1400
8+
Set Height 900
9+
Set Theme "Dracula"
10+
Set Padding 20
11+
Set Framerate 30
12+
Set PlaybackSpeed 0.8
13+
14+
# Window chrome for professional look
15+
Set WindowBar Colorful
16+
Set WindowBarSize 40
17+
Set BorderRadius 8
18+
19+
# Start in the project directory
20+
Type "cd sensor-metrics-analyzer-go"
21+
Enter
22+
Sleep 500ms
23+
24+
# Show the help first
25+
Type "# 🔍 Sensor Metrics Analyzer - TUI Demo"
26+
Enter
27+
Sleep 1s
28+
Type "clear"
29+
Enter
30+
Sleep 300ms
31+
32+
# Launch TUI
33+
Type "./bin/metrics-analyzer analyze --format tui --rules ./automated-rules ../metrics.txt"
34+
Sleep 500ms
35+
Enter
36+
Sleep 3s
37+
38+
# Navigate down through results
39+
Down
40+
Sleep 400ms
41+
Down
42+
Sleep 400ms
43+
Down
44+
Sleep 400ms
45+
Down
46+
Sleep 400ms
47+
Down
48+
Sleep 400ms
49+
50+
# View details of selected metric
51+
Enter
52+
Sleep 2.5s
53+
54+
# Navigate to next metric in detail view
55+
Down
56+
Sleep 1.5s
57+
58+
# Go back to list
59+
Escape
60+
Sleep 1s
61+
62+
# Filter by RED status (key 2)
63+
Type "2"
64+
Sleep 2s
65+
66+
# Filter by YELLOW status (key 3)
67+
Type "3"
68+
Sleep 2s
69+
70+
# Filter by GREEN status (key 4)
71+
Type "4"
72+
Sleep 2s
73+
74+
# Back to ALL (key 1)
75+
Type "1"
76+
Sleep 1.5s
77+
78+
# Use search feature
79+
Type "/"
80+
Sleep 500ms
81+
Type "cpu"
82+
Sleep 1s
83+
Enter
84+
Sleep 2s
85+
86+
# Clear search with Escape
87+
Escape
88+
Sleep 1s
89+
90+
# Search for another term
91+
Type "/"
92+
Sleep 300ms
93+
Type "buffer"
94+
Sleep 800ms
95+
Enter
96+
Sleep 2s
97+
98+
# View detail of search result
99+
Enter
100+
Sleep 2.5s
101+
102+
# Go back
103+
Escape
104+
Sleep 1s
105+
106+
# Clear filter
107+
Escape
108+
Sleep 1s
109+
110+
# Show help screen
111+
Type "?"
112+
Sleep 3s
113+
114+
# Exit help
115+
Escape
116+
Sleep 1s
117+
118+
# Final navigation showcase - fast scrolling
119+
Down Down Down Down Down
120+
Sleep 500ms
121+
Up Up Up Up Up
122+
Sleep 500ms
123+
124+
# Go to bottom
125+
Type "G"
126+
Sleep 1s
127+
128+
# Go to top
129+
Type "g"
130+
Sleep 1s
131+
132+
# Quit the application
133+
Type "q"
134+
Sleep 1s
135+
136+
# Show final message
137+
Type "# ✨ That's the Sensor Metrics Analyzer TUI!"
138+
Enter
139+
Sleep 2s
140+

0 commit comments

Comments
 (0)