Since you mentioned terminal-based tutorials, here's a terminal-based solution.
Most linux systems should include script [1] and scriptreplay[2], which should suit your needs. Here's a complete example of a recorded/replayed session[3].
On MacOS it should be as easy as `script -r <filename>` to record and `script -p <filename>` to replay. YMMV, but I like it for _small_ use-cases, as it puts simplicity and portability over features.