计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
cli-demo-generator【效率与协作】Create terminal recordings and animated CLI demo GIFs from command workflows or VHS tape files.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Generate professional animated CLI demos with ease. This skill supports both automated generation from command descriptions and manual control for custom demos.
Trigger this skill when users request:
Use the auto_generate_demo.py script for quick, automated demo creation. This is the easiest and most common approach.
Basic Usage:
scripts/auto_generate_demo.py \
-c "npm install my-package" \
-c "npm run build" \
-o demo.gif
With Options:
scripts/auto_generate_demo.py \
-c "command1" \
-c "command2" \
-o output.gif \
--title "Installation Demo" \
--theme "Dracula" \
--width 1400 \
--height 700
Script Parameters:
-c, --command: Command to include (can be specified multiple times)-o, --output: Output GIF file path (required)--title: Demo title (optional, shown at start)--theme: VHS theme (default: Dracula)--font-size: Font size (default: 16)--width: Terminal width (default: 1400)--height: Terminal height (default: 700)--no-execute: Generate tape file only, don't execute VHSSmart Features:
Use batch_generate.py for creating multiple demos from a configuration file.
Configuration File (YAML):
demos:
- name: "Install Demo"
output: "install.gif"
title: "Installation"
theme: "Dracula"
commands:
- "npm install my-package"
- "npm run build"
- name: "Usage Demo"
output: "usage.gif"
commands:
- "my-package --help"
- "my-package run"
Usage:
scripts/batch_generate.py config.yaml --output-dir ./demos
When to Use Batch Generation:
Use record_interactive.sh for recording live terminal sessions.
Usage:
scripts/record_interactive.sh output.gif \
--theme "Dracula" \
--width 1400
Recording Process:
When to Use Interactive Recording:
For maximum control, create VHS tape files manually using templates.
Available Templates:
assets/templates/basic.tape - Simple command demoassets/templates/interactive.tape - Typing simulationExample Workflow:
cp assets/templates/basic.tape my-demo.tapevhs < my-demo.tapeConsult references/vhs_syntax.md for complete VHS syntax reference.
Use automated generation for quick results:
scripts/auto_generate_demo.py \
-c "echo 'Hello World'" \
-c "ls -la" \
-o hello-demo.gif \
--title "Hello Demo"
Create a batch configuration file and use batch generation:
demos-config.yaml with all demo definitionsscripts/batch_generate.py demos-config.yaml --output-dir ./outputUse interactive recording to capture real behavior:
scripts/record_interactive.sh my-workflow.gif
# Type commands naturally
# Ctrl+D when done
Create manual tape file with precise control:
--no-executevhs < custom-demo.tapeRefer to references/best_practices.md for comprehensive guidelines. Key recommendations:
Timing:
Sizing:
Themes:
Duration:
# macOS
brew install vhs
# Linux (via Go)
go install github.com/charmbracelet/vhs@latest
# macOS
brew install asciinema
# Linux
sudo apt install asciinema
Solutions:
Output demo.mp4Solutions:
--font-size 18--width 1600--theme "Dracula"User request: "Create a demo showing npm install"
scripts/auto_generate_demo.py \
-c "npm install my-package" \
-o install-demo.gif \
--title "Package Installation"
User request: "Create a demo showing project setup with git clone, install, and run"
scripts/auto_generate_demo.py \
-c "git clone https://github.com/user/repo.git" \
-c "cd repo" \
-c "npm install" \
-c "npm start" \
-o setup-demo.gif \
--title "Project Setup" \
--theme "Nord"
User request: "Generate demos for all my CLI tool features"
features-demos.yaml:demos:
- name: "Help Command"
output: "help.gif"
commands: ["my-tool --help"]
- name: "Init Command"
output: "init.gif"
commands: ["my-tool init", "ls -la"]
- name: "Run Command"
output: "run.gif"
commands: ["my-tool run --verbose"]
scripts/batch_generate.py features-demos.yaml --output-dir ./demos
User request: "Record me using my CLI tool interactively"
scripts/record_interactive.sh my-session.gif --theme "Tokyo Night"
# User types commands naturally
# Ctrl+D to finish
auto_generate_demo.py - Automated demo generation from command listsbatch_generate.py - Generate multiple demos from YAML/JSON configrecord_interactive.sh - Record and convert interactive terminal sessionsvhs_syntax.md - Complete VHS tape file syntax referencebest_practices.md - Demo creation guidelines and best practicestemplates/basic.tape - Basic command demo templatetemplates/interactive.tape - Interactive typing demo templateexamples/batch-config.yaml - Example batch configuration fileRequired:
Optional:
pip install pyyamlVHS supports multiple output formats:
Output demo.gif # GIF (default, best for documentation)
Output demo.mp4 # MP4 (better compression for long demos)
Output demo.webm # WebM (smaller file size)
Choose based on use case:
This skill provides three main approaches:
auto_generate_demo.py) - Quick, easy, smart defaultsbatch_generate.py) - Multiple demos, consistent settingsrecord_interactive.sh) - Live recording, real outputChoose the approach that best fits the user's needs. For most cases, automated generation is the fastest and most convenient option.