Skip to main content

llmess

Some files end too early. Some files don't contain what you're looking for.

llmess is a less pager that addresses both issues:

  • When you scroll past the end of a file, an LLM generates more content.
  • When you search for a term that doesn't exist, the LLM generates content containing it.

Works with any model supported by the llm CLI.

Installation

Prerequisites

You need the llm CLI tool installed and configured:

# Install llm
pipx install llm

# Install plugins for your preferred provider
llm install llm-openrouter  # or llm-claude, llm-ollama, etc.

# Configure API keys and default model
llm keys set openrouter
llm models default openrouter/meta-llama/llama-3.1-405b

Install llmess

pipx install llmess

Or with pip:

pip install llmess

Note: llmess calls llm via subprocess, so it uses whatever llm is on your PATH. Your plugins and configuration are preserved.

Usage

llmess myfile.txt                    # View a file
llmess -m gpt-4o myfile.txt          # Use a specific model
llmess -B myfile.txt                 # Base mode: no system prompt
cat file.txt | llmess                # Read from stdin

Options

Flag Description
-m, --model LLM model to use (default: your llm default)
-s, --system System prompt (default: instruct prompt)
-B, --base Base model mode: no system prompt
-S, --stealth Mimic less appearance exactly-ish probably
-T, --max-tokens N Max tokens to generate per LLM call
-C, --context CHARS Characters of context to send to LLM (default: 2000)
-o, --option KEY VALUE Model option to pass to llm (can be repeated)
-P, --prefetch [N] Prefetch N screens ahead in background (off by default; 2 if flag given without N)
--real-lines N Show first N real lines, then generate continuations
--real-screen Show first screenful of real content, then generate
--install-prank Output shell function to wrap less with llmess
-V, --version Show version

Environment Variables

Variable Description
LLMESS Default CLI flags (like LESS for less)
LLMESS_MODEL Default model
LLMESS_OPTIONS Default model options (comma-separated key=value pairs)
# In ~/.bashrc or ~/.zshrc
export LLMESS="-S -P"          # stealth + prefetch by default
export LLMESS_MODEL="openrouter/meta-llama/llama-3.1-405b"

Priority: CLI flags > LLMESS > LLMESS_MODEL/LLMESS_OPTIONS > built-in defaults.

Controls

Key Action
↑ / k Scroll up one line
↓ / j Scroll down one line
Page Up / b Scroll up one page
Page Down / f / Space Scroll down one page
g Go to top
G Go to bottom
/ Search forward
n Next match
N Previous match
Esc Clear search
s Save to file
q Quit

When you reach the bottom, scrolling down triggers LLM generation.

Search

Press / to search. Matches are highlighted.

If the term isn't found, llmess generates content containing it:

echo "Hello world" | llmess
# Press /password<Enter>
# → Generates content containing "password", jumps to match

This requires a system prompt (the default). With -B (base mode), search behaves normally.

Base Models vs. Instruct Models

By default, llmess sends a system prompt instructing the model to continue text without commentary. This works well with instruct models and is ignored by base models.

Base models continue text naturally. Use -B to skip the system prompt:

llmess -B -m openrouter/meta-llama/llama-3.1-405b myfile.txt

Search-triggered generation is not available with base models since they don't follow instructions.

Instruct models work out of the box. Use -s "custom prompt" to override the default:

llmess -s "Continue this text exactly. No commentary." myfile.txt

Any model supported by llm works, including local models via Ollama.

Modes

Stealth Mode

With -S, llmess mimics the appearance of less:

  • Status bar shows filename lines 1-24 50% format
  • No [GENERATING...] indicator
  • Shows (END) at bottom

Prefetch Mode

With -P, llmess generates content ahead of where you're reading:

llmess -P file.txt       # Prefetch 2 screens ahead
llmess -P 5 file.txt     # Prefetch 5 screens ahead

Real-Then-Fake Mode

Show real file content first, then generate continuations:

llmess --real-lines 50 ~/.bashrc    # First 50 lines are real
llmess --real-screen config.yaml    # First screenful is real

Prank Installation

llmess --install-prank

Outputs a shell function that wraps less with llmess. Add it to the target's shell config.

The wrapper uses stealth mode, shows real content first, prefetches in background, and falls back to real less for piped output.

License

MIT

Metadata

Release files for llmess 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llmess 0.1.0
File Size Uploaded Provenance
llmess-0.1.0.tar.gz 17.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for llmess 0.1.0
File Interpreter ABI Platform
llmess-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 32.0 kB

Release files / llmess-0.1.0.tar.gz

Download URL llmess-0.1.0.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e4891de9b43f308073952712930f57534db0d29e48fbac05ec4689ee0c261478
BLAKE2b-256 checksum
How to use checksums
2d20c852b4e6f41d4ef25eb669a02c94691d065162cc5afa8e5bb25a3fdd2fb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 5, 2026.

Transparency log

Release files / llmess-0.1.0-py3-none-any.whl

Download URL llmess-0.1.0-py3-none-any.whl
Size 14.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ec828031ed6541642bfe5aba70b4e28506f23c316d80ea977353fcf7b85fb9f
BLAKE2b-256 checksum
How to use checksums
8be3187d71447802e33e45ffae02fed2a98a7fd54e0850d40b9dd2daa5467b07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 5, 2026.

Transparency log

Security for llmess 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for llmess-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page