I love the idea but what would make it more usable in my opinion is the ability to "preload" custom function definitions. So that for example it would be possible to:
jqp --include myfunctions.jq --file data.json
(later inside TUI:)
jq> . | myfunction
where the contents of myfunctions.jq is: