Here's a quick tutorial how to use asciinema to record a cast of your terminal window so you can play it back in your terminal or embed it on a web page. This is great if you want to create tutorials or show how a product works.
Install it using brew on a Mac with
brew install asciinema
You can record and upload to asciinema.org by typing
asciinema rec, but if you want to record offline you can append an output file.
asciinema rec my.cast
To play back your recording in your terminal, simply run:
asciinema play my.cast
Embedding in a web page
Here's a quick demo of what a recording looks like when playing back.
And here's my lazy embedded HTML code to put it in this blog.
<link rel="stylesheet" type="text/css" href="https://medatech.github.io/asciinema-player.css" /> <asciinema-player src="https://medatech.github.io/demo.cast"></asciinema-player> <script src="https://medatech.github.io/asciinema-player.js"></script>