efugier / smartcat

Putting a brain behind `cat`🐈‍⬛ Integrating language models in the Unix commands ecosystem through text streams.
https://crates.io/crates/smartcat
Apache License 2.0
77 stars 9 forks source link

Api key from pass #6

Closed liborw closed 7 months ago

liborw commented 8 months ago

Would it be possible to get api key from pass?

efugier commented 8 months ago

What "pass", could you be more specific?

However, the answer will probably be no. There's a dedicated config file for it, you just have to paste it in when running smartcat for the first time.

Smartcat is meant to be a standalone and minimalist cli tool, compliant with the unix philosophy. It won't support integration with any third party program.

efugier commented 8 months ago

Closing because no updates.

liborw commented 7 months ago

Sorry, I meant pass the standard unix password manager, actually no integration with other tools is nessesary, just an option to specify command to fetch the api key from other tools. I would guess that solution like this is exacly what is meant to be compliant with the unix philosophy. See for example section on Secrets Management of the ChatGPT.nvim/README.

efugier commented 7 months ago

Ok so if I get this right implementing api_key_cmd would be enough for you right?

Then you just do write pass openai/somekey and you're all set correct?

liborw commented 7 months ago

Yes that's right, actually I have already made test implementation so I can make a pull request, however I do not know whether the quality would be enough.

efugier commented 7 months ago

Sorry just saw your last message, I did a quick implementation at #8, needs to be tested though!

efugier commented 7 months ago

It should now be supported starting at version, 0.6.0! Feel free to reopen the issue in case of troubles :smiley: