HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
simonw
llm
Python2023–2026
simonw / llm

llm

Access large language models from the command-line

53Distinct people
78Mentions
0Explicit recommenders
12.8KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Access large language models from the command-line

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 6:01:32 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year78 dated mentions

Observed mentions: 2023-05-19 00:35:03 UTC to 2026-08-05 02:35:12 UTC.

0102030402023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 12 mentions; 1 submissions, 11 comments20232024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 22 mentions; 3 submissions, 19 comments20242025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 39 mentions; 3 submissions, 36 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC12111
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC22319
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC39336
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC514

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
LLM A CLI tool and Python library for interacting with OpenAI, Anthropic’s Claude, Google’s Gemini, Qwen, Gemma, Kimi, DeepSeek, Mistral, 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 Use LLM to run prompts or start chats against an arbitrary OpenAI-compatible Chat Completions endpoint, such as LM Studio. With uvx, you can do this without installing LLM first: uvx llm openai endpoint http://localhost:1234/v1 \ -m google/gemma-4-12b \ "What is the capital of France?" uvx llm openai endpoint http://localhost:1234/v1 \ -m google/gemma-4-12b \ --chat Add --key your-api-key if the endpoint requires authentication. See Run against an endpoint without configuring it for more options. 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-6-luna 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-3.5-flash 'Tell me fun facts about Mountain View' llm install llm-anthropic llm keys set anthropic # Paste Anthropic API key here llm -m claude-sonnet-5 '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 chat with a model, use llm chat: llm chat -m gpt-4.1 Chatting with gpt-4.1 Type 'exit' or 'quit' to exit Type '!multi' to enter multiple lines, then '!end' to finish Type '!edit' to open your default editor and modify the prompt. Type '!fragment <my_fragment> [<another_fragment> ...]' to insert one or more fragments > Tell me a joke about a pelican Why don't pelicans like to tip waiters? Because they always have a big bill! Project news 29th April 2026: LLM 0.32a0 is a major backwards-compatible refactor 11th August 2025: LLM 0.27, the annotated release notes: GPT-5 and improved tool calling 27th May 2025: Large Language Models can run tools in your terminal with LLM 0.26 5th May 2025: Feed a video to a vision LLM as a sequence of JPEG frames on the CLI (also LLM 0.25) 7th April 2025: Long context support in LLM 0.24 using fragments and template plugins 28th February 2025: Structured data extraction from unstructured content using LLM schemas 17th February 2025: LLM 0.22, the annotated release notes 29th October 2024: You can now run prompts against images, audio and video in your terminal using LLM 26th January 2024: LLM 0.13: The annotated release notes 12th September 2023: Build an image search engine with llm-clip, chat with models with llm chat 4th September 2023: LLM now provides tools for working with embeddings 12th July 2023: The LLM CLI tool now supports self-hosted language models via plugins 18th May 2023: llm, ttok and strip-tags—CLI tools for working with ChatGPT and other LLMs 4th April 2023: The original announcement of the llm CLI tool For everything else, see the llm tag on my blog. Contents Setup Installation Upgrading to the latest version Using uvx A note about Homebrew and PyTorch Installing plugins API key management Saving and using stored keys Passing keys using the –key option Keys in environment variables Configuration Setting a custom default model Setting a custom directory location Turning SQLite logging on and off Usage Executing a prompt Model options Attachments System prompts Tools Extracting fenced code blocks JSON output Schemas Fragments Continuing a conversation Tips for using LLM with Bash or Zsh Completion prompts Starting an interactive chat Listing available models Setting default options for models OpenAI models Configuration OpenAI language models Model features Web Search Code Interpreter Fast mode and service tiers OpenAI embedding models OpenAI completion models Adding more OpenAI models Other models Installing and using a local model OpenAI-compatible models Run against an endpoint without configuring it Configure an OpenAI-compatible model Extra HTTP headers Tools How tools work Trying out tools LLM’s implementation of tools Default tools Tips for implementing tools Schemas Schemas tutorial Getting started with dogs Extracting people from a news articles Using JSON schemas Ways to specify a schema Concise LLM schema syntax Saving reusable schemas in templates Browsing logged JSON objects created using schemas Templates Getting started with –save Using a template Listing available templates Templates as YAML files System prompts Fragments Options Tools Schemas Additional template variables Specifying default parameters Configuring code extraction Setting a default model for a template Template loaders from plugins Fragments Using fragments in a prompt Using fragments in chat Browsing fragments Setting aliases for fragments Viewing fragments in your logs Using fragments from plugins Listing available fragment prefixes Model aliases Listing aliases Adding a new alias Removing an alias V
Read the full README on GitHub

