LLM runs prompts and chats from the terminal, logs to SQLite, and supports embeddings, tools, schemas, and plugins for many providers.
Overview
LLM is a command-line utility and Python library for working with large language models from a terminal environment. It can call remote APIs from vendors such as OpenAI, Anthropic, Google Gemini, and others, and supports plugins for local runtimes including Ollama.
Core workflows include one-shot prompts, interactive chat sessions, piping files into prompts, attaching images and other media, and continuing prior conversations. Responses and metadata can be stored in a local SQLite database for search, backup, and later review.
Beyond basic chat, LLM exposes embeddings, similarity search, structured extraction via JSON schemas, reusable templates and fragments, and tool execution so models can run approved commands in the shell. Plugins extend available models, embeddings, tools, and template loaders without changing the core CLI.
Installation is via pip, pipx, uv, or Homebrew, with optional uvx runs against OpenAI-compatible endpoints without a full install. API keys can be saved locally, passed per invocation, or supplied through environment variables.
Key features
- Terminal prompts and interactive chat
- SQLite logging of prompts and replies
- Embeddings and similarity search
- JSON schema structured extraction
- Tool execution from the shell
- Templates, fragments, and aliases
- Plugin ecosystem for models and tools
- Python API alongside the CLI
Use cases
- Quick terminal experiments with many models
- Scripting LLM calls in shell pipelines
- Local models through Ollama plugins
- Extracting structured data from text
- Building searchable prompt history