LLM is a CLI tool and Python library that lets you interact with large language models from the command line or from Python code. With a single, consistent interface you can run prompts against OpenAI’s GPT models, Anthropic’s Claude, Google’s Gemini, Meta’s Llama, and dozens of other models — both hosted APIs and models running entirely on your own machine. Whether you want to quickly summarize a file, extract structured data from text, build an automated pipeline, or just explore what the latest models can do, LLM gives you a fast and composable way to do it without writing boilerplate code.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/simonw/LLM/llms.txt
Use this file to discover all available pages before exploring further.
LLM ships with OpenAI support built in. The default model is gpt-4o-mini — fast and inexpensive for everyday use. You can change this at any time with
llm models default <model-id>.Key Features
Command-Line Prompts
Run single prompts, pipe files through system prompts, or attach images and documents — all from your terminal. Works seamlessly with standard Unix pipes and shell scripting.
Interactive Chat
Start a persistent, multi-turn conversation with any model using
llm chat. Supports multi-line input, editor integration, and fragment injection during the session.SQLite Logging
Every prompt and response is automatically logged to a local SQLite database. Search, filter, and replay your entire history — or browse it visually with Datasette.
Plugin Ecosystem
Extend LLM with plugins that add new models, tools, embedding providers, template loaders, and CLI commands. Install with a single
llm install command.Python API
Use LLM as a Python library for scripting, automation, and integrations. The same model plugins that work on the CLI work seamlessly in Python code.
Multi-Modal Support
Attach images, audio, video, and documents to your prompts. Extract text from scanned PDFs, describe screenshots, and more — with any model that supports attachments.
Embeddings
Generate and store vector embeddings from any text using embedding model plugins. Run semantic similarity searches directly from the CLI or Python.
Structured Output
Extract structured JSON from unstructured content using schemas. Define a schema inline or as a reusable template, and LLM will return validated, typed data.
The Plugin Ecosystem
LLM’s plugin system is the heart of its extensibility. Plugins are standard Python packages distributed via PyPI and installed withllm install <plugin-name>. A few of the most popular plugins:
| Plugin | Adds |
|---|---|
llm-anthropic | Anthropic Claude models (claude-4-opus, claude-3.5-haiku, …) |
llm-gemini | Google Gemini models (gemini-2.0-flash, gemini-1.5-pro, …) |
llm-ollama | Any model served locally via Ollama |
llm-gpt4all | 17+ local models via GPT4All (no API key required) |
llm-sentence-transformers | Local embedding models from Sentence Transformers |
llm-clip | CLIP image embeddings for visual similarity search |
What Makes LLM Distinctive
One tool, every model. Rather than learning a separate SDK or CLI for OpenAI, Anthropic, Gemini, and local models, LLM provides a single, uniform interface. Switch models with-m <model-id> and everything else stays the same.
Composable by design. LLM embraces Unix philosophy. Pipe text in, get text out. Chain it with grep, jq, cat, curl, and any other tool in your shell. Use it in shell scripts, Makefiles, and CI pipelines.
Your data stays yours. All logs are stored in a local SQLite database on your own machine. No data is sent anywhere except to the model provider you choose.
Extensible at every layer. Plugins can add new models, new embedding providers, new CLI subcommands, new template loaders, and new fragment sources. The plugin API is stable and well-documented.
Links
- GitHub: github.com/simonw/llm — source code, issues, and releases
- PyPI: pypi.org/project/llm — package page and version history
- Official Docs: llm.datasette.io — full reference documentation
- Discord: datasette.io/discord-llm — community chat