News for hackers. Stuff that matters.
Re:Asciinema: Record and share your terminal sessions by taoh on Friday July 25, 2025 @12:27AM (#44679581)
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!
Re:Asciinema: Record and share your terminal sessions by iib on Friday July 25, 2025 @12:34AM (#44679613)
How do you use the recordings as part of the CI?
Re:Asciinema: Record and share your terminal sessions by taoh on Friday July 25, 2025 @02:06AM (#44680057)
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.
Re:Asciinema: Record and share your terminal sessions by kragen on Friday July 25, 2025 @12:45AM (#44679664)
That sounds cool! An animated SVG? How do you convert to SVG format?
Re:Asciinema: Record and share your terminal sessions by taoh on Friday July 25, 2025 @02:07AM (#44680063)
We use termsvg to convert cast to svg automatically. The tool is open source: https://github.com/DeepGuide-Ai/dg.
Re:Asciinema: Record and share your terminal sessions by kragen on Friday July 25, 2025 @02:44AM (#44680293)
Thanks! I hadn't heard of it!
Re:Asciinema: Record and share your terminal sessions by _ache_ on Friday July 25, 2025 @01:11AM (#44679759)
svg-term-cli I think. I found a post talking about it not long ago.

https://github.com/marionebl/svg-term-cli

Re:Asciinema: Record and share your terminal sessions by kragen on Friday July 25, 2025 @08:47PM (#44690285)
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.
Re:Asciinema: Record and share your terminal sessions by meowface on Friday July 25, 2025 @12:33AM (#44679606)
I wish it supported easy export to MP4.
Re:Asciinema: Record and share your terminal sessions by taoh on Friday July 25, 2025 @02:09AM (#44680076)
It should be pretty easy to export to MP4, but using SVG will be lighter and faster, which is why we created the dg tool to automatically export to SVG. Please see my previous comments if interested
Re:Asciinema: Record and share your terminal sessions by jasonjmcghee on Friday July 25, 2025 @02:09AM (#44680084)
You can do it in two commands, but not ideal to need gif as stopgap.

    agg demo.cast demo.gif
    ffmpeg -i demo.gif demo.mp4
Re:Asciinema: Record and share your terminal sessions by kragen on Friday July 25, 2025 @12:50AM (#44679680)
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.

Re:Asciinema: Record and share your terminal sessions by homebrewer on Friday July 25, 2025 @03:54AM (#44680746)
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.

Re:Asciinema: Record and share your terminal sessions by nostoneunturned on Friday July 25, 2025 @01:27AM (#44679841)
That is so shady.
Re:Asciinema: Record and share your terminal sessions by kragen on Friday July 25, 2025 @02:43AM (#44680288)
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.
Re:Asciinema: Record and share your terminal sessions by junon on Friday July 25, 2025 @05:10AM (#44681182)
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.
Re:Asciinema: Record and share your terminal sessions by Aurornis on Friday July 25, 2025 @11:33AM (#44684322)
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.

Re:Asciinema: Record and share your terminal sessions by seansh on Friday July 25, 2025 @04:43AM (#44681048)
If you want voiceover and more you might wanna check out CodeMic.io.
Re:Asciinema: Record and share your terminal sessions by kragen on Friday July 25, 2025 @05:18PM (#44688595)
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.

Re:Asciinema: Record and share your terminal sessions by seansh on Wednesday July 30, 2025 @02:10AM (#44731282)
I think you're misunderstanding what it does. It's not sending your data to the cloud. It just lets you record a session when you press record. Also it's opensource too.

https://github.com/computing-den/CodeMic

Re:Asciinema: Record and share your terminal sessions by kragen on Wednesday July 30, 2025 @10:36AM (#44734803)
Hmm, maybe I jumped to the wrong conclusion. Is it like a delayed open-source release thing, like "sponsors get access to new releases before the open-source release"? I'm trying to understand how "subscribe for early access" coexists with "it's opensource".
Re:Asciinema: Record and share your terminal sessions by theraven on Friday July 25, 2025 @12:54AM (#44679689)
I’ve moved over to using vhs https://github.com/charmbracelet/vhs
Re:Asciinema: Record and share your terminal sessions by eddieh on Friday July 25, 2025 @01:37AM (#44679903)
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…

Re:Asciinema: Record and share your terminal sessions by hamandcheese on Friday July 25, 2025 @02:10AM (#44680089)
Did someone say titty player?
Re:Asciinema: Record and share your terminal sessions by eddieh on Friday July 25, 2025 @03:03AM (#44680416)
Touché.
Re:Asciinema: Record and share your terminal sessions by ggaughan on Friday July 25, 2025 @04:25AM (#44680939)
vhs can also create video files: https://github.com/charmbracelet/vhs#output
Re:Asciinema: Record and share your terminal sessions by justusthane on Friday July 25, 2025 @09:05AM (#44682696)
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.
Re:Asciinema: Record and share your terminal sessions by ethan_smith on Friday July 25, 2025 @10:00AM (#44683220)
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.
Re:Asciinema: Record and share your terminal sessions by Shadowmist on Friday July 25, 2025 @01:14AM (#44679772)
| tr : " "
Re:Asciinema: Record and share your terminal sessions by userbinator on Friday July 25, 2025 @01:39AM (#44679910)
Useful tool, but I can't help reading the name as "ASCII Enema" every time I see it.
Re:Asciinema: Record and share your terminal sessions by teaearlgraycold on Friday July 25, 2025 @04:20AM (#44680904)
Either that or “ass cinema”.
Re:Asciinema: Record and share your terminal sessions by junon on Friday July 25, 2025 @05:13AM (#44681194)
AsciiEnema: It even handles the most significant bits.

... I'll see myself out.

Re:Asciinema: Record and share your terminal sessions by kstonekuan on Friday July 25, 2025 @01:51AM (#44679972)
Cool, wonder if this could be used to record agentic cli sessions like claude code and gemini cli
Re:Asciinema: Record and share your terminal sessions by scottyeager on Friday July 25, 2025 @02:42AM (#44680274)
Yes.
Re:Asciinema: Record and share your terminal sessions by eviks on Friday July 25, 2025 @01:51AM (#44679974)
How is this better than basic linear scrollable text? You don't have to waste time waiting for letters to appear at a pace slower than your reading speed. You don't worry about missing a moment and then trying to rewind with the imprecise controls (and you can't use text search to instantly find the word you remember) of broken full-screen button like it's on this website when viewed on a smartphone
Re:Asciinema: Record and share your terminal sessions by jasonjmcghee on Friday July 25, 2025 @02:05AM (#44680049)
I generally see it used to demo a TUI, to great effect.
Re:Asciinema: Record and share your terminal sessions by eviks on Friday July 25, 2025 @02:09AM (#44680085)
Good point, I mostly remember the cli sequences as shown in the demo (which are only better than the gif alternative). The TUI version should be their primary demo!
Re:Asciinema: Record and share your terminal sessions by WouterSpaak on Friday July 25, 2025 @02:59AM (#44680388)
I fully agree, this would be pretty much impossible to demo with just plain text: https://asciinema.org/a/659042
Re:Asciinema: Record and share your terminal sessions by yjftsjthsd-h on Friday July 25, 2025 @02:06AM (#44680054)
I assume this plays nice with tuis? Ex. you can use this to record vim, which scrollback doesn't do
Re:Asciinema: Record and share your terminal sessions by stevengoodwin on Friday July 25, 2025 @02:23AM (#44680156)
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

Re:Asciinema: Record and share your terminal sessions by pi_22by7 on Friday July 25, 2025 @03:04AM (#44680419)
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.

Re:Asciinema: Record and share your terminal sessions by justusthane on Friday July 25, 2025 @09:03AM (#44682676)
Love it! The Pacman character animation is great.
Re:Asciinema: Record and share your terminal sessions by wkjagt on Friday July 25, 2025 @12:06PM (#44684779)
Very cool! I'd love to see the code, if it's shareable.
Re:Asciinema: Record and share your terminal sessions by bytejanitor on Friday July 25, 2025 @02:39AM (#44680252)
The upload "feature" is very dangerous.
Re:Asciinema: Record and share your terminal sessions by ku1ik on Friday July 25, 2025 @09:28AM (#44682910)
This has been changed. In 2.4 there’s explicit prompt for save/upload/discard. Since 3.0 there’s no auto upload in any form - you always record to a file, and to upload you need to explicitly run `asciinema upload filename`.
Re:Asciinema: Record and share your terminal sessions by benterix on Friday July 25, 2025 @02:52AM (#44680348)
The best use case for me is as explained here: https://koaning.io/posts/svg-gifs/
Re:Asciinema: Record and share your terminal sessions by pi_22by7 on Friday July 25, 2025 @02:57AM (#44680379)
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.
Re:Asciinema: Record and share your terminal sessions by xiconfjs on Friday July 25, 2025 @05:47AM (#44681381)
yes, but for me [1] it breaks new-lines which where there before in the terminal.

[1] Firefox 141 @ Ubuntu 22.04

Re:Asciinema: Record and share your terminal sessions by tambourine_man on Friday July 25, 2025 @09:48AM (#44683092)
I always read it “ASCII Cinema” in my mind, but that’s obviously not correct (they provide the IPA in the first paragraph)
Re:Asciinema: Record and share your terminal sessions by stevenjgarner on Friday July 25, 2025 @04:37AM (#44681000)
I am curious about the use cases where a VIDEO recording is inherently more useful than a TEXT recording of a terminal session. I have found simply using:

script session.log

... to be invaluable, especially when documenting commands that will be finding their way into a bash script or when I am collaborating with another person who will always have script available in their terminal but may have restrictions on being able to install asciinema.

Re:Asciinema: Record and share your terminal sessions by justusthane on Friday July 25, 2025 @09:17AM (#44682813)
Demoing TUIs
Re:Asciinema: Record and share your terminal sessions by Roark66 on Friday July 25, 2025 @05:59AM (#44681461)
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.

Re:Asciinema: Record and share your terminal sessions by ku1ik on Friday July 25, 2025 @09:22AM (#44682864)
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

Re:Asciinema: Record and share your terminal sessions by alienbaby on Friday July 25, 2025 @11:09AM (#44684030)
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.

Re:Asciinema: Record and share your terminal sessions by minishlink on Friday July 25, 2025 @06:43AM (#44681724)
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.
Re:Asciinema: Record and share your terminal sessions by theideaofcoffee on Friday July 25, 2025 @10:25AM (#44683492)
The venerable script(1) command has been around since 1979 (via 3.0BSD), and while some of the timestamping (supporting via the -r flag to feed the resultant file into the playback) and other utility functions (replay via -p are much newer, the result is the same. Record to a (mostly) text file to schlep around as needed. And it's normally included by default on most installs, including macos.

There's no upload-to-server functionality unlike asciinema, but that may be a feature for some users.

Re:Asciinema: Record and share your terminal sessions by ku1ik on Friday July 25, 2025 @11:28AM (#44684251)
On a related note, asciinema player supports good ol' typescript files produced by the script(1) command.

https://blog.asciinema.org/post/blast-from-the-past/

Re:Asciinema: Record and share your terminal sessions by azemetre on Friday July 25, 2025 @10:33AM (#44683588)
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.

Re:Asciinema: Record and share your terminal sessions by zimbatm on Friday July 25, 2025 @01:28PM (#44685780)
Re:Asciinema: Record and share your terminal sessions by azemetre on Saturday July 26, 2025 @11:55AM (#44695018)
Thanks! Do you have experience using it? I'm quite nervous on using node CLT because the dependencies will always end up destroying the project and seeing it hasn't been updated in 5 years does not instill confidence.

The golang project looked better because at least the golang project provides a binary.

Re:Asciinema: Record and share your terminal sessions by zimbatm on Friday August 08, 2025 @03:39AM (#44834551)
I haven't used it extensively, but it works. I don't think it necessarily needs any updates since the underlying tech is stable.
Re:Asciinema: Record and share your terminal sessions by dmayle on Friday July 25, 2025 @10:47AM (#44683767)
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

Re:Asciinema: Record and share your terminal sessions by electroglyph on Friday July 25, 2025 @03:05PM (#44687003)
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...
Re:Asciinema: Record and share your terminal sessions by magicalhippo on Saturday July 26, 2025 @02:05AM (#44691766)
I looked at Carbony not long ago, but as far as I can see it's not been updated for a couple of years?
Re:Asciinema: Record and share your terminal sessions by fduran on Friday July 25, 2025 @11:35AM (#44684356)
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

Re:Asciinema: Record and share your terminal sessions by x187463 on Friday July 25, 2025 @11:49AM (#44684548)
All of the terminal effects I display over at: https://chrisbuilds.github.io/terminaltexteffects/showroom/ were recorded using asciinema and converted to gif use AGG. https://github.com/asciinema/agg

The workflow only takes a few seconds. The .cast file is output to a folder, AGG reads the .cast and creates a gif. AGG has arguments to automatically set the row/column widths and strip inactive time.

I could not find any other solution that produced high quality gifs. Asciinema is awesome.

Re:Asciinema: Record and share your terminal sessions by zimbatm on Friday July 25, 2025 @01:27PM (#44685760)
Quality animated SVGs is even better:

https://github.com/marionebl/svg-term-cli

Re:Asciinema: Record and share your terminal sessions by x187463 on Friday July 25, 2025 @07:04PM (#44689541)
The amount of information the SVG must store to represent the animation actually crashed the application creating it. There’s too much going on in TTE animations.
Re:Asciinema: Record and share your terminal sessions by doganugurlu on Saturday July 26, 2025 @11:22AM (#44694782)
I just discovered Terminal Text Effects, and that was the coolest thing I’ve seen all year!

I never post a link on HN but I feel like I wanna post it everywhere!

Re:Asciinema: Record and share your terminal sessions by greazy on Friday July 25, 2025 @08:14PM (#44690053)
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