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.
[1] http://man7.org/linux/man-pages/man1/script.1.html
[2] http://man7.org/linux/man-pages/man1/scriptreplay.1.html
[3] https://www.tecmint.com/record-and-replay-linux-terminal-ses...