LinuxCommandLibrary

llm

CLI for interacting with language models

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.

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)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community