Possibly the least hyped feature of the El Capitan OS X update was a newer version of the terminal utility
script. It now supports recording the timing of keypresses along with the input and output. The entire session can then be played back, like a text-based screencast.
JsScript lets you replay recorded terminal sessions on a website.
To record a terminal session, run
script -r on any BSD system, like Mac OS X. It has been available in FreeBSD since Jul 2012. The Gnu version of
script is not compatible.
Try the live demo.