I use LLM as a command-line tool and Python library for interacting with large language models. It can connect to remote APIs or run models installed on my own machine, and I can use it for one-off prompts or interactive chats.
The LLM repository is a Python project with 12,864 stars and 1,125 forks; its topics are ai, llms, and openai. It started in 2023-04 and was last updated in 2026-11.
LLM supports OpenAI, Anthropic’s Claude, Google’s Gemini, Qwen, Gemma, Kimi, DeepSeek, Mistral, and dozens of other large language models, using remote APIs or models installed and run on my own machine.
I describe LLM as a way to access large language models from the command-line.
My LLM repository is hosted on @simonw's GitHub.
- I can install LLM with pip, Homebrew, pipx, or uv:
pip install llm,brew install llm,pipx install llm, oruv tool install llm. The Homebrew instructions link to a warning note.
uvx llm openai endpoint http://localhost:1234/v1 \
-m google/gemma-4-12b \
"What is the capital of France?"
uvx llm openai endpoint http://localhost:1234/v1 \
-m google/gemma-4-12b \
--chat
Add `--key your-api-key` if the endpoint requires authentication.
llm keys set openai
llm "Ten fun names for a pet pelican"
llm "extract text" -a scanned-document.jpg
cat myfile.py | llm -s "Explain this code"
llm install llm-gemini
llm keys set gemini
llm -m gemini-3.5-flash 'Tell me fun facts about Mountain View'
llm install llm-anthropic
llm keys set anthropic
llm -m claude-sonnet-5 'Impress me with wild facts about turnips'
llm install llm-ollama
ollama pull llama3.2:latest
llm -m llama3.2:latest 'What is the capital of France?'
llm chat -m gpt-4.1
Type 'exit' or 'quit' to exit
Type '!multi' to enter multiple lines, then '!end' to finish
Type '!edit' to open your default editor and modify the prompt.
Type '!fragment <my_fragment> [<another_fragment> ...]' to insert one or more fragments
The README is generated from docs/index.md with sphinx_markdown_builder; its generation process runs sphinx-build -M markdown ./docs <tmpdir> and reads the generated markdown/index.md. The README also points to a YouTube demo, “Language models on the command-line,” and detailed accompanying notes.
The Ollama example labels the model as Orca Mini 7B but the pull and prompt commands use llama3.2:latest; the captured README does not explain that discrepancy. The linked Homebrew warning’s contents and the full list of supported models beyond those named are also not included here.