llm (Simon Willison)
A CLI and Python library for local LLMs and cloud APIs, with Ollama support, OpenAI-compatible endpoints and SQLite conversation history.

LLM is a command-line tool and Python library for developers who want to use language models in terminal workflows or applications. It supports models running on your machine alongside remote providers such as OpenAI, Anthropic and Google.
- Local and remote models: Connect to Ollama through a plugin or use an OpenAI-compatible endpoint such as LM Studio for prompts and interactive chats.
- Conversation history: Save prompts and responses in SQLite, then search past conversations or inspect them with Datasette.
- Structured extraction: Extract structured data from text and images using schemas, with attachment support depending on the model.
- Embeddings: Generate and store embeddings, organize them into collections and retrieve similar items through the CLI or Python library.
- Tool use: Give compatible models access to executable tools, including functions supplied through Python or plugins.
LLM is open source under Apache 2.0. Plugins extend its model support, including local runtimes and cloud services. Available capabilities depend on the selected model and plugin. SQLite history lives locally; requests to cloud models go to their providers and require the relevant API access.