Hacker News new | ask | show | jobs
by kichuku 3044 days ago
If the developer of asciinema is here, I just want to thank you for this amazing application. It is so useful and so easy to use. When I am learning something new in Linux, I research a lot and finally achieve something, only to forget how I did it a few months later. But with asciinema, I don't have this problem. I am able to record the stuff whenever I am doing anything new in Linux. Really glad to know about the 2.0 features especially that we don't lose the recording if it is interrupted.
3 comments

I'm here :) I'm very happy asciinema is useful to you!
Thank you very much, it is a vital tool for me too.
If you just want to record, you could also try the script command, which comes preinstalled with most Unices. Asciinema's file format is more convenient for sharing and other niceties, but you probably won't have it installed everywhere. If you want to automatically record all SSH sessions on your server, script is the tool of choice.

I've also used it to fool programs that refuse to go into interactive mode when their input is not a TTY, but that's more of an abuse of script's purpose.

I've used script to run shell aliases defined in .bashrc in a cronjob. Normally you would use bash -ic my_alias in crontab to run my_alias, but this gives a warning from bash:

bash: cannot set terminal process group (1661): Inappropriate ioctl for device bash: no job control in this shell

With script -qc 'bash -ic my_alias' /dev/null, the warning goes away! (Of course, the real solution would be to turn my_alias into a proper shell script, but this works in a pinch when you have old habits to abide by.)

Also see ttyrec:

http://0xcc.net/ttyrec/

I have been a big supporter of script command, infact i never understood the drive for asciinema and others like it written in various languages. I see asciinema as a dependency to be installed by users to record a session.
script was main inspiration for asciinema. I read its source code many times, and in the very first version it was used for recording. However on BSD based systems (and so on macOS) the shipped version of script doesn't support writing to a timing file, which pretty much killed it there.

Anyway, if you're only interested in replay inside a terminal, and you don't care about sharing the recordings on the web then reaching for script first is my recommendation. However, if we forget about the web part, there are still useful things for local workflow, like idle time optimization, pausing/stepping through recording and a single recording file instead of 2 (if you record timing info with script).

I've used asciinema extensively over the years on my blog and for demos, and am delighted it's still getting attention.

Thank you Marcin Kulik!