What Hacker News says

22 sources
Here's a quick way to start this running if you're using uv: cd /tmp git clone https://github.com/microsoft/tinytroupe cd tinytroupe OPENAI_API_KEY='your-key-here' uv run jupyter notebook I used this pattern because my OpenAI key is stashed in a LLM-managed JSON file: OPENAI_API_KEY="$(jq -r '.openai' "$(dirname "$(llm logs path)")/keys.json")" \ uv run jupyter notebook (Which inspired me to add a new LLM feature: llm keys get openai - https://github.com/simonw/llm/issues/623)
In TinyTroupe, a new LLM-powered multiagent persona simulation Python library
Going through middle layers has pros and cons. You'll likely find better docs and experience by going through the official APIs directly. Maybe start with OpenAI and/or Claude official libraries, both provide pretty good docs. If you really must use a wrapper, a strategy I use is to look into open-source apps I like and see what they are using. Aider for instance seems to be using this "litellm" thing... If I were to need cross API support for AI, I would probably look into that [1]. llm uses opeanai directly [2]. Etc, etc. -- 1: https://github.com/Aider-AI/aider/blob/e76704e261647348fd7c1... 2: https://github.com/simonw/llm/blob/d654c9521235a737e59a4f1d7...
In Ask HN: What are some good APIs to interact with large language models?
I'm a heavy and competent user of LLMs for everyday tasks including SWE, yet still learned a tonne from this. Several interesting points: - Simon's obviously a gun programmer yet uses LLM's heavily - LLMs take a lot of practice to learn how to use. They don't come with manuals - How much do they improve developer productivity? ANS (paraphrased): It makes me about 3x more efficient at typing code, but typing code is ~10% of my job (the rest is research etc). So I'm 3 times as efficient at 10% of my job. - It's completely sane to be a bit scared and a bit ethically concerned - Regarding tooling, Simon uses claude sonnet (as it's the best model right now), he uses a CLI he made called 'LLM' [1], he uses GitHub CoPilot [2]. - (a few more golden nuggets but I can't recall them all) [1] https://github.com/simonw/llm [2] A tip he gives is becaus
Read the rest
e CoPilot 'sees' what's in the current file, you can copy/paste relevant code from other parts of the app into the current file just so it knows what you're talking about or trying to do. Especially useful for tests.
In AI tools for software engineers, but without the hype – with Simon Willison [video]
llm is Simon's command line front-end to a lot of the llm apis, local and cloud-based. Along with aider-chat, it's my main interface to any LLM work -- it works well with a chat model, one-off queries, and piping text or output into a llm chain. For people who live on the command line, or are just put-off by web interfaces, it's a godsend. About the only thing I need to look further abroad for is when I'm working multi-modally -- I know Simon and the community are mainly noodling over the best command line UX for that: https://github.com/simonw/llm/issues/331
In Llama 3.2: Revolutionizing edge AI and vision with open, customizable models
This is cool! Using pure bash and unix tools is an interesting approach. I built Plandex[1] which has some similar goals (no dependencies, terminal-based, supports piping into context) but it takes quite a different route to get there—I’m using Go and compiling static binaries. It’s also ‘higher level’ and specifically focused on coding, whereas ell seems like a very lightweight and general purpose LLM tool. It reminds me a lot of Simon Willinson’s `llm` tool[2]. Are you familiar with it? The recording feature also reminds me of savvy[3]. 1 - https://github.com/plandex-ai/plandex 2 - https://github.com/simonw/llm 3 - https://github.com/getsavvyinc/savvy-cli
In Show HN: Ell – A command-line interface for LLMs written in Bash
4-turbo should have a knowledge up to December 2023. But it doesn't know anything about the cli tools you created before then (except shot-scraper). Compare 4-turbo to 4o llm -m 4t "Tell me about these cli tools and link to them: - llm: - ttok - symbex - shot-scraper " Among the tools you've listed, "shot-scraper" is the only one that I could provide detailed information about based on widespread use and documentation available as of the last update. As for "llm," "ttok," and "symbex," there isn't readily available, widely recognized information on tools precisely matching those names, so it's possible they might be lesser-known tools, newly released, or possibly regional or specialized tools not widely documented in widely-used platforms. (Truncated) llm -m 4t "Tell me about these cli tools and link to them:
Read the rest
- llm: - ttok - symbex - shot-scraper " As of my last knowledge update in September 2023, here is the information on the CLI tools you are asking about: 1. *llm*: - I couldn't find a specific command line tool named "llm" that is widely recognized or used. It could be a lesser-known tool, a new tool, or potentially a typographical error. Please verify the tool's name and provide additional details if possible. 2. *ttok*: - As with "llm," there isn't any widely known CLI tool named "ttok." (Truncated) llm -m 4o "Tell me about these cli tools and link to them: - llm: - ttok - symbex - shot-scraper " Sure! Here are brief descriptions of the CLI tools you mentioned along with links to their official repositories or webpages: ### 1. llm `llm` is a command-line interface (CLI) tool to interact with large language models like OpenAI's GPT-3. It allows you to query these models directly from the terminal, making it easy to integrate AI capabilities into your workflow or automate tasks. - *Link*: [llm GitHub Repository](https://github.com/simonw/llm) ### 2. ttok `ttok` is a CLI tool for working with tokenizers. It's a tool under development aimed at helping users understand how tokenization processes text, which is essential for preparing data for machine learning models, especially in NLP applications. - *Link*: [ttok GitHub Repository](https://github.com/simonw/ttok) ### 3. symbex `Symbex` is a CLI tool for performing symbolic execution on Python bytecode. It can analyze Python code to find potential bugs, vulnerabilities, or logical errors by exploring all possible execution paths. - *Link*: [symbex GitHub Repository](https://github.com/simonw/symbex) (Truncated) llm -m 4o "Tell me about these cli tools and link to them: - llm: - ttok - symbex - shot-scraper " Sure, here is a brief overview of each CLI tool along with links to their respective repositories or documentation: 1. *llm (Language Model CLI)* - *Description*: The `llm` command-line tool leverages large language models, such as OpenAI's GPT-3, to make it easier to incorporate AI functionalities into your command-line tasks. You can use it to generate text, answer questions, and assist with coding or other language-based tasks directly from your terminal. - **Link**: [llm on GitHub](https://github.com/simonw/llm) 2. *ttok* - *Description*: `ttok` is a simple command-line utility that provides tokenization for text, particularly useful for breaking down input for language models. It helps to preprocess text, count tokens, or manage tokens more efficiently from the command line. - **Link**: [ttok on GitHub](https://github.com/simonw/ttok) 3. *symbex (Symbolic Execution)* - *Description*: `symbex` is a CLI tool designed for searching codebases. It employs symbolic execution to analyze code paths and find functions, variables, or other code elements. This can be particularly useful for developers looking for higher-precision searches in large codebases. - **Link**: [symbex on GitHub](https://github.com/paulgb/symbex) (Truncated) Clearly, openai did a lot more web scraping for this model.
In Show HN: Interactive Graph by LLM (GPT-4o)

Showing the 15 most recent of 22 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.