mirror of
https://github.com/Hopiu/llm.git
synced 2026-03-21 15:10:23 +00:00
5.3 KiB
5.3 KiB
CLI reference
This page lists the --help output for all of the llm commands.
llm --help
Usage: llm [OPTIONS] COMMAND [ARGS]...
Access large language models from the command-line
Documentation: https://llm.datasette.io/
To get started, obtain an OpenAI key and set it like this:
$ llm keys set openai
Enter key: ...
Then execute a prompt like this:
llm 'Five outrageous names for a pet pelican'
Options:
--version Show the version and exit.
--help Show this message and exit.
Commands:
prompt* Execute a prompt
init-db Ensure the logs.db SQLite database exists
keys Manage stored API keys for different models
logs Tools for exploring logged prompts and responses
templates Manage stored prompt templates
llm prompt --help
Usage: llm prompt [OPTIONS] [PROMPT]
Execute a prompt
Documentation: https://llm.datasette.io/en/stable/usage.html
Options:
--system TEXT System prompt to use
-m, --model TEXT Model to use
-t, --template TEXT Template to use
-p, --param <TEXT TEXT>... Parameters for template
--no-stream Do not stream output
-n, --no-log Don't log to database
-c, --continue Continue the most recent conversation.
--chat INTEGER Continue the conversation with the given chat ID.
--key TEXT API key to use
--help Show this message and exit.
llm init-db --help
Usage: llm init-db [OPTIONS]
Ensure the logs.db SQLite database exists
All subsequent prompts will be logged to this database.
Options:
--help Show this message and exit.
llm keys --help
Usage: llm keys [OPTIONS] COMMAND [ARGS]...
Manage stored API keys for different models
Options:
--help Show this message and exit.
Commands:
path Output the path to the keys.json file
set Save a key in the keys.json file
llm keys path --help
Usage: llm keys path [OPTIONS]
Output the path to the keys.json file
Options:
--help Show this message and exit.
llm keys set --help
Usage: llm keys set [OPTIONS] NAME
Save a key in the keys.json file
Example usage:
$ llm keys set openai
Enter key: ...
Options:
--value TEXT Value to set
--help Show this message and exit.
llm logs --help
Usage: llm logs [OPTIONS] COMMAND [ARGS]...
Tools for exploring logged prompts and responses
Options:
--help Show this message and exit.
Commands:
list* Show recent logged prompts and their responses
path Output the path to the logs.db file
llm logs path --help
Usage: llm logs path [OPTIONS]
Output the path to the logs.db file
Options:
--help Show this message and exit.
llm logs list --help
Usage: llm logs list [OPTIONS]
Show recent logged prompts and their responses
Options:
-n, --count INTEGER Number of entries to show - 0 for all
-p, --path FILE Path to log database
-t, --truncate Truncate long strings in output
--help Show this message and exit.
llm templates --help
Usage: llm templates [OPTIONS] COMMAND [ARGS]...
Manage stored prompt templates
Options:
--help Show this message and exit.
Commands:
edit Edit the specified prompt template using the default $EDITOR
list List available prompt templates
path Output the path to the templates directory
show Show the specified prompt template
llm templates list --help
Usage: llm templates list [OPTIONS]
List available prompt templates
Options:
--help Show this message and exit.
llm templates show --help
Usage: llm templates show [OPTIONS] NAME
Show the specified prompt template
Options:
--help Show this message and exit.
llm templates edit --help
Usage: llm templates edit [OPTIONS] NAME
Edit the specified prompt template using the default $EDITOR
Options:
--help Show this message and exit.
llm templates path --help
Usage: llm templates path [OPTIONS]
Output the path to the templates directory
Options:
--help Show this message and exit.