Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Instructions on how to create an animated git of a shell session

How to produce an animated gif

Step 1: Record a terminal session

$ ttyrec myrecording.tty

Press Ctrl+d when finished.

Step 2: Convert .tty file to a series of gifs

Make sure that tty2gif is on your $PATH.

$ tty2gif typing myrecording.tty

Replays each keypress and takes a screenshot. Don't touch the terminal whilst this is running!

Step 3: Combine gifs into single file

$ convert -delay 10 -loop 0 step*.gif -delay 500 $(ls -1 step*.gif | tail -1) -layers Optimize final.gif

Step 4: Tidy up

Rename final.gif to something more meaningful. Remove all step*.gif files. Add link in README.md. Commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.