[asciinema] allows you to record and post a terminal session. It records the commands that you enter in a shell and the output the command produces. asciinema is already installed in the GitHub Codespaces image. You can also [install asciinema] on Linux/WSL/macOS.
There are two versions of asciinema. Version 2 was the first one installed in GitHub Codespaces. This has been replaced by Version 3, which works differently. First, verify which version you are running:
The following directions apply to version 3 only (not version 2).
asciinema is relatively straightforward to use. To start:
View the demo at [asciinema]. Once you are done, you will need to upload the file:
This will give you a URL to test in a browser, and possibly turn in as part of an assignment.
For GitHub Codespaces asciinema version 3 is already installed, but you may need to start a new codespace. For macOS, using brew install asciinema will install version 3.
For Linux/WSL, Ubuntu 24.04 does not provide a version 3 package of asciinema. The changes in version 3 are considered breaking changes. Best suggestion is to directly download and install the executable. The following assumes that you are on x86, adjust if you are on ARM.
Uninstall asciinema:
Download the executable into /usr/local/bin
Make it executable
Clear the bash cached command paths
Verify you now have version 3