Skip to content

Commit b7a8604

Browse files
committed
docs: add VHS tape for cz commit interactive demo
1 parent 858386a commit b7a8604

File tree

2 files changed

+133
-0
lines changed

2 files changed

+133
-0
lines changed

docs/images/commit.gif

187 KB
Loading

docs/images/commit.tape

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# VHS documentation https://github.com/charmbracelet/vhs
2+
#
3+
# Output:
4+
# Output <path>.gif Create a GIF output at the given <path>
5+
6+
#
7+
# Settings:
8+
# Set FontSize <number> Set the font size of the terminal
9+
# Set FontFamily <string> Set the font family of the terminal
10+
# Set Height <number> Set the height of the terminal
11+
# Set Width <number> Set the width of the terminal
12+
# Set LetterSpacing <float> Set the letter spacing of the terminal
13+
# Set LineHeight <float> Set the line height of the terminal
14+
# Set Theme <json|string> Set the theme of the terminal
15+
# Set Padding <number> Set the padding of the terminal
16+
# Set TypingSpeed <time> Set the typing speed of the terminal
17+
18+
Output commit.gif
19+
20+
Require cz
21+
22+
# Use bash for cross-platform compatibility (macOS, Linux, Windows)
23+
Set Shell bash
24+
25+
Set FontSize 16
26+
Set Width 878
27+
Set Height 568
28+
Set Padding 20
29+
Set TypingSpeed 50ms
30+
31+
Set Theme {
32+
"name": "Commitizen",
33+
"black": "#232628",
34+
"red": "#fc4384",
35+
"green": "#b3e33b",
36+
"yellow": "#ffa727",
37+
"blue": "#75dff2",
38+
"magenta": "#ae89fe",
39+
"cyan": "#708387",
40+
"white": "#d5d5d0",
41+
"brightBlack": "#626566",
42+
"brightRed": "#ff7fac",
43+
"brightGreen": "#c8ed71",
44+
"brightYellow": "#ebdf86",
45+
"brightBlue": "#75dff2",
46+
"brightMagenta": "#ae89fe",
47+
"brightCyan": "#b1c6ca",
48+
"brightWhite": "#f9f9f4",
49+
"background": "#1e1e2e",
50+
"foreground": "#afafaf",
51+
"cursor": "#c7c7c7"
52+
}
53+
54+
# Hide initial shell prompt
55+
Hide
56+
57+
# Wait for terminal to be ready
58+
Sleep 1s
59+
60+
# Set a clean, simple prompt (while hidden)
61+
Type "PS1='$ '"
62+
Enter
63+
Sleep 300ms
64+
65+
# Create a clean temporary directory for recording
66+
Type "rm -rf /tmp/commitizen-demo && mkdir -p /tmp/commitizen-demo && cd /tmp/commitizen-demo"
67+
Enter
68+
Sleep 500ms
69+
70+
# Initialize git repository
71+
Type "git init"
72+
Enter
73+
Sleep 500ms
74+
75+
Type "git checkout -b awesome-feature"
76+
Enter
77+
Sleep 500ms
78+
79+
# Create a dummy file to commit
80+
Type "echo 'test content' > example.py"
81+
Enter
82+
Sleep 300ms
83+
84+
Type "git add example.py"
85+
Enter
86+
Sleep 300ms
87+
88+
# Clear the screen to start fresh
89+
Type "clear"
90+
Enter
91+
Sleep 500ms
92+
93+
# Show commands from here
94+
Show
95+
96+
# Now run cz commit
97+
Type "cz commit"
98+
Sleep 500ms
99+
Enter
100+
101+
# Wait for first prompt to appear
102+
Sleep 1s
103+
104+
# Question 1: Select the type of change (move down to "feat")
105+
Down
106+
Sleep 500ms
107+
Enter
108+
Sleep 1s
109+
110+
# Question 2: Scope (optional, skip)
111+
Enter
112+
Sleep 1s
113+
114+
# Question 3: Subject
115+
Type "awesome new feature"
116+
Sleep 500ms
117+
Enter
118+
Sleep 1s
119+
120+
# Question 4: Is this a BREAKING CHANGE? (No)
121+
Enter
122+
Sleep 1s
123+
124+
# Question 5: Body (optional, skip)
125+
Enter
126+
Sleep 1s
127+
128+
# Question 6: Footer (optional, skip)
129+
Enter
130+
Sleep 1s
131+
132+
# Wait for commit success message
133+
Sleep 2s

0 commit comments

Comments
 (0)