Who it is forA privacy-minded developer who wants a scriptable local model.
The problemHosted APIs send your text off the machine.
The outcomeA local model answering prompts from the LLM 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 LLM with
pip install llm - Install the plugin with
llm install llm-ollama - Pull a model with
ollama pull llama3.2:latest - Run
llm -m llama3.2:latest 'What is the capital of France?' - Start an interactive session with
llm chat -m gpt-4.1or your local model name
Prompt for your agent
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.
Caveat. Requires Ollama installed separately.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for simonw/llm and "Chat with a local model through LLM and Ollama"
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