I have made a toy interactive console program that is basically an interpreter:
$ myprogram > this is user input this is program output
An easy way is to use the script command. It just stores your whole terminal session. Run it with:
script my-interactive-session.log program