Debuly
LLM logo

LLM

Command-line tool and Python library by Datasette for prompting OpenAI, Claude, Gemini and local models, with SQLite logging.

Open source

What is LLM?

LLM is a command-line tool and Python library for talking to large language models from a terminal or a script. It reaches remote models from OpenAI, Anthropic's Claude, Google's Gemini, Mistral, DeepSeek and others through an API key, and it runs models on your own machine through plugins, for example with Ollama. From the shell you can run a one-off prompt, pipe a file in with a system prompt, attach an image or PDF, or open an interactive chat. Every prompt and response can be stored in a SQLite database, embeddings can be generated and stored, structured content can be extracted with schemas, and models can be given tools to run. Templates, fragments and model aliases keep repeated work tidy, and a plugin directory adds more models. LLM is open source and installs with pip, Homebrew, pipx or uv. There are no plans or subscription fees, though the hosted providers charge for their own APIs.

Use cases

  • Run prompts from the command line
  • Pipe files into a model with a system prompt
  • Log prompts and responses to SQLite
  • Generate and store embeddings
  • Extract structured data from images and text
  • Give models tools to call
  • Chat with local models through Ollama

Who it's for

  • Developers
  • Command-line users
  • Python programmers
  • Data analysts

Why use LLM

  • One interface covers many providers, so switching models means changing a flag rather than rewriting a script.
  • Logging to SQLite gives you a searchable record of what you asked and what came back.
  • It works in shell pipelines, so file contents or command output can be fed straight to a model.
  • Plugins add local and hosted models without changing how you use the tool.
  • Free and open source, with no subscription of its own.

LLM features

  • Command-line interface and Python API for many models
  • Plugins for Gemini, Anthropic and local models such as Ollama
  • Interactive chat mode with multi-line and editor input
  • SQLite logging of prompts and responses
  • Embeddings generation and storage
  • Schemas for extracting structured content
  • Tool support so models can run functions
  • Templates, fragments and model aliases
  • Image and PDF attachments for models that accept them
  • Chat against any OpenAI-compatible endpoint, such as LM Studio

LLM integrations

  • OpenAI
  • Anthropic
  • Google Gemini
  • Ollama
  • LM Studio
  • SQLite
  • Mistral
  • DeepSeek

How to get started with LLM

  1. Install LLM with pip, Homebrew, pipx or uv.
  2. Store an API key with the llm keys set command, or install a plugin such as llm-gemini, llm-anthropic or llm-ollama.
  3. Run a prompt from the terminal, optionally with a system prompt, an attachment or piped input.
  4. Start llm chat for a back-and-forth session with a chosen model.
  5. Review logged conversations in SQLite and save templates, schemas or aliases for work you repeat.

LLM limitations

  • Hosted models need your own API key and are billed by the provider
  • It is a command-line tool with no graphical interface
  • Non-OpenAI providers and local models need plugins installed first

LLM pricing

LLM is open source, so you can use and self-host it for free.

Prices can change and may vary by country or exclude tax. Check the official pricing page.

LLM alternatives

The main LLM alternatives listed on Debuly are Ollama, Fabric, LiteLLM, BAML, Z.AI Developer Platform and Alibaba Cloud Model Studio. The table compares pricing and platforms; order is A–Z.

LLM compared with its alternatives
ToolPricingStarting pricePlatforms
LLMOpen source—CLI, API
Alibaba Cloud Model StudioPaid$6/moWeb, API
BAMLOpen source—CLI, macOS, Linux, Windows
FabricOpen source—CLI, API, Self-hosted
LiteLLMOpen source—Python, API, Self-hosted, CLI
OllamaOpen source$20/momacOS, Windows, Linux, API
Z.AI Developer PlatformFreemium$18/moAPI, Web
  1. Alibaba Cloud Model Studio

    Alibaba Cloud platform giving developers API access to Qwen and partner models for text, image, video and speech, billed per token or by subscription.

  2. BAML

    Open-source, TypeScript-like programming language for agents, with typed LLM functions, built-in tests and SDK generation.

  3. Fabric

    Open-source framework by Daniel Miessler that stores AI prompts as reusable patterns you run from the command line.

  4. LiteLLM

    Open-source AI gateway and Python SDK that gives one OpenAI-format API to 100+ LLM providers, with keys, budgets and cost tracking.

  5. Ollama

    Open-source app and CLI for running open AI models locally on macOS, Windows and Linux, with optional paid cloud models.

  6. Z.AI Developer Platform

    Pay-per-token API for Z.AI's GLM models, plus a monthly GLM Coding Plan that powers coding agents such as Claude Code.

LLM FAQ

How much does LLM cost?

The tool itself has no listed price and is open source. Hosted models need an API key from the provider, whose usage charges are separate, while local models cost only your hardware.

Is there a free plan for LLM?

There are no plans or tiers. LLM is free to install with pip, Homebrew, pipx or uv, so any cost comes from the model provider you connect.

Can LLM run local models?

Yes. Install a plugin such as llm-ollama to run models on your device, or point LLM at any OpenAI-compatible endpoint, for example LM Studio at localhost.

Does LLM have a Python API?

Yes. It is both a CLI and a Python library, and the docs include a Python API section plus guides for writing plugins that add new models.

Which providers does LLM support?

It ships with a default OpenAI plugin and other plugins cover Anthropic's Claude, Google's Gemini and more, including local models. The plugin directory lists the options.

What are alternatives to LLM?

Alternatives include Ollama's own command line, aichat, Fabric and LiteLLM, which cover similar terminal or multi-provider needs.

Sources & verification

Facts on this page come from the official sources below, each with the date we read it. Written by Debuly; the vendor did not review this page.

Image credits

  • Logo: from llm.datasette.io · fetched · Vendor trademark, used only to identify the product; removed on request
  • Cover: none collected yet, so a generated tile is shown.

Spot an error? Report an issue with this listing. We also remove a logo or image on the owner's request.