id = "llm" name = "LLM" homepage = "https://llm.datasette.io/" description = "A command-line utility and Python library for interacting with large language models." executables = ["llm"] [dotfiles] # https://llm.datasette.io/en/latest/setup.html — LLM stores keys, aliases, # model options, default models, templates and logs below its per-user # application directory: ~/Library/Application Support/io.datasette.llm/ on # macOS and ~/.config/io.datasette.llm/ on Linux. LLM_USER_PATH can override # these defaults and is intentionally not a fixed path here. paths = [ "[appData]/io.datasette.llm/", "[configHome]/io.datasette.llm/", ] # https://llm.datasette.io/en/latest/logging.html and the official source # (https://github.com/simonw/llm/blob/main/llm/cli.py) identify logs.db as a # SQLite database containing prompts and responses; it is private history, # not portable configuration. exclude = [ "[appData]/io.datasette.llm/logs.db", "[configHome]/io.datasette.llm/logs.db", ] # The same official setup page documents keys.json as the stored API-key file. secret = [ "[appData]/io.datasette.llm/keys.json", "[configHome]/io.datasette.llm/keys.json", ] side_effect = false [commands] format = 1 label = "Run a prompt" description = "Send a prompt to a language model with llm. Tools, templates, fragments, schemas and logging options are left out." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "help" kind = "help" url = "https://raw.githubusercontent.com/simonw/llm/main/docs/help.md" revision = "2026-10-27" evidence = """ Usage: llm prompt [OPTIONS] [PROMPT] -s, --system TEXT System prompt to use -m, --model TEXT Model to use -a, --attachment ATTACHMENT Attachment path or URL or - -o, --option ... key/value options for the model --no-stream Do not stream output -n, --no-log Don't log to database -c, --continue Continue the most recent conversation. --key TEXT API key to use -u, --usage Show token usage -x, --extract Extract first fenced code block """ [[commands.field]] id = "prompt" label = "Prompt" type = "string" position = 0 sources = ["help"] [[commands.field]] id = "model" label = "Model" type = "string" option = ["--model", "-m"] sources = ["help"] [[commands.field]] id = "system" label = "System prompt" type = "string" option = ["--system", "-s"] sources = ["help"] [[commands.field]] id = "attachment" label = "Attachment" description = "Path or URL." type = "string" option = ["--attachment", "-a"] multiple = true sources = ["help"] [[commands.field]] id = "continue" label = "Continue last conversation" type = "boolean" option = ["--continue", "-c"] sources = ["help"] [[commands.field]] id = "no_stream" label = "Do not stream" type = "boolean" option = ["--no-stream"] sources = ["help"] [[commands.field]] id = "no_log" label = "Do not log" type = "boolean" option = ["--no-log", "-n"] sources = ["help"] [[commands.field]] id = "usage" label = "Show token usage" type = "boolean" option = ["--usage", "-u"] sources = ["help"] [[commands.field]] id = "extract" label = "Extract first code block" type = "boolean" option = ["--extract", "-x"] sources = ["help"] [[commands.task]] id = "ask" label = "Ask a question" fields = ["prompt", "model", "system"] required = ["prompt"] [[commands.task]] id = "code" label = "Get a code block" fields = ["prompt", "model", "extract"] required = ["prompt"] set = { extract = [true] } [[commands.group]] id = "basic" label = "Basic" fields = ["prompt", "model", "system", "attachment", "continue"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["no_stream", "no_log", "usage", "extract"]