Skip to content

Commit 858386a

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

File tree

2 files changed

+128
-0
lines changed

2 files changed

+128
-0
lines changed

docs/images/init.gif

98.4 KB
Loading

docs/images/init.tape

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
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 init.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
61+
Type "PS1='$ '"
62+
Enter
63+
Sleep 300ms
64+
65+
66+
# Create a clean temporary directory for recording
67+
Type "rm -rf /tmp/commitizen-example && mkdir -p /tmp/commitizen-example && cd /tmp/commitizen-example"
68+
Enter
69+
Sleep 500ms
70+
71+
# Clear the screen to start fresh
72+
Type "clear"
73+
Enter
74+
Sleep 500ms
75+
76+
# Show commands from here
77+
Show
78+
79+
# Now run cz init in the clean environment
80+
Type "cz init"
81+
Sleep 500ms
82+
Enter
83+
84+
# Wait for welcome message and first prompt
85+
Sleep 500ms
86+
Sleep 1s
87+
# Question 1: Please choose a supported config file
88+
# Default is .cz.toml, just press Enter
89+
Enter
90+
Sleep 1s
91+
92+
# Question 2: Please choose a cz (commit rule)
93+
# Default is cz_conventional_commits, just press Enter
94+
Enter
95+
Sleep 1s
96+
97+
# Question 3: Choose the source of the version
98+
# Default is "commitizen: Fetch and set version in commitizen config, just press Enter"
99+
Enter
100+
Sleep 1s
101+
102+
# Question 4: Choose version scheme
103+
# Default is semver, just press Enter
104+
Enter
105+
Sleep 1s
106+
107+
# Question 5: Please enter the correct version format
108+
# Default is "$version", just press Enter
109+
Enter
110+
Sleep 1s
111+
112+
# Question 6: Create changelog automatically on bump
113+
# Default is Yes, just press Enter
114+
Enter
115+
Sleep 1s
116+
117+
# Question 7: Keep major version zero (0.x) during breaking changes
118+
# Default is Yes, just press Enter
119+
Enter
120+
Sleep 1s
121+
122+
# Question 8: What types of pre-commit hook you want to install?
123+
# Default is [commit-msg], just press Enter to accept
124+
Enter
125+
Sleep 1s
126+
127+
# Wait for completion message
128+
Sleep 3s

0 commit comments

Comments
 (0)