.env
where do i put the OPENAI key?
I just released a new version which has also support for a secrets.yaml file.
Just install the latest version (cargo install cai) and run cai to get information on how to configure it.
If you still rather want to use env variables, here is a description of several ways to set them: https://askubuntu.com/a/58828
I installed cai with brew. When I run cai I don't get much information. I added export openai_api_key="sdfsdf... to secrets.yaml but it didn't work?
Cai is not available via brew. Do you mean cargo?
https://formulae.brew.sh/formula/cai#default
Ah, TIL =D
When I run cai I don't get much information
What exactly does that mean?
If nothing is set up it should show an error "An API key must be provided". But if you already have set $OPENAI_API_KEY or similar, then it will simply use that and answer your prompt.
aha, yaml format openai_api_key: lksdjfl now it works, but a bit hard to read the answer with black background in the terminal