5 ms·
now you can compare asciinema (rust) to vhs (go) I still use and love asciinema, but will eventually check out vhs. It records terminal activity, outputs a gif
by grimgrin 3y ago
now you can compare asciinema (rust) to vhs (go)
I still use and love asciinema, but will eventually check out vhs. It records terminal activity, outputs a gif, and you can publish to their[1] server.
Alternative you can feed it a "tape" file, aka a text file with a few configuration options and your ordered commands to run.
My workflow with asciinema sometimes has me cancelling out to redo w/ some minor change, so this tape concept is really attractive
1. https://github.com/charmbracelet/vhs https://github.com/charmbracelet/vhs
- pstuart 3y agoThe charmbracelet team is rocking the command line with Go.
- pests 3y agoDoes VHS have a way to add commands? I do like the concept but one charming feature of asciinema is it captures natural input hesitation, typing candence, deletions and fixing mistakes, etc. The VHS tape replay seems so artifical. I could see how to fake it with the current commands, but I could imagine a "HumanType" or something which increases the delay variance or includes typos that are backspaced and fixed etc, automatically. Just a quick ponder.
- grimgrin 3y agoI think it'll cover your needs. You can configure typing speeds, send commands for backspacing, if you were driving vim you could obv record doing search/replace/deletions The fact you can iterate at all is its appeal to me https://github.com/charmbracelet/vhs?tab=readme-ov-file#vhs-command-reference https://github.com/charmbracelet/vhs?tab=readme-ov-file#vhs-...
- pests 3y agoI saw that, yeah, but I don't want to do that manually. A custom command that could add some jitter automatically or just pretend to be a bit more human would be nice. Lets type "ls -lap" with some hesitation and a typo... Type "ls " Sleep 200 Type "-" Sleep 300 Type "l" Sleep 50 Type "aa" Sleep 100 Backspace Sleep 150 Type "p" Enter :( There is the TypingSpeed variable but its not exactly what I'm going for.
- alain_gilbert 3y agohttps://github.com/charmbracelet/vhs/blob/main/record.go#L22 https://github.com/charmbracelet/vhs/blob/main/record.go#L22 I was looking at the code, and it seems like you could put a low value for this and it would do what you want. I did not try it though // sleepThreshold is the time at which if there has been no activity in the // tape file we insert a Sleep command const sleepThreshold = 500 * time.Millisecond EDIT: I tested it. It actually work, but their software crash, I had to patch line 153 for lines[i] == lines[i+repeat] { repeat++ if i+repeat == len(lines) { break } } EDIT 2: I actually went ahead and created a pull request to fix the bug. https://github.com/charmbracelet/vhs/pull/446 https://github.com/charmbracelet/vhs/pull/446
- deleted 3y ago[deleted]
- zackproser 3y agoI appreciate and use asciinema, but a big plus one for VHS. I like being able to store my tapes in a repo and edit them: https://github.com/zackproser/vhs-scratch https://github.com/zackproser/vhs-scratch And as the official VHS docs show you can do even more interesting things with CI/CD
- bhub 3y agoSurprised no one has mentioned the big difference in that you can copy paste from asciinema animations but not from a vhs gif. At least last I looked it was like that.
- srid 3y agoVHS interesting, because you declaratively specify what you are recording and version control it. However, I quickly hit a painful limitation, viz.: if a command takes non-trivial amount of time to run, you need to hack it by using `Sleep` to wait for command output. So I'm not fully convinced to switch from asciinema.