{
 "schema_version": 1,
 "generated": "2026-10-31",
 "id": "simonw-llm--run-your-first-prompt-from-the-command-line-with-llm",
 "repo": "simonw/llm",
 "repo_url": "https://github.com/simonw/llm",
 "repo_slug": "simonw-llm",
 "title": "Run prompts from the command line",
 "page_title": "How to run prompts from the command line with LLM",
 "summary": "Install LLM, store a key and pipe files into a model from your shell.",
 "who": "A developer who wants quick model answers without leaving the terminal.",
 "problem": "Opening a chat UI for every small question breaks the flow.",
 "outcome": "Prompts, file input and system prompts running from one command.",
 "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\"`"
 ],
 "agent_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>.",
 "agents": [
  "claude-code",
  "codex",
  "cursor",
  "gemini-cli"
 ],
 "difficulty": "Beginner",
 "time": "10 minutes",
 "basis": "readme",
 "caveat": "The README example names a default model that may change between releases.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "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"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "cost",
   "notice": "Hosted models bill per token on your own API key."
  }
 ],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/simonw-llm/run-your-first-prompt-from-the-command-line-with-llm/",
 "md": "https://dedupedai.com/use-cases/simonw-llm/run-your-first-prompt-from-the-command-line-with-llm/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/simonw-llm--run-your-first-prompt-from-the-command-line-with-llm.json",
 "api_version": "v1"
}
