Website review
This review may include AI-generated content and is not individually verified. Domain, certificate and other facts come from the observed data on this page.
What is LLM?
LLM is a command-line tool and Python library for working with large language models. It lets you send prompts to many different models — OpenAI, Anthropic's Claude, Google's Gemini, Qwen, Gemma, Kimi, DeepSeek, Mistral and others — either through remote APIs or as models installed and run on your own machine. The same tool covers one-off prompts, interactive chats, embeddings, structured extraction from text and images, and tool use, and it stores prompts and responses in SQLite.
A few concrete things it does:
- Run prompts from the terminal:
llm "Ten fun names for a pet pelican". - Pipe files or code into a model:
cat myfile.py | llm -s "Explain this code". - Attach images:
llm "extract text" -a scanned-document.jpg. - Chat interactively:
llm chat -m gpt-4.1, with!multifor multi-line input. - Talk to any OpenAI-compatible endpoint (for example a local LM Studio server) without extra configuration.
- Add providers via plugins, such as
llm-gemini,llm-anthropic, orllm-ollamafor locally run models.
Who it suits: developers and technical users who already live in a terminal and want a scriptable, uniform interface to several model providers instead of juggling separate SDKs and API clients. The Python library side matters if you want to call the same functionality from your own code, and the SQLite logging is useful when you want a searchable record of what you asked and what came back.
Trade-offs to weigh: the CLI is the primary interface, so if you prefer a graphical app this is not aimed at you. Remote API models require you to set API keys (llm keys set openai, and so on), while local models require a separate runtime and plugin plus enough hardware to run them. Provider coverage depends on installing the relevant plugin, and model names and defaults change over time, so check the current documentation rather than assuming a specific model is available.
Next step: install it with pip install llm (or Homebrew, pipx, or uv), set a key for one provider, and try a single prompt against a file you already have. If that fits your workflow, add a second provider plugin and compare the same prompt across models before committing to one.
The project is documented at LLM.
How do I install LLM on my machine?
Install LLM with the package manager you already use for Python tools. The project documents four paths: pip install llm, brew install llm (Homebrew notes a warning, so read it before choosing this route), pipx install llm, and uv tool install llm. If you want to try it without installing anything first, the docs show uvx llm ... running a prompt directly against an endpoint.
Which install method fits you
| Method | Best for | Trade-off |
|---|---|---|
pip install llm |
Working inside an existing virtual environment or project | Installs into that environment, so it is tied to it |
pipx install llm |
Keeping the llm command available globally |
Isolated from your project dependencies |
uv tool install llm |
uv users who want the same isolated global command | Requires uv |
brew install llm |
macOS users who prefer Homebrew | The docs attach a warning to this option |
After installing
The tool runs prompts from the command line, but remote models need credentials. For OpenAI, the documented step is llm keys set openai, then paste your API key; the same pattern applies to plugins, such as llm install llm-gemini followed by llm keys set gemini. Plugins are also how you reach locally run models — for example, llm install llm-ollama before running a prompt against a model you pulled with Ollama. A practical first check is a single prompt, then llm chat -m <model> if you want an interactive session instead of one-shot output.
If you are unsure, start with pipx install llm or uv tool install llm so the command is available everywhere without disturbing a project environment, and add model plugins only when you know which provider or local runtime you want.
How do I run prompts against models like OpenAI, Claude, or Gemini using LLM?
Install LLM, add a key for the provider you want, then pass the model name with -m. Each provider beyond OpenAI-compatible endpoints is a plugin.
OpenAI (built in)
pip install llm
llm keys set openai
llm "Ten fun names for a pet pelican"
Anthropic Claude and Google Gemini (plugins)
llm install llm-gemini
llm keys set gemini
llm -m gemini-3.5-flash 'Tell me fun facts about Mountain View'
llm install llm-anthropic
llm keys set anthropic
llm -m claude-sonnet-5 'Impress me with wild facts about turnips'
Local or self-hosted models
llm install llm-ollama
ollama pull llama3.2:latest
llm -m llama3.2:latest 'What is the capital of France?'
You can also point at any OpenAI-compatible Chat Completions endpoint without configuring a key first, which suits LM Studio or a similar local server:
uvx llm openai endpoint http://localhost:1234/v1 \
-m google/gemma-4-12b \
"What is the capital of France?"
Add --chat to the same command for an interactive session, or --key your-api-key if the endpoint needs authentication.
Everyday patterns
- Pipe a file in and add a system prompt:
cat myfile.py | llm -s "Explain this code" - Attach an image:
llm "extract text" -a scanned-document.jpg - Start a conversation:
llm chat -m gpt-4.1, then typeexitorquitto leave
How to choose
| Situation | Command shape |
|---|---|
| One-off question, hosted model | llm -m <model> "prompt" |
| Long back-and-forth | llm chat -m <model> |
| File or code review | cat file | llm -s "..." |
| Local model, no API key | install a local plugin, then -m <local-model> |
| Unlisted OpenAI-compatible server | llm openai endpoint <url> -m <model> "prompt" |
The main trade-off is plugin setup versus reach: OpenAI works after pip install llm, while Claude, Gemini and local runtimes each need one llm install step and, for hosted APIs, a key. Local models avoid sending data off your machine but depend on what your hardware can run.
Next step: if a command fails, check that the model name matches the provider's naming and that its key is set with llm keys set <provider>. For background, see LLM.
Can I use LLM with locally running models like Ollama or LM Studio?
Yes. LLM is built for both remote APIs and models running on your own machine, and the page evidence gives concrete paths for two common local setups.
Ollama: install the Ollama plugin, pull a model, then prompt it by name:
llm install llm-ollama
ollama pull llama3.2:latest
llm -m llama3.2:latest 'What is the capital of France?'
LM Studio or any OpenAI-compatible endpoint: point LLM at the endpoint directly, without configuring a key first:
uvx llm openai endpoint http://localhost:1234/v1 \
-m google/gemma-4-12b \
"What is the capital of France?"
Add --chat for an interactive session, or --key your-api-key if the endpoint requires authentication. The page also notes that uvx lets you try this without installing LLM first, and links to further options for running against an endpoint without configuring it.
Which route fits you
| Situation | Sensible choice |
|---|---|
| You already run Ollama and want named local models | Ollama plugin |
| You use LM Studio or another OpenAI-compatible server | llm openai endpoint |
| You want to test before committing to an install | uvx llm ... |
| Your local server needs a token | Add --key |
What you keep either way
Local models don't change the rest of the workflow described on the page: prompts and responses can still be stored in SQLite, embeddings generated and stored, and structured content extracted from text and images. That matters if your reason for going local is privacy or offline work — the model runs on your hardware, but your prompt history stays in the same local database as with hosted models.
A practical first step: run one short prompt through your local server, then check it landed in the log. If it did, your existing scripts and stored prompts will work against local models with only the model name changed.
How do I store and manage prompts and responses in SQLite with LLM?
LLM stores every prompt and response in a local SQLite database by default, so you get a queryable history without any extra setup. You run a prompt from the terminal and the record is written automatically; you don't have to save anything manually.
Where the data goes
The database lives at ~/.local/share/llm/logs.db on Linux (and under the equivalent application-support/data directory on macOS and Windows). Because it's plain SQLite, you can open it with the sqlite3 command or any SQLite GUI and treat it like any other database.
What gets recorded
Each logged call typically includes the prompt text, the model used, the response, and a timestamp, plus options such as system prompts or whether it was part of a chat. That makes it straightforward to answer questions like "what did I ask Claude last week" or "how many tokens did I burn on this model" with a single SQL query.
Practical ways to use it
- Audit and reuse: Re-run or copy a prompt you liked by finding it in the log instead of retyping it.
- Build a dataset: Export rows to CSV or JSON for evaluation, fine-tuning notes, or reporting.
- Search across history: Query by model, date range, or a substring of the prompt to find past work.
- Feed later steps: Pull stored responses into scripts, notebooks, or downstream tools.
Managing the database
The log grows as you use LLM, so plan for housekeeping: back up the file before upgrades, prune old rows with a DELETE, or archive to another table. If you want a separate store per project, point LLM at a different database path via its configuration rather than mixing everything into one file.
Next step
Install LLM, run one prompt, then open the database and inspect the schema:
pip install llm
llm "Ten fun names for a pet pelican"
sqlite3 ~/.local/share/llm/logs.db ".tables"
From there, write a query that selects prompts and responses for the model you use most, and decide whether you want a retention rule (for example, deleting entries older than 90 days) before the log gets large. For the exact schema and configuration options, check the project's documentation at LLM.
How can I extend LLM with plugins to access additional models?
Install the plugin for the model provider you want, set its API key (or pull a local model), then call it with -m. LLM itself ships with OpenAI support; other providers arrive as separate plugins.
Typical flow
llm install llm-gemini
llm keys set gemini # paste your Gemini API key
llm -m gemini-3.5-flash 'Tell me fun facts about Mountain View'
The same pattern works for Anthropic (llm install llm-anthropic, llm keys set anthropic, then -m claude-sonnet-5). For local models via Ollama: llm install llm-ollama, ollama pull llama3.2:latest, then llm -m llama3.2:latest 'What is the capital of France?'.
Choosing between plugin routes
| Route | Setup | Good for |
|---|---|---|
| Hosted provider plugin (Gemini, Anthropic, etc.) | Install plugin + API key | Strongest models, no local hardware |
| Local runtime plugin (e.g. Ollama) | Install plugin + pull model | Offline use, no per-call API costs, privacy |
| OpenAI-compatible endpoint | Point at a base URL, no full config needed | LM Studio, self-hosted or proxy endpoints |
For an endpoint that speaks the OpenAI Chat Completions format, you can skip persistent configuration entirely:
uvx llm openai endpoint http://localhost:1234/v1 \
-m google/gemma-4-12b \
"What is the capital of France?"
Add --key your-api-key if the endpoint requires authentication, and swap in --chat for an interactive session. This is the fastest way to test a locally served model before committing to a plugin install.
Decision criterion: if you will reuse the provider often, install the plugin and store the key once so -m <model> just works. If you are experimenting with a one-off endpoint, use llm openai endpoint and leave your config untouched. Note that model names and default models change over time, so check what your installed plugin actually exposes (for example with llm models) rather than assuming a name from a tutorial.
User reviews (0)