Add support to load api keys from 1password cli or similar #1494
victorguidi
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone,
I was wondering if this would be a feature others might find useful. Personally, I prefer loading API keys directly from tools 1Password cli or pass, rather than storing them in plain text or setting them as environment variables in my OS.
I'd be happy to work on a pull request to add support for it, if of course this is something that more people would think is useful. There are already some workarounds that I currently use, like for example, with 1Password cli (op), you can add something like this to your .env file:
OPENROUTER_API_KEY=op://vault/OPENROUTER_API_KEY/credential
Then, you can run Fabric with:
op run --env-file $HOME/.config/fabric/.env -- fabric -p create_command $argv
// I just make a function in myconfig.fish
for this command and thats itThis approach already works, but I’ve seen other applications that offer native support for automatically loading credentials this way, which is why I’m bringing it up.
Let me know what you think! If there's interest, I’ll go ahead and work on the change and open a pull request.
Beta Was this translation helpful? Give feedback.
All reactions