Lightweight cli interface to interact with LLM models from your terminal.
| .gitignore | update readme | |
| client.go | update configuration to support multiple providers | |
| config.go | update configuration to support multiple providers | |
| config.yaml.example | update configuration to support multiple providers | |
| files.go | initial commit | |
| go.mod | initial commit | |
| go.sum | initial commit | |
| main.go | update configuration to support multiple providers | |
| README.md | update configuration to support multiple providers | |
| system.go | initial commit | |
LLM CLI
A fast command-line interface for interacting with large language models. The tool supports multiple providers through OpenAI-compatible APIs, configurable system prompts, inline file inclusion, and streaming responses.
Features
- Provider-scoped configuration with per-model aliases
- Named system prompts with
{{info}}placeholder for runtime context (date, OS, shell, etc.) - File and URL references via
@pathtokens in prompts - Streaming or full-response modes
- Optional thinking/chain-of-thought display for reasoning models
Installation
- Go to the releases page and download the binary for your platform.
- Add the binary to a directory in your PATH.
- Example for Linux/macOS:
sudo mv llm /usr/local/bin
- Reload your shell or session to ensure the binary is available.
Build from source
- Clone this repository
- Install dependencies:
go mod tidy - Build the binary:
go build -o llm .
Configuration
Copy config.yaml.example to config.yaml and adjust:
providerslist with base URL, API key, and models per providerdefault_provideranddefault_modelto choose the defaultsdefault_modeldoes not support aliases, you must useprovider>nameinstead
- Model
aliasesto map short names toprovider>model system_promptsdefinitions; the default is used unless-p/--promptis set- Include
{{info}}in a prompt to expand runtime context
Environment variables prefixed with
LLM_override config values (e.g.,LLM_API_KEY).
Usage Examples
$> llm how can i list all the files in this directory sorted by size
>> gpt-oss-20b (oss):
Use `ls -lS`
$> llm summarize @README.md
>> gpt-oss-20b (oss):
**LLM CLI**
- Command‐line tool to talk to large language models via OpenAI‐compatible APIs.
- Supports multiple providers, streaming, full responses, chain‐of‐thought display.
**Features**
- Model aliases; one can be set [...continues...]
- Use
@filenameor@https://urlto inject contents into the prompt --rawoutputs responses without processing--thinkshows the model’s thinking phase when supported
Run llm --help for the full option list.