It is something I have watched from several sites and finally noticed a page that mentioned how was done.
So this is the tool: https://asciinema.org/
And this is an example I have recorded. I have just to create a HTML entry and copy the code.
$ python -m pip install asciinema $ asciinema rec /// or /// python -m asciiema rec asciinema: recording asciicast to /tmp/tmpvjba98p7-ascii.cast asciinema: press or type "exit" when you're done ... $ exit exit asciinema: recording finished asciinema: press to upload to asciinema.org, to save locally asciinema: asciicast saved to /tmp/tmphxkq5sp2-ascii.cast $ asciinema upload /tmp/tmphxkq5sp2-ascii.cast