I know mate, haha. I imagine someone can do much better than I did in a few minutes, but yeah use the UI that already exists instead of sprinkling electron on something text based.
If anyone fancies a tinker I imagine future editions of a CLI AI having a --context to include former prompts*, --stfu|--concise to make it respond concisely (as I was originally just responding "I know mate, haha" I also need this flag adding), probably a --model= to override that bit too, maybe even a --preamble=./prompt.txt
... it definitely needs a --json flag to prompt and enforce "I only want json and I'll parse it out of the response myself if I need to"
* Not just keeping a buffer and re-sending it, I believe context asks GPT to summarise the conversation so far and then uses the output of that for context memory. It'd need some tinkering.
I'll get round to it myself eventually, for now being able to ask little things like "is it defence or defense" and "what company owns the coco pops brand" is doing me just fine
I did realise I can now potentially pipe things into and out of GPT too, but have yet to come up with a use other than outputting through TTS e.g.
> ./ai is it defence or defense | festival --tts