LLM: A CLI utility and Python library for interacting with Large Language Models

LLM: A CLI utility and Python library for interacting with Large Language Models

🚀 Productivity

LLM: A CLI utility and Python library for interacting with Large Language Models - AI Tool

Mar 24, 2026Admin

Menu Expand Light mode Dark mode Auto light/dark mode Hide navigation sidebar Hide table of contents sidebar Back to top Toggle Light / Dark / Auto color theme Toggle table of contents sidebar LLM # A CLI tool and Python library for interacting with OpenAI , Anthropic’s Claude , Google’s Gemini , Meta’s Llama and dozens of other Large Language Models, both via remote APIs and with models that can be installed and run on your own machine. Watch Language models on the command-line on YouTube for a demo or read the accompanying detailed notes . With LLM you can: 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 … and much, much more Quick start # First, install LLM using pip or Homebrew or pipx or uv : pip install llm Or with Homebrew (see warning note ): brew install llm Or with pipx : pipx install llm Or with uv uv tool install llm If you have an OpenAI API key key you can run this: # Paste your OpenAI API key into this llm keys set openai # Run a prompt (with the default gpt-4o-mini model) llm "Ten fun names for a pet pelican" # Extract text from an image llm "extract text" -a scanned-document.jpg # Use a system prompt against a file cat myfile.py | llm -s "Explain this code" Run prompts against Gemini or Anthropic with their respective plugins: llm install llm-gemini llm keys set gemini # Paste Gemini API key here llm -m gemini-2.0-flash 'Tell me fun facts about Mountain View' llm install llm-anthropic llm keys set anthropic # Paste Anthropic API key here llm -m claude-4-opus 'Impress me with wild facts about turnips' You can also install a plugin to access models that can run on your local device. If you use Ollama : # Install the plugin llm install llm-ollama # Download and run a prompt against the Orca Mini 7B model ollama pull llama3.2:latest llm -m llama3.2:latest 'What is the capital of France?' To start an interactive...

Related Tools

Comments

Please login to leave a comment