Access and interact with Large Language Models from the command line using Simon Willison's llm CLI tool. Supports OpenAI, Anthropic, Gemini, Llama, and dozens of other models via plugins...
A CLI tool and Python library for interacting with Large Language Models including OpenAI, Anthropic's Claude, Google's Gemini, Meta's Llama, and dozens of others via remote APIs or locally installed models.
Use this skill when:
# Run a prompt
llm "Your prompt here"
# Use a specific model
llm -m claude-4-opus "Your prompt"
# Chat mode
llm chat -m gpt-4.1
# With attachments (images, audio, video)
llm "describe this" -a image.jpg
# Pipe content
cat file.py | llm -s "Explain this code"
llm keys set openai
llm keys set anthropic
llm keys set gemini
llm install llm-anthropic
llm install llm-gemini
llm install llm-ollama
llm plugins
# Start chat with context
llm chat -m gpt-4.1 -s "You are a helpful coding assistant"
# Continue a previous conversation
llm -c "Follow up question"
# Analyze code
cat script.py | llm "Review this code for bugs"
# Process multiple files
cat *.md | llm "Summarize these documents"
# Extract data with schema
llm -m gpt-4.1 "Extract person info" -a photo.jpg --schema name,age,occupation
# List templates
llm templates
# Use a template
llm -t summarize < article.txt