Record your terminal window using asciinema

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.

Installation

Install it using brew on a Mac with brew install asciinema

Recording

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

Playing back

To play back your recording in your terminal, simply run:

asciinema play my.cast

Embedding in a web page

If you want to self host, then there is a standalone web player. You can download the JavaScript and CSS from the releases page:

asciinema/asciinema-player
Web player for terminal session recordings ⏩. Contribute to asciinema/asciinema-player development by creating an account on GitHub.

Demonstration

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>