llm
$ llm Community Med Riskllm lets users and agents run prompts across OpenAI, Anthropic, Gemini, and local Ollama models via plugins, constrain output via --schema / JSON, attach multimodal files (-a), and query every past prompt/response in SQLite via llm logs list --json.
brew install llm Composable Unix-pipe LLM runner with SQLite audit logs (llm logs list --json) and structured --schema; ideal for shell workflows.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Built for Unix shell piping with --no-stream, --schema, --no-log, logs list --json, and zero interactive TUI traps.
- Supports
logs list --json,--schema,-ssystem prompts, and--no-log
Remote provider calls incur API billing and default logging writes every prompt/response to local SQLite logs.db unless --no-log is passed.
- Logs all prompts to SQLite by default unless
--no-logis specified
Easy brew, pip, and uvx install across macOS, Linux, and Windows, with llm install <plugin> for extra vendors.
- Cross-platform Python CLI via Homebrew, PyPI, and
uvx
Outstanding Unix pipe composability, SQLite auditability, and structured --schema / -a multimodal attachments.
- Unified multi-provider CLI with SQLite logging and plugin ecosystem
Actively maintained by Simon Willison (simonw/llm) under Apache-2.0.
- Official
simonw/llmrepository
Excellent documentation at llm.datasette.io.
- Official docs at llm.datasette.io
Security, Auth & Guardrails
Stores provider API keys via llm keys set in keys.json (user app-support dir) or reads OPENAI_API_KEY / provider env vars.
Apache-2.0 open-source CLI; remote LLM calls bill against your configured provider API keys (local plugins like llm-ollama are free).
# llm CLI Agent Rules - Pass `--no-log` when processing secrets or private code so prompts are not persisted in SQLite `logs.db`. - Cap history queries with `llm logs list -n <count> --json` (avoid `-n 0` on large histories).
Agent-Ready Command Recipes
Safe Read-Only Queries
llm models list
Prints available built-in and plugin-installed models offline.
llm logs list -n 5 --json
Queries the local SQLite log database and prints the last 5 interactions as JSON (--json).
Controlled Writes & Previews
cat README.md | llm -s 'Summarize in 3 bullets' --no-log
Runs one-shot completion over stdin without saving sensitive inputs to SQLite (--no-log).
Strengths for Agents
- + Built for Unix pipes (
stdin | llm -s ...) with zero TUI blocking. - + Automatic SQLite logging with
llm logs list --jsonand--no-logopt-out. - + Rich plugin ecosystem (
llm-anthropic,llm-gemini,llm-ollama).
Caveats & Pitfalls
- ! Saves every prompt/response in plain SQLite
logs.dbunless--no-logis passed. - ! API keys stored via
llm keys setreside in plaintextkeys.json.