Use this workflow to generate a repeatable GIF for the README, GitHub release,
and PyPI project page. The goal is to show the real pythonlings first-run flow,
not a mocked terminal.
Use VHS. It records scripted terminal sessions and produces a GIF without manual screen capture.
brew install charmbracelet/tap/vhsFrom the repository root:
pip install -e ".[dev]"
scripts/generate_demo_gif.shTo use a specific VHS binary, set VHS_BIN:
VHS_BIN=/path/to/vhs scripts/generate_demo_gif.shIf Homebrew VHS fails on macOS with could not open ttyd and
ERR_CONNECTION_REFUSED, use a newer VHS build or run VHS through Docker. That
failure happens before Pythonlings starts.
The tape writes:
docs/assets/demos/pythonlings-demo.gif
Review the GIF before committing it. Keep the recording under 20 seconds so it loads quickly on GitHub and PyPI.
The scripted flow should stay focused on the first-time user path:
- Run
pythonlingswith no setup — it creates~/.pythonlingsand opens the first pending exercise (zero-config first run). - Show the first pending exercise in the coding screen.
- Open and close the local docs window with
F5andEsc. - Open the topic picker with
F4. - Quit with
Ctrl+Q. - Show topic progress with
pythonlings list. - Show a hint and official docs link with
pythonlings hint variables1.
If VHS cannot control the TUI reliably on a machine, record an asciinema cast
and render it with agg:
brew install asciinema agg
asciinema rec docs/assets/demos/pythonlings.cast
agg docs/assets/demos/pythonlings.cast docs/assets/demos/pythonlings-demo.gifThe VHS path is preferred because docs/demo.tape keeps the public demo
repeatable across releases.