This is an example tool I created using my tool (promptcmd) for turning prompts into "native-looking" executables:
Usage: bashme_a_script_that [OPTIONS] <query>...
Prompt inputs:
--stdin accept stdin input
<query>... positional query. Can be spaced and with/without quotes
It makes use of caching responses: if I review the generated script and it looks good (or incomprehensible and I'm in YOLO mood), I run the command again and pipe directly into bash. It'll use the reviewed response instead of generating a new one.
Would love to get feedback or ideas for promptcmd: