LinuxCommandLibrary

llm

TLDR

Chat with default model

$ llm "[prompt]"
copy
Use specific model
$ llm -m [gpt-4] "[prompt]"
copy
Chat mode
$ llm chat
copy
Continue conversation
$ llm -c "[follow up]"
copy
List models
$ llm models
copy
Pipe input
$ cat [file.txt] | llm "[summarize this]"
copy

SYNOPSIS

llm [options] [prompt]

DESCRIPTION

llm is a CLI for interacting with language models. It supports multiple providers including OpenAI and local models.
The tool manages conversations, templates, and API keys. It supports piping and scripting.
llm accesses language models.

PARAMETERS

PROMPT

Text prompt for the model.
-m MODEL
Model to use.
-c
Continue last conversation.
-s SYSTEM
System prompt.
chat
Start interactive chat.
models
List available models.
--help
Display help information.

CAVEATS

Requires API keys for cloud models. Conversation history stored locally. Python-based tool.

HISTORY

llm was created by Simon Willison to provide unified CLI access to various language model APIs and local models.

SEE ALSO

ollama(1), chatgpt(1)

Copied to clipboard