{
  "id": "llm",
  "name": "LLM",
  "homepage": "https://llm.datasette.io/",
  "description": "A command-line utility and Python library for interacting with large language models.",
  "executables": [
    "llm"
  ],
  "dotfiles": {
    "paths": [
      "[appData]/io.datasette.llm/",
      "[configHome]/io.datasette.llm/"
    ],
    "exclude": [
      "[appData]/io.datasette.llm/logs.db",
      "[configHome]/io.datasette.llm/logs.db"
    ],
    "secret": [
      "[appData]/io.datasette.llm/keys.json",
      "[configHome]/io.datasette.llm/keys.json"
    ],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Run a prompt",
    "description": "Send a prompt to a language model with llm. Tools, templates, fragments, schemas and logging options are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "help",
        "kind": "help",
        "url": "https://raw.githubusercontent.com/simonw/llm/main/docs/help.md",
        "revision": "2026-10-27",
        "evidence": "Usage: llm prompt [OPTIONS] [PROMPT]\n  -s, --system TEXT               System prompt to use\n  -m, --model TEXT                Model to use\n  -a, --attachment ATTACHMENT     Attachment path or URL or -\n  -o, --option <TEXT TEXT>...     key/value options for the model\n  --no-stream                     Do not stream output\n  -n, --no-log                    Don't log to database\n  -c, --continue                  Continue the most recent conversation.\n  --key TEXT                      API key to use\n  -u, --usage                     Show token usage\n  -x, --extract                   Extract first fenced code block\n"
      }
    ],
    "field": [
      {
        "id": "prompt",
        "label": "Prompt",
        "type": "string",
        "position": 0,
        "sources": [
          "help"
        ]
      },
      {
        "id": "model",
        "label": "Model",
        "type": "string",
        "option": [
          "--model",
          "-m"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "system",
        "label": "System prompt",
        "type": "string",
        "option": [
          "--system",
          "-s"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "attachment",
        "label": "Attachment",
        "description": "Path or URL.",
        "type": "string",
        "option": [
          "--attachment",
          "-a"
        ],
        "multiple": true,
        "sources": [
          "help"
        ]
      },
      {
        "id": "continue",
        "label": "Continue last conversation",
        "type": "boolean",
        "option": [
          "--continue",
          "-c"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "no_stream",
        "label": "Do not stream",
        "type": "boolean",
        "option": [
          "--no-stream"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "no_log",
        "label": "Do not log",
        "type": "boolean",
        "option": [
          "--no-log",
          "-n"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "usage",
        "label": "Show token usage",
        "type": "boolean",
        "option": [
          "--usage",
          "-u"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "extract",
        "label": "Extract first code block",
        "type": "boolean",
        "option": [
          "--extract",
          "-x"
        ],
        "sources": [
          "help"
        ]
      }
    ],
    "task": [
      {
        "id": "ask",
        "label": "Ask a question",
        "fields": [
          "prompt",
          "model",
          "system"
        ],
        "required": [
          "prompt"
        ]
      },
      {
        "id": "code",
        "label": "Get a code block",
        "fields": [
          "prompt",
          "model",
          "extract"
        ],
        "required": [
          "prompt"
        ],
        "set": {
          "extract": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "prompt",
          "model",
          "system",
          "attachment",
          "continue"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "no_stream",
          "no_log",
          "usage",
          "extract"
        ]
      }
    ]
  }
}
