The poor man's version of this - write your runbooks as text files in your source code. And set your editor to "Send to Terminal". I use vim-slime in nvim, vscode has similar functionality.
Document it, version control it, share it, and (semi)automate it. There's no reason to type or copy-paste important commands directly into the terminal.
Document it, version control it, share it, and (semi)automate it. There's no reason to type or copy-paste important commands directly into the terminal.