ttyrec is a tiny terminal utility that does this on your terminal. It was released in 2000, it's one of those nice little gems one is glad to discover. It records and playbacks terminal sessions. The recorded files are in kb's. [1]
It's simple to use. 'ttyrec filename' starts recording, ctrl-c to stop recording. 'ttyplay filename' to playback.
Of course with asciinema.org, you get the benefit of an html player for the files, that you can link and playback on your own website.
This is something I have been fighting with in my head for quite a while. "Piping shit into sh" is not really great way to do it, I fully agree. Let me describe you the situation.
At the moment there are native packages for Ubuntu/Debian (ppa) and Fedora/CentOS (in core repo). There's also homebrew package and Arch Linux one (aur). There are 2 nice guys who maintain the first two packages, doing great job, but it always takes time until the packages are ready (we're all doing it in our spare time, and there's process, especially Fedora case, which you can't skip). I maintain Arch Linux one (while not using Arch for more than few years now) but this one's usually ready on the release day.
There are no packages for other distros, but we'll never be able to provide ones for all distros (unless we're very popular project with lots of contributors). That's fine.
But there are also situations like this: https://bugs.gentoo.org/show_bug.cgi?id=532918
Let's not get into "Go packaging" discussion again, but what you can see in the mentioned Gentoo thread there's always some problem (no vendoring is bad, vendoring is bad). Sure, these guys do this too in their spare time and they don't owe me anything.
But when seeing this I'm like "oh boy, packaging is hard, I don't have time for dealing with this". So time (or lack of thereof) is one thing. Next thing is: "apt-get install asciinema" or "brew install asciinema" is awesome because it uses your software package manager and it's a single command. For all other distros (and people wanting new version right now) you can curl/sh which is equally easy. "First download this script, then review it, then run it" is not that hard but most people wouldn't review the script anyway, and those who would are the ones who are doing that now anyway. curl/sh sucks on many fronts but I made sure the script doesn't get executed when partially downloaded and it's not "| sudo sh".
I'm thinking about using one of these services which auto-build deb/rpm, they host them as apt/yum repos etc. There are few of them out there so if anyone can point me to any "proven/reliable" one I'd appreciate that. Any suggestions on the topic are welcome!
I didn't use the build system heavily and it may be more overhead than you'd like but I thought it was a pretty neat way of doing things. Repo is here:
piping random shit into sh is wrong because domains go away, yet installation instructions might be repeated in countless other tutorials. easy to snap up domains and host malware.
and SSL has nothing to do with it. packages are not cryptographically signed either and once on the system can easily become root.
Would this be better if the pasted command included some checksum which was checked before piping into the `sh`? Can anyone who's better at bash than me give an example of how this could work in a relatively cross-platform way?
Sorry, can you explain why? If the checksum is provided (as part of the sh snippet) by the website with the SSL certificate, isn't that enough reassurance?
If the snippet and the download are on the same site, then whoever controls that site at the moment can provide an accurate checksum of whatever malware they want to host. A signature is an improvement because it can give you some confidence that the current controller is the same as the original controller.
But isn't that the behavior we want to encourage everyone to have? Most people will do the default: if the default is wrong, they don't care. If the default is right, they still don't care, but at least they're doing it right.
I think the bigger danger is that since you're instructing a direct pipe-to-sh over the network without regard to exit status, you're running the risk of executing truncated code that could trash your system state.
It's pretty rare for an app to need root privileges. You typically need root to write to the system dirs (/usr/* /bin etc). And in this particular case, the app has access (by design) to your terminal, so yeah, you need to trust the app a bit. But why would you need to demand all users of your system (even if that's just system users) also trust it?
Put it in ~/opt with xstow, and add ~/opt/bin to your path, ~/opt/man to your man-path, ~/opt/include, ~/opt/lib... to the various paths.
In this case, it seems like a lot of effort to get a tgz-archive just to download a single executable. I gather it's distributed as an archive in order for the Changelog, Readme and License to be available -- but as it's all downloaded from github anyway, it's hard to see why that really matters (rather than just have -h spit out a link or two).
As, if you're using a normal, full-featured web browser, there's no way of knowing if what you select, is what you copy and then paste -- it would probably be better to just link directly to the latest binary release for the various platforms (linux32, linux64, linux-arm, OSX 32bit, OSX 64bit) -- and let the user save the binary somewhere.
Limit the "command line instructions" to:
go get github.com/asciinema/asciinema
rather than fighting idiomatic go practices.
If you really want to be clever, why not just use 0install?
We evolved packaging systems for a reason - they provide a standardized way to manage dependencies, provide clean uninstalls, etc... Having a shellscript pooping files arbitrarily into the filesystem is so 90's.
Seriously - you pretty much just have to make a .dep and a .rpm and you're covered. Is that so hard?
I find the timing of this amusing—I was just, in putting the finishing touches on my own project <tty-player> which is basically <video> but with ttyrec scripts for src, writing down my analysis of all the different options there are out there, and I saw this entry up here just as I was writing about asciinema.
asciinema’s player has the distinction of being the only one I know of not based on term.js (https://github.com/chjj/term.js).
I've been using Asciinema and personally I love this product. I don't have to make my recordings for demos or presentations nor do I have to do live presentations, just pre-record and let everyone view it themselves while I present so they can follow along at their own pace.
Its been great as a teaching tool as well. We've been running it on our internal network but its always hilarious to see which people accidentally have it running so we get to see people do some really dumb shit during their terminal sessions.
When I see "previously" on HN, I tend to think "this was previously posted to HN." In this case, I thought the poster was indicating that asciinema.org was previously showterm.io - neither is the case.
Why does it have to be in the cloud? Can't you guys provide a player in html css whatever and the recording program to generate data files for the player so we can use your technology everywhere and are not tied to this website and its hosting policies?
I love script[1,2] for this sort of thing. Why wait for a video to play? Or host it on a third-party site? Having the entire session visible on a single, static page is less frustrating in most circumstances I encounter.
Having said that, Asciinema certainly looks like fun.
I was thinking the same thing... but then I realized it works, say, for an ed session, but not for a vi session. Of course, all that visual mode nonsense is just bloatware ;).
When I use an editor, I don't want eight extra KILOBYTES of worthless help screens and cursor positioning code! I just want an EDitor!! Not a "viitor". Not a "emacsitor". Those aren't even WORDS!!!! ED! ED! ED IS THE STANDARD!!!
This reminded me about the Dwarf Fortress Map Archive, where you can play back ASCII recordings through a flash player:
http://mkv25.net/dfma/browsemovies.php
Looks great. But I think quite a few people (the audience with which the recording would be shared) would like to see the entire session at once instead of watching the entire video. It would also be helpful for the writer to quickly verify if they missed something.
I quite like this service, used it a couple of months ago (http://steinn.org/post/brute-force-still-going-strong/) although I would love it if I could change my terminal dimensions (char width/height) after recording. That way I could make the terminal window fit the surrounding container on my blog.
That might be against the point of this project, but I really miss the possibility of an audio-overlay. I found the demo really stress- and unhelpfull, because you have to read rockey text while typed in absolute silence… brrr. I'd rather talk while typing and explain what I am doing and have that synched to the recorded text-session.
Wanted (or at least I wanted last time this came up): (Multiple) terminal streams in an OGG container (or similar) and integration in VLC/mplayer. Could make for nice precise output in addition to regular video instead of just having either the raw terminal or a video only screencast.
This is very cool. I'd love to adapt it to help members of my team collaborate and share workflows, but GPL makes it hard to integrate with any internal tooling.
I have used Asciinema couple of weeks now and I am very happy with it.
Our open source project contains a command line tool for Docker orchestration and Asciinema is a perfect solution to introduce its features and use cases (https://asciinema.org/~kontena).
Looking at a git diff is one thing, but seeing the commit as it was coded would introduce the dimension of time; giving you better context for how everything came together.
Add some interactive controls for slow-mo/fast-forward or scrubbing forward/back and you would have a powerful tool for learning & review.
some people like to watch a screencast video instead of reading through documentation. It's not a bad way to get introduced to a new language or framework, for example.
Another option for the common case of static output is to render command or script(1) outout directly to static html with something like http://www.pixelbeat.org/scripts/ansi2html.sh
I'm not sure why, but when viewing the recordings in full screen on my Galaxy S5 in landscape mode, a bottom portion of the cast is cut out. For example in the irssi/tmux cast, I don't see the commands typed below the status bar.
It's simple to use. 'ttyrec filename' starts recording, ctrl-c to stop recording. 'ttyplay filename' to playback.
Of course with asciinema.org, you get the benefit of an html player for the files, that you can link and playback on your own website.
[1]http://0xcc.net/ttyrec/index.html.en [2]http://manpages.ubuntu.com/manpages/maverick/man1/ttyrec.1.h...