Asciinema: Record and share your terminal sessions
65 comments
·July 25, 2025stevengoodwin
pi_22by7
Nice work on the game! The recording shows it off well. Good thinking using asciinema for this kind of thing.
I'd probably be the idiot who types pacman and wonders why it's trying to update my system instead of starting the game.
justusthane
Love it! The Pacman character animation is great.
wkjagt
Very cool! I'd love to see the code, if it's shareable.
kragen
I've found asciinema pretty cool and recorded a few recordings of things I've done, like some experimental Emacs commands, a computer algebra system, a Unicode Tetris game in ARM assembly, and a minimal roguelike: https://asciinema.org/~kragen. These are not the most spectacular recordings on the site, but I have found them a useful way to communicate ideas.
I wish there was some kind of voiceover support.
One thing to be aware of before you try it is that, if you make a recording without providing a filename for it, it uploads it by default to the web site, even if you haven't created an account yet, though it doesn't make it public. So maybe don't record anything you have a responsibility of confidentiality for, or patch out that feature.
homebrewer
Since 3.0 (Rust rewrite that is already shipped by Arch et al), the filename argument is required, and it simply saves it locally by default without even asking to upload.
upload is a separate command.
seansh
If you want voiceover and more you might wanna check out CodeMic.io.
kragen
That's not just proprietary, it's surveillance capitalism. "Subscribe for early access and monthly progress updates." You should be embarrassed for posting that kind of filth on a thread about asciinema, which is a free-software program that works offline and has strict privacy protections.
Also, codemic.io seems to be oriented toward full-motion video, so aside from the authoritarianism issues, it's not even related.
nostoneunturned
That is so shady.
junon
I can see why you think that but Asciinema's whole original purpose was to share quick recordings. IIRC you actually had to go out of your way to just save locally, as it's main advertised and very obvious functionality was that it was uploaded. They've since made things a little more flexible, but I don't perceive it as being shady. If you used it you were most likely after that functionality.
kragen
It's kind of justifiable in the sense that it's more convenient in the usual case. You say `asciinema rec`, do your thing, and then you have a secure URL to share with somebody, and you can make it public with a couple more clicks.
Actually I think this has changed, because when I tried this just now, it asked me
(s)ave locally, (u)pload to asciinema.org, (d)iscard
[s,u,d]? u
which is a little more friction but probably a safer default.Aurornis
It was developed as a tool for the website, not a general purpose screen recording tool.
The latest version has evolved to be more general purpose without assuming the upload.
minishlink
I'm using asciinema on the homepage of https://appzung.com What's also cool about it is that you can easily redact information that you would not want to expose, by simply editing the source text .cast file.
dmayle
I want to take just a second, not to talk about asciinema itself, but to use asciinema to talk about a project I just discovered recently called carbonyl.
It's a command line web-browser that uses a headless GUI browser (in this case chromium) in order to surf the web and render it to the terminal. brow.sh preceded it (powered by Firefox), but in my testing, carbonyl has much better web support.
In any case, here's a very brief demo: https://asciinema.org/a/HLHWeKE2s5bdyhUGQPBum49kx
It's so short because the bandwidth is high to use it, and asciinema.org rejects casts that are greater than 10MB
electroglyph
I have a really simple asciinema implementation at terminoid.com, it may work there. I haven't gotten around to finishing my work on it...
Roark66
I like the idea. I haven't used the tool, but what I'd love to (maybe it already does this) is to be able to take a recording and turn it into a text document showing what to run, what output to expect and so on.
Something that lets one turn a terminal recording into a document showing how to redo that thing without having to watch a video and no need to copy/paste between terminal and text editor, take screenshots and such.
Maybe this could be achieved by recording in a human readable file format and then running it via an LLM with right prompt.
Then I'd like it to record all the time.
I always have a bunch of tmux sessions running. I've set it up to save the history of all sessions, but obviously the history is one file. Something like this could resolve it nicely.
ku1ik
You can get a plain text log of a recorded session in several ways.
If you uploaded to asciinema server (e.g. asciinema.org) then you can click on Download and select txt format.
Or, with the CLI 3.0, you can either:
- convert existing cast file to plain text: asciinema convert demo.cast demo.txt
- record directly to plain text: asciinema rec demo.txt
alienbaby
ok, but can you take a recording and turn it into a text document showing what to run, what output to expect and so on.
IE: I think the person your replying to would like to have a tool that rebuilds a terminal session as a, for example, step by step guide. Not just grab it as a text file.
theraven
I’ve moved over to using vhs https://github.com/charmbracelet/vhs
eddieh
Looks cool, but produce GIFs? Asciinema is text based IIRC.
The name is the downside of Asciinema IMO. Can’t help but read it as ASCII enema, which is funny, but not what I want think about. Just call it tty-player or something…
ggaughan
vhs can also create video files: https://github.com/charmbracelet/vhs#output
justusthane
But the brilliant thing about Asciinema is that the output is just text (JavaScript). You can pause it and copy text from it if you need to, and the filesize is basically nil.
ethan_smith
VHS offers a declarative approach with .tape files that makes terminal demos reproducible and version-controllable, plus it generates GIFs without requiring a browser to view the recordings.
userbinator
Useful tool, but I can't help reading the name as "ASCII Enema" every time I see it.
teaearlgraycold
Either that or “ass cinema”.
junon
AsciiEnema: It even handles the most significant bits.
... I'll see myself out.
greazy
For a workshop I embedded gifs of cli tools in PowerPoint.
It was great. The PowerPoint acted as both notes for me and the trainees who could refer to them after the workshop finished.
Only issue is I prefer sharing pdf of slide deck but I couldn't workout how to export a pdf with gif and no idea if it's possible to embed a gif in a pdf
pi_22by7
This looks really useful for documentation. The text-based approach seems like a huge advantage over screen recordings. Being able to copy-paste commands from a "video" is brilliant. The privacy concern about auto-uploading is a bit concerning though, glad they added the prompt to choose local vs upload.
tambourine_man
I always read it “ASCII Cinema” in my mind, but that’s obviously not correct (they provide the IPA in the first paragraph)
xiconfjs
yes, but for me [1] it breaks new-lines which where there before in the terminal.
[1] Firefox 141 @ Ubuntu 22.04
fduran
At SadServers we use Asciinema to record some scenario sessions, this is how we did it: https://github.com/sadservers/sadservers?tab=readme-ov-file#... (we still have some issues to iron out on our side)
The author Marcin is a nice fellow and as a reminder asciinema development relies on donations and sponsorships https://github.com/sponsors/ku1ik
azemetre
Could anyone recommend any plugins that turn asciinema recordings to SVGs that are currently maintained?
I'm aware of this one, which seems to be the only one actively maintained from when I lasted looked:
https://github.com/MrMarble/termsvg
Hoping others have different recommendations.
What would be nice about transforming to SVG is low bandwidth and ease of use for static sites.
taoh
We use asciinema to record CLI tools terminals and add the recordings as svg to our README. We also use the recordings to replay as part of our CI. works great!
iib
How do you use the recordings as part of the CI?
taoh
We made a tool using termsvg: https://github.com/DeepGuide-Ai/dg. It'll use recorded sessions and execute the non-interactive sessions during CI.
null
kragen
That sounds cool! An animated SVG? How do you convert to SVG format?
kragen
Upon investigation, both dg and svg-term-cli output SVG with embedded CSS animation. So it's not that SVG supports animation per se. This also remodels my understanding of what CSS animation can do.
taoh
We use termsvg to convert cast to svg automatically. The tool is open source: https://github.com/DeepGuide-Ai/dg.
kragen
Thanks! I hadn't heard of it!
_ache_
svg-term-cli I think. I found a post talking about it not long ago.
This is a really nice, and very compact, way of demonstrating the terminal in action.
I used it to show off my 2002 version of ASCII pacman game, since no one's going to bother compiling it, and it'll eventually end up with bitrot.
You can see me playing it (really badly!) at https://asciinema.org/a/723703