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.
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.)
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).
> Also, is there a way to capture the mouse input?
This, AFAIK, only captures terminal output and timing.
> I tried to make a simple demo for one of my projects but my cursor highlighting didn't show up.
The cursor highlighting is a feature of the terminal, and is not part of the stream of text and terminal control codes that this tool captures, much like it won't capture the particular font or colors you may have configured. That said, some terminals allow mouse input, which is handed as control codes to the program connected to it. The program could use that to implement text marking.
Yes, this is read-only. I believe it's a nice example of how you can combine different unix tools together to achieve interesting result. It's not a scalable, reliable streaming solution. But we'll get there :)
For collaboration tmate/tmux or atom+teletype are definitely better options these days.
We have used tmux session sharing in the past over Vagrant share - none of us are on the same network. But I can’t say it is seemless. Tmate.io looks like a great solution.
Few months ago I was desperate for a tool that recorded the terminal and allowed me to save the animation as a GIF. While asciinema (at least at that time) didn’t have any straightforward way to do this, I looked elsewhere and found https://gifox.io and must admit have been very impressed with it.
Ignoring the terminal capture for a moment and focussing on the gif part: how does it compare to LICEcap? I haven't used it in a while but development seems to have resumed[0].
On Linux, there is also peek[1], and on Windows, there is ScreenToGif[2]. Both are open source.
Another option is to use screencasting software like OBS Studio[3] (and for Linux, I highly recommend SimpleScreenRecorder[4]) to get a high-quality video capture, then throwing it through gifski[5] to get really high quality GIFs.
Especially if you plan on uploading to a gif-site you might as well just capture video and upload that - they tend to do gif-conversion themselves these days.
There's no native support for Windows due to completely different way of terminal is implemented in Windows and Unix-like systems. But there are some options to have it working, see this thread: https://github.com/asciinema/asciinema/issues/150 (use a fork, or run asciinema in WSL bash).
Thanks for that one, very funny, hahaha. Sure you can try to invite our nice terminal-juggling mouse friend at some huge old heavy sweaty dusty elephant home and see if they play well along.
Short answer: a windows-friendly hackish branch exists. And original works if you're actually running asciinema in the port of Ubuntu that Microsoft ships with recent Win10. Does it satisfy any use case that you had in mind?
Best version ever! Love the use of @ for Leia's cinnamon rolls.
But I had thought it might be an actual ascii rendering, like people used to do for photos. Essentially, regard the tty screen as an 80*25 set of 'pixels'. Then pick the closest match ASCII character and foreground/background color for each 'pixel'.
It definitely loses something in a browser, as opposed to the days when you could watch it stream direct to your terminal via telnet to
towel.blinkenlghts.nl