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.
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.
The fact you can iterate at all is its appeal to me
https://github.com/charmbracelet/vhs?tab=readme-ov-file#vhs-...
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.
I like being able to store my tapes in a repo and edit them:
https://github.com/zackproser/vhs-scratch
And as the official VHS docs show you can do even more interesting things with CI/CD
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.
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