llm
CLI tool and Python library for interacting with OpenAI, Anthropic, Google, and dozens of other language models via APIs or locally
LLM is a command-line interface and Python library that provides unified access to dozens of large language models from providers like OpenAI, Anthropic's Claude, Google's Gemini, and Meta's Llama. It supports both remote API-based models and locally-installed models through a plugin system. The tool stores all prompts and responses in SQLite databases for later analysis and reference.
The CLI enables interactive chat sessions, batch prompt execution against files, and multi-modal operations including text extraction from images, audio, and video. LLM includes a structured data extraction system using schemas that can output JSON conforming to specific formats, making it useful for parsing unstructured content. It also supports a tools system that allows models to execute functions and access external data sources.
LLM's plugin ecosystem extends functionality with integrations for local model runners like Ollama, cloud providers beyond the built-in OpenAI support, and specialized embedding models. The tool includes template and fragment systems for managing reusable prompts and handling long-context scenarios. It targets developers, data analysts, and researchers who need programmatic access to language models with logging and structured output capabilities.
Installation
# via pip
pip install llm
# via Homebrew
brew install llm
# via pipx
pipx install llm
# via uv
uv tool install llm
Alternatives & related tools
ShellGPT
CLI that sends prompts to LLMs (OpenAI by default, Ollama supported) to generate shell commands, code, and answers, with stdin piping and chat sessions.
aider
AI-powered terminal-based pair programming tool that integrates LLMs with your existing codebase and git workflow
Open Interpreter
CLI tool that lets LLMs execute code locally through a ChatGPT-like terminal interface with approval prompts
AIChat
LLM CLI with a shell assistant, chat REPL, RAG, function calling and agents, supporting 20+ providers including OpenAI, Claude, Gemini and Ollama.
Claude Squad
Terminal UI that runs multiple AI coding agents (Claude Code, Codex, Gemini, Aider) in parallel, each in its own tmux session and git worktree.
add a badge to your README
Maintain llm? Show that it's featured on trmn. The badge links back to this page.
[](https://www.trmn.sh/tools/llm?utm_source=badge)<a href="https://www.trmn.sh/tools/llm?utm_source=badge"><img src="https://www.trmn.sh/badge/llm.svg" alt="Featured on trmn" height="20"></a>