vipe

Run a text editor in the middle of a UNIX pipeline. More information: https://joeyh.name/code/moreutils/.

command1 | vipe | command2

command1 | vipe --suffix json | command2

command1 | EDITOR=vim vipe | command2