There are many ways to record your CLI session, though I find tmux the most pleasant way to do it.
By default tmux's prefix is ctrl+b btw!
https://github.com/kaihendry/dotfiles...
I use ctrl+a p locally and ctrl+b p on remote tmux sessions to record a log.