You can record your command window session via the log command. Just run
log -on <filename>
and start recording. To finish logging, it’s just
log -off
There is also an option to overwrite the existing file; otherwise it will append. Note that both dash and forward slash will work for command arguments.