Since the OP is familiar with the Go ecosystem, they could probably use vhs[1] easily to programmatically create an interactive demo GIF. That has worked very well for me in the past.
[1]: https://github.com/charmbracelet/vhs
Good thinking. I added a vhs tape: https://github.com/cwarden/git-add--interactive/blob/main/RE...