cli-demo-gif
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCLI Demo GIF Generator
CLI演示GIF生成工具
Prerequisites
前置要求
bash
brew install vhsbash
brew install vhsUsage
使用方法
1. Create tape file
1. 创建tape文件
Place in to keep root clean:
docs/demo/bash
mkdir -p docs/demo将文件放在目录下,保持根目录整洁:
docs/demo/bash
mkdir -p docs/demo2. Tape file structure
2. Tape文件结构
tape
undefinedtape
undefinedDescription comment
描述注释
Output docs/demo/demo.gif
Set Shell "bash"
Set FontSize 16
Set Width 900
Set Height 500
Set Padding 20
Set Theme "Catppuccin Mocha"
Set TypingSpeed 50ms
Output docs/demo/demo.gif
Set Shell "bash"
Set FontSize 16
Set Width 900
Set Height 500
Set Padding 20
Set Theme "Catppuccin Mocha"
Set TypingSpeed 50ms
Commands here
此处填写命令
Type "command --help"
Enter
Sleep 2s
undefinedType "command --help"
Enter
Sleep 2s
undefined3. For unpublished CLI packages
3. 针对未发布的CLI包
Use Hide/Show to set up aliases silently before the visible demo:
tape
undefined使用Hide/Show命令在可见演示前静默设置别名:
tape
undefinedSet up alias without showing it
静默设置别名,不显示过程
Hide
Type "alias mycli='bun run src/cli/index.ts'"
Enter
Sleep 500ms
Show
Hide
Type "alias mycli='bun run src/cli/index.ts'"
Enter
Sleep 500ms
Show
Now show the demo with clean commands
现在使用简洁的命令展示演示
Type "mycli --help"
Enter
Sleep 2s
undefinedType "mycli --help"
Enter
Sleep 2s
undefined4. Generate GIF
4. 生成GIF
bash
vhs docs/demo/cli.tapebash
vhs docs/demo/cli.tapeTape Commands Reference
Tape命令参考
| Command | Description |
|---|---|
| Output file path (.gif, .mp4, .webm) |
| Shell to use |
| Font size (16 recommended) |
| Terminal width in pixels |
| Terminal height in pixels |
| Padding around terminal |
| Color theme |
| Delay between keystrokes |
| Type text |
| Press enter |
| Wait (e.g., 2s, 500ms) |
| Stop recording |
| Resume recording |
| Send interrupt |
| 命令 | 描述 |
|---|---|
| 输出文件路径(.gif、.mp4、.webm) |
| 使用的Shell |
| 字体大小(推荐16) |
| 终端宽度(像素) |
| 终端高度(像素) |
| 终端内边距 |
| 配色主题 |
| 按键间隔时间 |
| 输入文本 |
| 按下回车键 |
| 等待(例如:2s、500ms) |
| 停止录制 |
| 恢复录制 |
| 发送中断信号 |
Recommended Themes
推荐主题
- - dark, modern
Catppuccin Mocha - - dark purple
Dracula - - dark blue
Tokyo Night - - dark
One Dark - - GitHub's dark theme
GitHub Dark
- - 深色、现代风格
Catppuccin Mocha - - 深紫色风格
Dracula - - 深蓝色风格
Tokyo Night - - 深色风格
One Dark - - GitHub深色主题
GitHub Dark
Tips
小贴士
- Keep GIFs under 1MB for fast loading
- Use generously so viewers can read output
Sleep - 50ms typing speed looks natural
- 900x500 works well for most CLIs
- Show 3-5 commands max per GIF
- 保持GIF文件大小在1MB以下,确保加载速度
- 合理使用命令,让观看者有时间阅读输出内容
Sleep - 50ms的输入速度看起来更自然
- 900x500的尺寸适用于大多数CLI工具
- 每个GIF最多展示3-5个命令