-
-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
llm keys get name
command
#623
Comments
This now works: OPENAI_API_KEY="$(llm keys get openai)" printenv OPENAI_API_KEY Surprisingly (to me) this didn't - it output an empty string: OPENAI_API_KEY="$(llm keys get openai)" echo $OPENAI_API_KEY Turns out |
Updated docs - since this is such a small feature I only bothered documenting it in |
I didn't implement this at first because I didn't like the idea of key secrets being easy to read back out again. Then I found myself doing things like this:
OPENAI_API_KEY="$(jq -r '.openai' "$(dirname "$(llm logs path)")/keys.json")" \ uv run jupyter notebook
The
keys.json
file is readable by the current user anyway, so may as well simplify this pattern to the much nicer:OPENAI_API_KEY="$(llm keys get openai)" uv run jupyter notebook
The text was updated successfully, but these errors were encountered: