llm
CLI utility and Python library for interacting with Large Language Models from organizations like OpenAI, Anthropic and Gemini plus local models installed on your own machine.
What it is and what it does
LLM is a unified command-line and Python interface for interacting with Large Language Models from multiple providers. It abstracts away provider-specific APIs, letting you run prompts, start interactive chats, and work with models from OpenAI, Anthropic, Google, Meta, and others—both via remote APIs and locally-installed models through plugins. The tool stores prompts and responses in SQLite, supports structured data extraction from text and images, can generate and store embeddings, and grants models the ability to execute tools.
You install it once with pip, configure API keys for the providers you use, and then run prompts from the command line or import it as a Python library. It handles the boilerplate of authentication, request formatting, and response parsing, making it practical for quick one-off queries, batch processing, and integration into scripts and applications.
Use it for:
- Run ad-hoc prompts and chats from the terminal against OpenAI, Anthropic, or other remote LLM APIs without writing code.
- Extract structured content and text from images and documents using vision-capable models via a single CLI command.
- Log all prompts and responses to a local SQLite database for auditing, analysis, and retrieval of past interactions.
- Build plugins to run self-hosted models (e.g., via Ollama or LM Studio) without rewriting your prompt execution logic.
- Generate and store embeddings for text or documents, then query them for semantic search and similarity tasks.
- Grant language models access to tools and functions so they can execute terminal commands or call external APIs as part of their reasoning.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
LLM is a CLI tool and Python library for running prompts against Large Language Models from OpenAI, Anthropic, Google, Meta, and dozens of other providers, both via remote APIs and locally-installed models.
Yes. LLM is actively maintained, has low install friction, carries no security vulnerabilities, and offers a practical abstraction over multiple LLM providers. It is worth installing if you work with language models from the command line or want a unified Python interface to multiple providers. The main prerequisite is an API key for at least one provider (OpenAI, Anthropic, Google, etc.) or a local model setup.
Install
llm on PyPI
pip
pip install llmuv
uv add llmpoetry
poetry add llmInstalling llm
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with a release 10 days ago and consistent updates; the project has 12363 GitHub stars and receives substantial ongoing development.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install llm
llm keys set openai
# Paste your OpenAI API key
llm "Ten fun names for a pet pelican"
Requires Python 3.10 or later and an API key for the model provider you intend to use (e.g., OpenAI, Anthropic, Google).
Verify before relying
- Whether all 13 runtime dependencies are strictly required or if some are optional for specific features (e.g., embeddings, tool calling).
- Performance characteristics and latency when running against local models via plugins versus remote APIs.
- Memory footprint and resource requirements for running local models through the plugin system.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 13 — click, condense-json, openai, click-default-group, sqlite-utils, pydantic, PyYAML, pluggy, python-ulid, setuptools, pip, pyreadline3, puremagic |
| Maintenance | actively maintained — 10 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 538,816/month — #6,112 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: llm-0.32-py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
banksBanks is a template language and prompt…
permissive · top 5,000 on PyPI
chatlasChatlas provides a unified Python interface for…
permissive · top 15,000 on PyPI
llm-github-modelsA plugin for the llm command-line tool that…
permissive · top 15,000 on PyPI
lmstudioPython SDK for interacting with LM Studio, a…
unclear · top 15,000 on PyPI
llm-anthropicA plugin for the LLM command-line tool that…
permissive · top 15,000 on PyPI
open-interpreterOpen Interpreter lets language models execute…
unclear · top 15,000 on PyPI
headroom-aiCompresses LLM prompts and agent outputs before…
permissive · top 15,000 on PyPI
llm-openai-pluginA plugin that extends LLM to access OpenAI…
permissive · top 15,000 on PyPI
aider-chatAider is an AI pair programming tool that runs…
permissive · top 5,000 on PyPI
litellmLiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI