DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 968,547 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Cover image for Let's try Asciinema
JΓ©rΓ΄me Dx
JΓ©rΓ΄me Dx

Posted on

Let's try Asciinema

Why Asciinema ?

Asciinema is a very simple tool to records a terminal session, this could be usefull to write an article or during a technical presentation, let's see how it works.

Installation

brew install asciinema

asciinema -h
# to see the available commands
Enter fullscreen mode Exit fullscreen mode

If you have the same problem than me, it will ask you to configure the locale, this can be fixed by this line in your .bashrc :

alias asciinema='LC_ALL=en_US.UTF-8 asciinema'
Enter fullscreen mode Exit fullscreen mode

Usage

asciinema rec
<< type the commands you want to record >>
Enter fullscreen mode Exit fullscreen mode

Then, simply type "Ctrl-d" to exit and "Enter" to save the file on https://asciinema.org/,

you juste have to type your email to have a free account.

There are several ways for integration :

asciinema share

I took the Embed image link option, for markdown,

you can hit "Make public" to allow public access :
asciicast

This is a link to access to the player, that allows to go forward or backward in the presentation, and to make copy/paste !

My feedback

Unfortunately if you want to have the player directly in the webpage, you have to make some html/css/js configuration on your page (so it's not possible on dev.to for instance, unless it's integrated, perhaps in the future).

There is also the tool asciicast2gif that allows to export to a gif file, so it can be integrated anywhere, but I don't think it's convenient, because you don't have the player, it's just a loop, and it takes time to process.

The link option is still a great option because it's easy to use, and can be integrated in any html or markdown document (directly in Dev.to or Google Slides for instance).

Asciinema works well, is pretty fast and can be used for some demos you want to do on terminal, feel free to try it too !

Top comments (0)

Update Your DEV Experience Level:

Settings

Go to your customization settings to nudge your home feed to show content more relevant to your developer experience level. πŸ›