What do you want to do?
3 use cases
-
Run prompts from the command line
Install LLM, store a key and pipe files into a model from your shell.
View prompt
Using simonw/llm, install it with `pip install llm`, set my key with `llm keys set openai`, then run `cat myfile.py | llm -s "Explain this code"` on <my file>.
-
Chat with a local model through LLM and Ollama
Install the Ollama plugin and run prompts against a model that stays on your machine.
View prompt
With simonw/llm, run `llm install llm-ollama`, `ollama pull llama3.2:latest`, then `llm -m llama3.2:latest 'What is the capital of France?'` and report the output.
-
Point LLM at any OpenAI-compatible endpoint
Use uvx to run prompts or chats against LM Studio or another compatible server with no setup.
View prompt
Using simonw/llm via uvx, run a prompt against my endpoint <url> and model <name> with `uvx llm openai endpoint`, then start a `--chat` session.
Quick start with LLM
- Check you have what it needs: Python with pip, or Homebrew, pipx or uv; An API key for a hosted model, or a local model server such as Ollama or LM Studio; Plugins for providers such as Gemini.
- Open simonw/llm on GitHub and read the README and license.
- Install with
pip install llm - Store your key with
llm keys set openai - Run
llm "Ten fun names for a pet pelican" - Pipe a file in with
cat myfile.py | llm -s "Explain this code"
These steps come from our top use case, Run prompts from the command line, which also has a copy-paste agent prompt.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for simonw/llm
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeAbout this repo
- Who it is forDevelopers and tinkerers who want to script LLM prompts from the shell and keep a log of them.
- Why it is hot13k stars, talked about in 2 AI sources we track
- LanguagePython
- Sourcegithub.com/simonw/llm ยท Back to Hot repos
Requirements
- Python with pip, or Homebrew, pipx or uv
- An API key for a hosted model, or a local model server such as Ollama or LM Studio
- Plugins for providers such as Gemini
Add this badge to your README
Maintain LLM? Show readers where to find these use cases.
Markdown
[](https://dedupedai.com/use-cases/simonw-llm/?utm_source=github&utm_medium=badge&utm_campaign=simonw-llm)
HTML
<a href="https://dedupedai.com/use-cases/simonw-llm/?utm_source=github&utm_medium=badge&utm_campaign=simonw-llm"><img src="https://dedupedai.com/badge/simonw/llm.svg" alt="Use cases on Deduped" height="20"></a>
A static image, no tracking script. About the badge
Questions about LLM
What is LLM?
LLM is a CLI tool and Python library for interacting with OpenAI, Gemini, Qwen, DeepSeek, Mistral and dozens of other large language models, through remote APIs or models installed on your own machine. It can run prompts from the command line, store prompts and responses in SQLite, generate embeddings, extract structured content, and let models execute tools. It is an open-source project on GitHub: https://github.com/simonw/llm.
How do I use LLM?
Install with pip install llm; then Store your key with llm keys set openai; run llm "Ten fun names for a pet pelican". The use cases on this page give the full steps and a copy-paste agent prompt for each job.
Who is LLM for?
Developers and tinkerers who want to script LLM prompts from the shell and keep a log of them.
What can I do with LLM?
3 use cases so far, for example: Run prompts from the command line; Chat with a local model through LLM and Ollama; Point LLM at any OpenAI-compatible endpoint. Each has steps and a copy-paste agent prompt.
What do I need to run LLM?
Python with pip, or Homebrew, pipx or uv; An API key for a hosted model, or a local model server such as Ollama or LM Studio; Plugins for providers such as Gemini.
What are alternatives to LLM?
Other hot AI repos in Software and DevOps: ECC, Thinkrail, Superpowers, Deep Infer, Instructor.
Is LLM safe to run?
Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.