llm

majiayu000's avatarfrom majiayu000

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. Features include chat sessions, embeddings, structured data extraction with schemas, prompt templates, conversation logging, and tool use. This skill is triggered when the user says things like "run a prompt with llm", "use the llm command", "call an LLM from the command line", "set up llm API keys", "install llm plugins", "create embeddings", or "extract structured data from text".

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 5, 2026

When & Why to Use This Skill

The LLM CLI tool skill provides a powerful command-line interface for interacting with a vast array of Large Language Models, including OpenAI, Anthropic, Gemini, and local models via Llama. It streamlines developer workflows by offering unified access to chat sessions, prompt templates, and advanced features like structured data extraction and embedding management. By integrating LLM capabilities directly into the terminal, it enables efficient model experimentation, automated text processing, and seamless plugin-based extensibility for modern AI development.

Use Cases

  • Terminal-Based Prompting: Execute prompts and manage multi-turn chat sessions directly from the command line, with support for piping file content as input.
  • Multi-Model Comparison: Easily switch between different LLM providers (OpenAI, Anthropic, Google, etc.) using a single tool to compare performance and outputs.
  • Structured Data Extraction: Automate the process of converting unstructured text or images into machine-readable JSON data using custom schemas.
  • Semantic Search & Embeddings: Generate, store, and utilize embeddings for semantic search and document similarity analysis within local projects.
  • Workflow Automation: Incorporate LLM calls into shell scripts or CI/CD pipelines for tasks like automated code reviews, log analysis, or content summarization.
  • Plugin Ecosystem Management: Extend the tool's functionality by installing plugins for new models, local execution, or specialized utility features.
namellm
descriptionAccess 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. Features include chat sessions, embeddings, structured data extraction with schemas, prompt templates, conversation logging, and tool use. This skill is triggered when the user says things like "run a prompt with llm", "use the llm command", "call an LLM from the command line", "set up llm API keys", "install llm plugins", "create embeddings", or "extract structured data from text".

LLM CLI Tool Skill

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.

When to Use This Skill

Use this skill when:

  • Running prompts against LLMs from the command line
  • Managing conversations and chat sessions
  • Working with embeddings for semantic search
  • Extracting structured data using schemas
  • Installing and configuring LLM plugins
  • Managing API keys for various providers
  • Using templates for reusable prompts
  • Logging and analyzing LLM interactions

Quick Reference

Basic Commands

# 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"

Key Management

llm keys set openai
llm keys set anthropic
llm keys set gemini

Plugin Management

llm install llm-anthropic
llm install llm-gemini
llm install llm-ollama
llm plugins

Documentation Index

Core Documentation

  • README.md - Project overview and quick start guide
  • docs/setup.md - Installation and initial configuration
  • docs/usage.md - Comprehensive CLI usage guide (prompts, chat, attachments, conversations)
  • docs/help.md - Complete command reference and help text

Model Configuration

Advanced Features

Embeddings

Plugins

Python API & Development

Reference

Common Workflows

Starting a Conversation

# 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"

Working with Files

# Analyze code
cat script.py | llm "Review this code for bugs"

# Process multiple files
cat *.md | llm "Summarize these documents"

Structured Output

# Extract data with schema
llm -m gpt-4.1 "Extract person info" -a photo.jpg --schema name,age,occupation

Template Usage

# List templates
llm templates

# Use a template
llm -t summarize < article.txt