Stackoverflow also has a list of tools BTW.
I once also stumbled upon Autocast – fix this and all folowing link when I have enough permissions-- and it also has a YAML playbook which you can run to automate it away.
Another alternative approach being [used here is asciinema for recording] (hxxps://github.com/borgbackup/borg/pull/6197) is [TCL/TCL Expect] (hxxps://core.tcl-lang.org/expect/index) and (optionally, I guess isolating this via docker or Vagrant.
[Reference to where I proposed this.] (hxxps://github.com/borgbackup/borg/issues/8040)