A while ago I played around, and create a small tool that can do that: https://github.com/elisescu/goscript
It's a single binary (as cross platform as golang gets), which records a terminal session into a single html file which you can open for playback in the browser.
Any feedback is very much welcome :)