https://github.com/charmbracelet/vhs is a really good utility for automatically making these gifs.
I'm a big fan of svg-term myself: https://github.com/marionebl/svg-term-cli
Hm, very interesting! This only converts asciinema recordings, though, right? It doesn't automatically record anything?
If you have asciinema already installed then you can invoke it through svg-term like this!
svg-term --command 'cowsay hey there'