llm

Access large language models from the command-line

What is llm?

Access large language models from the command-line

Overview of llm

What it is

LLM is a CLI tool and Python library for interacting with large language models from OpenAI, Anthropic's Claude, Google's Gemini, Qwen, Gemma, Kimi, DeepSeek, Mistral, and dozens of others, both via remote APIs and with models that can be installed and run on your own machine.

Key features

  • Run prompts from the command-line
  • Store prompts and responses in SQLite
  • Generate and store embeddings
  • Extract structured content from text and images
  • Grant models the ability to execute tools
  • Start an interactive chat with a model using llm chat
  • Install plugins to access additional models (e.g., local models via Ollama)

Use cases

  • Running prompts against OpenAI, Gemini, Anthropic, or local models
  • Extracting text from images using vision models
  • Using system prompts to explain code or analyze files
  • Starting interactive chat sessions with models
  • Generating and searching embeddings for similarity tasks
  • Extracting structured data (e.g., JSON) from unstructured content using schemas

Getting started

Install LLM using one of these methods:

pip install llm
brew install llm
pipx install llm
uv tool install llm

Set an API key and run a prompt:

llm keys set openai
llm "Ten fun names for a pet pelican"

For Gemini or Anthropic, install the respective plugin and set the key:

llm install llm-gemini
llm keys set gemini
llm -m gemini-3.5-flash 'Tell me fun facts about Mountain View'

To start an interactive chat:

llm chat -m gpt-4.1

License and pricing

License: Apache-2.0. The project is open source. No pricing information is stated in the provided materials.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/simonwllm.svg)](https://yunodb.com/tools/simonwllm?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/simonwllm?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/simonwllm.svg" alt="Featured on YunoDB" height="20"></a>