Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/simonw/LLM/llms.txt

Use this file to discover all available pages before exploring further.

LLM is a CLI tool and Python library that puts the full power of large language models in your terminal and your code. Use OpenAI’s GPT models out of the box, then extend with plugins to reach Anthropic Claude, Google Gemini, local Ollama models, and dozens more — all through one consistent interface.

Quickstart

Install LLM and run your first prompt in under two minutes

Setup & Configuration

Install LLM, manage API keys, and configure defaults

CLI Usage

Run prompts, chat interactively, use attachments and system prompts

Python API

Use LLM programmatically in your Python applications

Plugins

Extend LLM with additional models and capabilities

Embeddings

Generate and search embeddings for semantic similarity

What you can do with LLM

Run prompts

Stream responses from any supported model directly in your terminal, pipe in files, and use system prompts

Interactive chat

Start a multi-turn conversation with any model, keeping full context throughout the session

Tool calling

Give models the ability to execute Python functions and build agentic pipelines

Structured output

Extract structured JSON from text using schemas — great for data extraction pipelines

Templates & Fragments

Save reusable prompts as templates and manage long-context content with fragments

Logged history

Every prompt and response is automatically saved to SQLite for later retrieval and search

Get started in minutes

1

Install LLM

Install using pip, pipx, uv, or Homebrew:
pip install llm
2

Set your API key

Store your OpenAI API key (or use any supported provider):
llm keys set openai
# Paste your key at the prompt
3

Run your first prompt

Stream a response right in your terminal:
llm "What are three creative uses for a command-line LLM tool?"
4

Explore more models

Install a plugin to access Claude, Gemini, or local models:
llm install llm-anthropic
llm keys set anthropic
llm -m claude-4-opus "Tell me something fascinating"
LLM defaults to OpenAI’s gpt-4o-mini model. You can change the default with llm models default <model-id> or by setting the LLM_MODEL environment variable.

Build docs developers (and LLMs) love