23 comments

[ 2.9 ms ] story [ 73.3 ms ] thread
This looks nice, but if there is a script anyway isn't making an animated GIF of it a relatively poor use of capabilities? Why not have a result that is able to go backward and forward (like a slideshow), the ability to pause/resume, or to copy/paste text from it.
https://asciinema.org/ can do this pretty well too.
If I'm not mistaken, asciinema covers only the second part of the article, i.e., recording. It can't do or control the actual demo.
Full demo can be recorded and edited to add/ remove parts. Also, there is a js player that can be used to provide video player like user interface.
An ASCII enema sounds very uncomfortable.
I'm sure the linked tools are awesome, but if I were trying to in some way stage a "live" demo, I'd first check Expect.
For live demos "its a live" [0] by @stavros is also great.

From the Readme:

It's a Live lets you write commands and keystrokes in a file, which it will then read and open a new terminal for you. Every time you press a key, It's a Live will write one character from the file into the terminal, making it look like you're typing every single command with the practiced ease of a consummate professional.

[0] https://gitlab.com/stavros/itsalive

Would be nice to have some realistic variations in typing speeds as well as realistic key sound affects too :)
Why not use the built in `script` program? https://man7.org/linux/man-pages/man1/script.1.html
How is it possible, that I've worked as a Linux sysadmin, backend engineer, security developer, and technical writer (regularly sharing CLI snippets in articles), and regularly document my CLI work on my blog, and I'm just learning about this.

Thank you for this comment lol

It's called "script" and it's default output file is called "typescript". Makes it pretty hard to Google for :)
script seems to require you to type the demo commands perfectly and at the right pace for the demo. That openssl command, for example. Contrast with this tool, where you can get the command right at your leisure then apply magic to look like it's being typed in interactively. The two steps (running commands, interactive typing with desired timing) are much easier to get right separately than together.
It can export timing data that you can tweak. Pretty manual, though it does work.
I've tried halfheartedly to learn to use `script` a few times, and each time I give up. Anybody know of a good tutorial on "why" and "how"?
I just record it with the OS screen recording tool.
Thanks for sharing! Good post, useful libs explained well.