I love asciinema. A key difference between these two tools seems to be that asciinema records a human using the terminal, whereas VHS generates output based on a list of steps to execute.
I can see VHS being nicer than asciinema for a lot of applications, since you can avoid typos and fumbling, and you can easily re-render the same output with different settings.
I've started using demo-magic [1] to automate my asciinema recorded demos, not perfect but it gets the job done. VHS does look excellent however and I'll definitely be giving it a go the next time I need to record anything.
Although it's separate, the creator(s) does provide a utility called `agg`[0] to convert asciicast files to GIF. The GitHub appears to provide prebuilt binaries in Releases, but it's easily built using Cargo/Rust too.
You may want to edit the timing maybe? Or provide an asciicast format where you can run JS (your blog or site) and a gif where you can only insert a picture, like social networks.
do you still have to go to asciinema.org to view them? that always rubbed me the wrong way, whether it was a requirement or just the dominant preference.
I wrote a blog post[1] breaking down tools to record terminal sessions just a couple weeks ago. I wasn't aware of this particular one but it looks like it's going to have issues with recording anything that requires user input.
My post describes how to make high quality recordings of terminal sessions that can be replayed in the terminal, or shared on the web. I'm defining high quality as recordings with zero typos, and relatively controlled timing between commands.
I'm going to assume this works well because all the stuff from Charm seems to, BUT its limitations are ... problematic. I think the techniques i list in the post combined with agg[2] or gifcast[3] to covert it to a gif would be a better solution for non-trivial cases.
I'll add notes about agg and gifcast to the post this evening hopefully.
This looks super useful. Tempted to go and add CI-maintained gifs to a whole bunch of existing projects now.
Some ideas for new features:
* If the prefix of the tape file is unchanged, reuse the intermediate updates through that prefix from a cache (edit: hmm, upon further thought this seems more difficult than I initially imagined, since the state would need to be cached to save time, not just the images)
* Allow an option for using real-time delays in the gif or user-selected delays (I think currently delays are constant unless user-selected, but I don't see a way to use the real runtime delay in the gif)
Perhaps you don't understand the use case. It's often the only option for users to install packages on an HPC system, as on such systems you cannot install things as root so the system package manager is infeasible. The only other possibility is Anaconda, but that has its origins as a Python tool and only has a fairly limited set of non-Python related packages.
For starters: auto-updating everything before installing anything (HOMEBREW_NO_AUTO_UPDATE default 0).
Coupled with uninstalling before determining whether or not the OS version is still supported (not sure if this still can happen, or ever happened on Linux)... fun times all around.
I've done a few gifs of "this happens" for bug reports and the like. One thing that this solves is the "ugh i screwed up the sequence, time to try recoring for the 10th time" problem, so that's interesting. I wonder how well it works with programs that set their input line discipline to "raw" or read from the pty directly - ncurses-like interfaces and things like sudo, etc.
Maybe, I'm using Firefox - I wonder if that's built into the browser now?
I really wish there was a set of browser standards for at least a modicum of similarity (I guess chromium is one?)- things are all over the place still hahaha
We started off hand rolling the parser and had that fully implemented and then wrote the tree-sitter grammar. If I were to do it again I would probably use tree-sitter for the actual repo so that the implementations were the same for sure.
> VHS has an SSH server built in! When you self host VHS you can access it as though it were installed locally. VHS will have access to commands and applications on the host so you don't need to install them on your machine.
It wouldn't get to trial. Cease and desist letter with the threat of legal action would likely do the trick, as charmbracelet likely have insufficient funds to defend themselves, and it simply wouldn't be worth the money to defend a small project name. At the very least it would be easy to force them to remove any use of VHS in relation to video tapes: they have a giant picture of a VHS video tape on their homepage!
If the trademark owner discovers this, they would be legally obliged to defend their trademark if they want to keep it.
JVC/Kenwood has previously successfully defended their mark when used in artworks/apparel (which are not in the same domains).
This is awesome! I can see adding a demo for at least one of my projects.
Based on a quick glance, I'd say the best thing about it is that can you reuse the script (for ex: something changed with the command usage/output, automate recording for different command, etc).
If the author's reading this, please consider whether a picture of a video cassette was really of value, and if it was please don't put in a bloody great 2MB image.
At one of the Open Source Conferences (OSCON) I saw Damian Conway use a tool like this (I believe it was asciinema) to give one of the best command line based demos I've ever seen. He was typing away like mad and not one typo! It was mesmerizing and the demo was totally awesome, of course it helps that he's a superb presenter to begin with.
So, this seems to just download chrome and run some sort of terminal emulator in it (then converts it to video). Do I have that right? Seems like massive overkill for something you could do with just ffmpeg and a terminal emulator...
I've actually used ffmpeg + GNU screen to do something very similar in the past.
The benefit of using GNU screen is that the "tape" can be a shell script. I suppose if you don't like shell scripts that's not a benefit, but I do like them.
For example, instead of:
Type "echo 'Welcome to VHS!'"
# Pause for dramatic effect...
Sleep 500ms
Enter
One of the dependencies is `rod`[0], which is a web scraping/automation library, and I believe requires a browser to work. I don't know what they're using it for though as I haven't looked at the code (and I'm not familiar with Go anyways). There's a feature of the library that finds and installs a browser, but they may just be preemptively including chromium in the dockerfile and assuming that non-docker users will already have a supported browser on their machine.
Would love to know what other people think about the overall design and comunication stategy of Charm.
On one hand I already knew who did this project even before the image was fully loaded, youtube content seems interesting, and branding is very strong but I also feel a bit overwhelmed by all the brands shouting at me. they have Charm Cloud, VHS, Soft Serve, Buble Tea, Lip Gloss, Charm, Wish, Bubbles, Glamour, Harmonica, Gum, Skate, Glow.
The other themes that all the tools have are quality, usefulness, and creativity. Personally my favorite is gum, it makes me want to write shell scripts. It's like zenity for the terminal.
It does not generate a GIF file, but can be easily published on the web. The recorded terminal session is clipboard friendly: you can select and copy.