cost. Hosted models bill per token on your own API key.
Who it is forA developer who wants quick model answers without leaving the terminal.
The problemOpening a chat UI for every small question breaks the flow.
The outcomePrompts, file input and system prompts running from one command.
What you need first
- 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
Steps
- 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"
Prompt for your agent
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>.
Caveat. The README example names a default model that may change between releases.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for simonw/llm and "Run prompts from the command line"
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 freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer