mirror of
https://github.com/Hopiu/llm.git
synced 2026-03-17 05:00:25 +00:00
Better --help for llm keys get, refs #623
This commit is contained in:
parent
561784df6e
commit
dff53a9cae
2 changed files with 12 additions and 1 deletions
|
|
@ -190,6 +190,10 @@ Usage: llm keys get [OPTIONS] NAME
|
|||
|
||||
Return the value of a stored key
|
||||
|
||||
Example usage:
|
||||
|
||||
export OPENAI_API_KEY=$(llm keys get openai)
|
||||
|
||||
Options:
|
||||
--help Show this message and exit.
|
||||
```
|
||||
|
|
|
|||
|
|
@ -607,7 +607,14 @@ def keys_path_command():
|
|||
@keys.command(name="get")
|
||||
@click.argument("name")
|
||||
def keys_get(name):
|
||||
"Return the value of a stored key"
|
||||
"""
|
||||
Return the value of a stored key
|
||||
|
||||
Example usage:
|
||||
|
||||
\b
|
||||
export OPENAI_API_KEY=$(llm keys get openai)
|
||||
"""
|
||||
path = user_dir() / "keys.json"
|
||||
if not path.exists():
|
||||
raise click.ClickException("No keys found")
|
||||
|
|
|
|||
Loading…
Reference in a new issue